Hi all,
I have a configurable port, depending on Boolean s4noc:
if (s4noc) {
val e = rv.tx.bits.asTypeOf(Entry(UInt(32.W)))
e.data := cp.wrData
e.time := txDestReg
cp.rdData := rv.rx.bits.asTypeOf(Entry(UInt(32.W))).data
} else {
rv.tx.bits := cp.wrData
cp.rdData := rv.rx.bits
}
If s4noc is false everything compiles and runs fine. However, if s4noc is true, Chisel complains about uninitialized fields:
[info] firrtl.passes.PassExceptions: firrtl.passes.CheckInitialization$RefNotInitializedException: : [module CpuInterfaceRV] Reference rv is not fully initialized.
[info] : rv.tx.bits.time <= VOID
[info] firrtl.passes.CheckInitialization$RefNotInitializedException: : [module CpuInterfaceRV] Reference rv is not fully initialized.
[info] : rv.tx.bits.data <= VOID
Is the above val e (as an Entry type) not usable on the LHS of an assignment?
Cheers,
Martin