Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand semantics of Array from MutableSequence to MutableMapping #73

Closed
nmigen-issue-migration opened this issue May 12, 2019 · 5 comments

Comments

@nmigen-issue-migration
Copy link

Issue by whitequark
Sunday May 12, 2019 at 13:25 GMT
Originally opened as m-labs/nmigen#66


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.

@nmigen-issue-migration
Copy link
Author

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?)

@nmigen-issue-migration
Copy link
Author

Comment by whitequark
Saturday Oct 12, 2019 at 23:29 GMT


This is a self-contained feature that doesn't have backwards compatibility concerns, so it doesn't have to be in 0.1.

@whitequark
Copy link
Member

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.

@whitequark
Copy link
Member

This has been requested on the Aug 3rd meeting: https://freenode.irclog.whitequark.org/nmigen/2020-08-03#1596478574-1596478045; reopening since the reason for closing was that "seemingly no one wants this".

@whitequark
Copy link
Member

This was reopened for the benefit of lkcl, who is no longer participating in the project. I think we can safely close this back as "no one (worth caring about) wants this".

@whitequark whitequark closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants