import spinal.core._
import spinal.lib._
object Test extends App {
// implicit def toDataPimper[T <: Data](_data: Fragment[T]) = new DataPimper(_data)
SpinalConfig().generateVerilog(new Component {
val io = new Bundle {
val input = in port Fragment(Bool())
val output = out port Fragment(Bool())
}
io.output := io.input
})
}
In this example, i would expect := to assign both io.output.fragment and io.output.last.
Instead i get an error NO DRIVER ON (toplevel/io_output_last : out Bool).
It seems the scala compiler prefers easyFragment
over DataPimped because the former is more specific.
I can work around it by uncommenting line 5, but it would be nicer if it worked correctly out of the box.
In this example, i would expect
:=
to assign bothio.output.fragment
andio.output.last
. Instead i get an errorNO DRIVER ON (toplevel/io_output_last : out Bool)
.It seems the scala compiler prefers easyFragment over DataPimped because the former is more specific.
I can work around it by uncommenting line 5, but it would be nicer if it worked correctly out of the box.