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

Support Sum Types #23

Open
ThePerfectComputer opened this issue May 11, 2023 · 2 comments
Open

Support Sum Types #23

ThePerfectComputer opened this issue May 11, 2023 · 2 comments

Comments

@ThePerfectComputer
Copy link

Both Clash HDL and Bluespec have support for sum types. If rust-hdl could have sum types, where a register could simply be sized to hold the largest variant of the sum type - that could be a huge productivity boon in terms of designing things like decoders.

I do see this, perhaps that's where one could begin to work towards implementing sum types?

@ThePerfectComputer
Copy link
Author

They're a particular team at a well known company that may be able to use RustHDL in production. I do think however that Sum Types could really help.

@samitbasu
Copy link
Owner

That is a good point. I never thought of them for hardware designs. But I don't see a priori why you could not add them. There is already the notion of both enums and structs. I will work on some concepts. Thanks for the suggestion!

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

No branches or pull requests

2 participants