FireSim doesn't work with cloned configs + CloneLazyModule caveats
Opened this issue · 1 comments
abejgonzalez commented
Background Work
- Yes, I searched the mailing list
- Yes, I searched prior issues
- Yes, I searched the documentation
Chipyard Version and Hash
Latest
OS Setup
N/A
Other Setup
Tried building
Current Behavior
Errors since you can't access the .module
member here for each tile:
chipyard/generators/firechip/chip/src/main/scala/FireSim.scala
Lines 122 to 151 in 2b61ac2
Expected Behavior
You can bypass the issue by just annotating the 1st element of the sequence. Ideally an API is exposed for CloneLazyModule that indicates if it's been cloned.
Other Information
No response
abejgonzalez commented
Additionally, CloneLazyModule doesn't work for non-diplomatic IOs. I.e. something like this doesn't work:
class M0 extends LazyModule {
val module = LazyModuleImp {
val io = IO(new Bundle {
val ib = Input(Bool())
val ob = Output(Bool())
}
}
}
// in lazy module scope
val m0 = LazyModule(new M0)
val m1 = LazyModule(new M0)
// in impl scope
m1.module.io.ib := false.B
m0.module.io.ib := m1.module.io.ob
// change instantiation to this
val m0 = LazyModule(new M0)
val m1 = CloneLazyModule(new M0, m0)