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 #66

Open
whitequark opened this issue May 12, 2019 · 2 comments
Open
Labels

Comments

@whitequark
Copy link
Contributor

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.

@whitequark whitequark added this to the 0.1 milestone Sep 18, 2019
@whitequark
Copy link
Contributor Author

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

@whitequark whitequark changed the title Allow changing encoding for Array Expand semantics of Array from MutableSequence to MutableDictionary Sep 18, 2019
@whitequark whitequark changed the title Expand semantics of Array from MutableSequence to MutableDictionary Expand semantics of Array from MutableSequence to MutableMapping Sep 21, 2019
@whitequark
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant