For testing inputs/outputs specified as vectors, I need to be able to programmatically create the desired Vec[Bool] for poke and expect. Seq[Bool] is a convient structure to create either directly (e.g., Seq.tabulate(n) {i => (i%2==0).B}
) or from a UInt (e.g., 5.U(6.W).toBools
).
In a chiseltest, how can I use this Seq[Bool] for poke and expect? Vec.Lit(Seq[Bool])
doesn't seem to be supported.
I honestly have not been able to figure this out myself. We recently added convenience methods to directly
peek
/poke
/expect
some of the basic Chisel types with Scala values directly (PR 480).This could be extended to e.g., be able to
peek
/poke
/expect
aVec[UInt]
with aSeq[BigInt]
or aVec[Bool]
with aSeq[Boolean]
. Feel free to open a PR on this. We just need someone to write the code.