How to connect a Flow to a Stream in SpinalHDL

225 Views Asked by At

I have a write sensitive APB register which shall push into a FIFO with clock domain crossing. I though I would write:

val myFlow = Flow(...)
busCtrl.driveFlow(myFlow,address=4)
val myFifo = StreamFifoCC(...)
myFifo.io.push << myFlow

But the << operator requires a Stream, so a type error happens.

1

There are 1 best solutions below

0
On BEST ANSWER
myFifo.io.push << myFlow.toStream

Should be fine, if the fifo overflow, the myFlow transaction will be lost