2

The chisel version I'm using is 3.2.2. When I try to create a Vec of member in a Bundle class, code is like,

class myIOBundle extends GenericParameterizedBundle {
  val en = Vec(4, Output(Bool()))
  val aa = Input(Vec(4, Bool()))  // Used in Debug.scala of rocket-chip
}

then I implement this Bundle class and pass it to IO of a Module class, the code is like,

class myModuleClass extends Module{
  val io = IO(new myIOBundle)
  ...
}

Then I got the error says :

[error] chisel3.package$RebindingException: Attempted reassignment of binding to UInt<3>(4)

But I see the same use of Vec in Debug.scala of rocket code. Is this error encoutered in old chisel version, not the chisel 3.4.3, since the rocket is using chisel 3.4.3?

2
  • 1
    I am unable to reproduce this issue in Chisel 3.2.2 so I believe the actual cause is something else not included in the code snippet (scastie.scala-lang.org/Y0IdvXGOQxGg0rwsAaisBA). I'll note that I had to not include GenericParameterizedBundle, but in this case, you don't need it either. Commented Jan 27, 2022 at 5:10
  • @JackKoenig Yes you are correct. This error is not related to chisel version. The root cause is that the Bundle have mixed-in a trait, and a enumeration is used in this trait for a FSM. (scastie.scala-lang.org/CJCksMSVRCO8Is5pxDL11A). If I remove this trait from the Bundle class, the code can be compiled correctly. :))) Commented Jan 27, 2022 at 7:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.