Dolu1990 on dev
Stream.swapPayload added UInt.twoComplement fix simplify SpinalEnumCraft with l… (compare)
svancau on bmbl2cache
Add L2 Cache (WIP, not working) (compare)
Dolu1990 on dev
max bit width 4095 -> 4096 WS(write set) bug fixed Merge pull request #363 from ji… (compare)
I have a small problem with the InOutWrapper: I'm currently using SpinalHDL to write peripherals that will be integrated into a Zynq design, the SpinalHDL design will not be the toplevel. I wanted to use InOutWrapper to convert some TriState signals to analog, but it seems Vivado is not happy with inferring the IOBUF if the assignments that the InOutWrapper generates do not happen on the toplevel. If I manually instance the IOBUF everything works nicely.
I therefore wanted to extend the InOutWrapper such that the IOBUFs that are needed are automatically generated as Blackboxes instead of being inferred - but I'm failing there, it seems my understanding of Scala/Spinal are not sufficient ATM...
My current try for the rework section of TriState types:
case bundle: TriState[_] if bundle.writeEnable.isOutput => {
val newIo = inout(Analog(bundle.dataType)).setWeakName(bundle.getName())
val bufs = Array.fill[IOBUF](bundle.dataType.getBitsWidth)(IOBUF())
bundle.setAsDirectionLess.unsetName().allowDirectionLessIo
(bufs zip bundle.read.asBits.asBools zip bundle.write.asBits.asBools) map {
case ((buf, r), w) =>
println(buf, r, w)
buf.I := w
r := buf.O
buf.T := bundle.writeEnable
}
}
Leads to an error during generation:
[error] NO DRIVER ON (toplevel/??? : Bool), defined at
[error] andreasWallner.Test$$anon$1$$anonfun$3.apply(iowrapper.scala:84)
[error] andreasWallner.Test$$anon$1$$anonfun$3.apply(iowrapper.scala:84)
[error] spinal.lib.io.TriState.<init>(TriState.scala:7)
[error] andreasWallner.Test$$anon$1.<init>(iowrapper.scala:84)
[error] andreasWallner.Test.<init>(iowrapper.scala:83)
....
How would I correctly implement this?
case class Test() extends Component {
val io = new Bundle {
val tri = master(TriState(Bool))
}
io.tri.write := True
io.tri.writeEnable := io.tri.read
}