Open mikex-oss opened 2 weeks ago
On the "workaround" -- we can add a stdlib function to do this before adding a builtin, right?
I think that makes sense, with the main downside being verbosity...particularly without type generics, you'd have, for example, std::array_repl
and std::bits_repl
.
What's hard to do? (limit 100 words)
Create arrays and bit vectors with replicated patterns. SystemVerilog provides the replication operator which works on both, so you can do stuff like:
which is equivalent to:
Similarly, you can do:
which is equivalent to
32'b10101001101010011010100110101001
Current best alternative workaround (limit 100 words)
You could write for loops to do
update
andbit_slice_update
. Or just copy-paste manually.Your view of the "best case XLS enhancement" (limit 100 words)
Support this in DSLX.