Closed dreamflyings closed 5 months ago
Here is the fix to the above example :
SpinalVerilog{
val plugins = ArrayBuffer[FiberPlugin]()
plugins += new EventCounterPlugin()
plugins += new EventSourcePlugin("lane0")
plugins += new EventSourcePlugin("lane1")
new Module{
val mod = VexiiRiscv(plugins)
val patch = Fiber build mod.rework(new Area {
val modCnt = mod.host[EventCounterPlugin].logic.get
val cnt = out(modCnt.counter.resize(8))
})
}.setName("TestComb")
}
The fiber build/setup phase will not start before the elaboration main thread is done. So the code was blocked on the mod.host[EventCounterPlugin].logic.get.
The diagnostic for that case can be done seen the error message :
[Progress] at 0.000 : Elaborate components
The main thread is stuck at :
...
app//vexiiriscv.sandbox.Miaouuuu9$$anonfun$6$$anon$2.<init>(Play.scala:80)
:)
Hi~ I found that VexiiRiscv cannot be instantiated in new Module, Of course, it may also be that I am not familiar enough with the FiberPlugin framework. What I want to say is: if VexiiRiscv cannot be composed into new Module, This will limit the application of the FiberPlugin framework. In addition, because the FrameWork framework used in naxriscv can be composed, This causes some trouble for old users who want to upgrade the framework. What do you think of this phenomenon? The code is as follows: