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

Deprecate signal.attrs[x] = y, use platform.add_signal_attribute(signal, x, y) instead #1466

Open
whitequark opened this issue Jul 29, 2024 · 0 comments

Comments

@whitequark
Copy link
Member

This removes the last major source of mutability in the core HDL, and makes it possible to use the same component hierarchy to build several bitstreams with different attributes without the hazards of reusing a mutable attribute array. This will also solve the issue of add_clock_constraint adding a keep attribute, mutating the passed signal.

Additionally, we could extend this to non-Signals but rather arbitrary Values, as NIR should be able to give them names as necessary. (Only allowing Signals is simpler though.)

@whitequark whitequark changed the title Deprecate signal.attrs[x] = y, use platform.add_attribute(signal, x, y) instead Deprecate signal.attrs[x] = y, use platform.add_signal_attribute(signal, x, y) instead Jul 29, 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

1 participant