schoeberl / chisel-book

Digital Design with Chisel
727 stars 135 forks source link

What do we do if we still want partial bulk connection #18

Open HaFred opened 4 years ago

HaFred commented 4 years ago

For 4.3 Bulk Connections, the If a name is missing, it is not connected. seems to be deactivated already. What do we do if we still want to use <> for partial bulk connection? i.e., for the same fetch decode execute as before?

HaFred commented 4 years ago

https://github.com/schoeberl/chisel-book/blob/1ed84284181c38abdc0e3e435a4198f53e6e9c4d/src/main/scala/components.scala#L192 Prompted errors: [info] [0.000] Elaborating design... [error] chisel3.internal.ChiselException: Connection between left (AnonymousBundle(IO io in Fetch)) and source (AnonymousBundle(IO io in Decode)) failed @.regB: Left Record missing field (regB). [error] ... [error] at ammonite.$sess.cmd27$Helper$Processor.<init>(cmd27.sc:44) [error] at ammonite.$sess.cmd28$Helper.$anonfun$res28$1(cmd28.sc:1) [error] ... (Stack trace trimmed to user code only, rerun with --full-stacktrace if you wish to see the full stack trace) scala.MatchError: ChiselExecutionFailure(Failed to elaborate Chisel circuit) (of class chisel3.ChiselExecutionFailure) ammonite.$file.dummy.source.load$minusivy_2$Helper.getVerilog(Main.sc:24) ammonite.$sess.cmd28$Helper.<init>(cmd28.sc:1) ammonite.$sess.cmd28$.<init>(cmd28.sc:7) ammonite.$sess.cmd28$.<clinit>(cmd28.sc:-1)

HaFred commented 4 years ago

Would you mind taking a look at this? Really appreciate it. @schoeberl

CSerht commented 2 years ago

For 4.3 Bulk Connections, the If a name is missing, it is not connected. seems to be deactivated already. What do we do if we still want to use <> for partial bulk connection? i.e., for the same fetch decode execute as before?

Link:chisel3-vs-chisel2 In Unsupported constructs Chapter: In Chisel2, bulk-connects <> with unconnected source components do not update connections from the unconnected components. ** In Chisel3, bulk-connects strictly adhere to last connection semantics and unconnected OUTPUTs will be connected to INPUTs resulting in the assignment of random values to those inputs.

I'm sorry that I have not understanded how to use <> in Chisel3.In my opinion, you should avoid to use <> in Chisel3.