An Array is essentially a mux, and there are several equally valid ways to drive a mux. Currently only straight binary is supported. It would be nice to also have one-hot and priority encodings, since all of these are trivially representable directly in RTLIL and Verilog.
One thing to note is that one-hot and priority are one and the same unless parallel_case is used.
The text was updated successfully, but these errors were encountered:
Comment by whitequark Wednesday Sep 18, 2019 at 02:21 GMT
The most idiomatic way to do this is to make the Array associative, and make sure that initializing it with a list uses consecutive indices. (The indices still all have to be integers; possibly enums?)
I've never seen anyone express any interest in this feature, and it's not trivial to implement because of the highly special treatment of ArrayProxy today. Because of that I'm closing the issue.
To implement this, Array should be rewritten so that ArrayProxy is a plain UserValue (perhaps we should call those CustomValue or something instead), and then it will be quite easy to expand its semantics, since it will no longer involve nMigen internals.