-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Peek on internal Vec or elements of Seq? #43
Comments
Ok, seems like I still am not using Vec apply appropriately, resulting in the first issues
|
Did you ever find a resolution to this problem? |
I've just been bringing certain signals out via options, but I think this was brought up at some meeting last week (being able to poke internal signals, like in Chisel2; not specific to Seq), and hopefully the testers or whatever will be patched. @chick ? Re: Seq, idk... basically Seq needs to be treated like a Chisel type, otherwise it sucks to have to use Seq for stuff that Chisel2 Vec used to be ok at (even if used improperly)... |
Sorry, I've let this slide, can we talk about it at the hack session today |
@chick yeah, I actually went over this with @sdtwigg some weeks ago. It's super confusing! I'm not sure what @edwardcwang was referring to, but in my latest reply, I was referring more to the ability to peek internal nodes, b/c I don't think it worked a few weeks ago... That and in general, for the non-homogeneous Vec case, people keep suggesting that I use Seq[T]. The problem with Seq[T] is that there isn't much "Chisel"-y support for Seq's, as compared to when I could use Vec's to perform the same function. I believe I also tried a few weeks ago, but if I remember correctly, Seq's in Bundles are a huge headache. |
@shunshou I think @chick may have been referring to was not using a Vec(Reg(...)) style construct which chisel3 doesn't seem to like. That may account for your As for peeking at internal signals, I get the same kind of error as you:
|
Yea I know what Chick was referring to, and I've already resolved it. It really just needs to be clarified in a manual of some sort why Chisel3 doesn't like it [which Stephen and I talked about in greater detail right after I posted this]. I assume what you want fixed is more just support for peeking internal signals in general. I care that that's fixed + Chisel support for Seq[T <: Data] is expanded (kind of like Options in Bundles). |
When I use peek to get the internal value of a Vec/Array (not in IO bundle), |
I have an internal signal:
val state = Vec(Reg(init = Bool(true)) +: Seq.fill(p.numBits)(Reg(init = Bool(false))))
In the PeekPokeTester, I try
peek(c.state)
and get
Some other attempt resulted in
I try
c.state.foreach { x => peek(x) }
and get the same error.What I really wanted to do was peek with each state being a Seq instead of a Vec a la:
val state = Reg(init = Bool(true)) +: Seq.fill(p.numBits)(Reg(init = Bool(false)))
with
c.state.foreach { x => peek(x) }
Resulting in:
OR
Ideally, I want peek(c.state) to work, where c.state is a Seq.
The text was updated successfully, but these errors were encountered: