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

Hardcode `fromInteger` for `Signed` and `Unsigned` #9

Closed
christiaanb opened this issue May 12, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@christiaanb
Copy link
Contributor

commented May 12, 2014

Currently, the fromInteger functions for Signed and Unsigned are handled through the normal BlackBox mechanism: they are translated to to_signed and to_unsigned respectively.

This is however a problem when they are applied to an integer literal that is larger than 32-bits, as most VHDL tooling does not support integer literals larger than the 32-bit 2-complements representation. When this happens, we should write the the integers as a bit-string; we can't do this in the BlackBox definitions, as the templates are logic-less and so they can't determine if they are applied to a literal yes or no.

We must hence implement these two functions directly in the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.