Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mem of Vec cannot be accessed as expected #708

Closed
colinschmidt opened this issue Oct 18, 2017 · 0 comments
Closed

Mem of Vec cannot be accessed as expected #708

colinschmidt opened this issue Oct 18, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@colinschmidt
Copy link
Contributor

With the following chisel

val blocks = Mem(nSectors, Vec(dataBeats, UInt(dataBitsPerBeat.W)))
...
blocks(dataReq.offset)(dataBeat) := io.data.bits.data

After the rocket-chip chisel bump(from chisel3/bb12fe to chisel3/e2c5c1) the above code no longer behaves as expected (accessing the inner Vec of the Mem) and instead throws the following error.

[error] /home/centos/hwacha-template/testchipip/src/main/scala/BlockDevice.scala:375: type mismatch;
[error]  found   : chisel3.core.UInt
[error]  required: chisel3.core.CompileOptions
[error]     blocks(dataReq.offset)(dataBeat) := io.data.bits.data

A simple workaround is below but seems highly unintuitive

blocks(dataReq.offset).apply(dataBeat) := io.data.bits.data

If I had more time I'd write a test but alas I do not have more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants