-
Notifications
You must be signed in to change notification settings - Fork 267
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
Constraints on generic types #588
Comments
|
Using base32 would be even more safe since it only has alphanumericals. It takes more space but that shouldn't be a concern for our use case. We could even do base16 (hex) for easier implementation. I can have a go at this. I'll probably try to push the VHDL decoding part to the JSON4VHDL project. Any comments @Paebbels? |
IIRC, the main limitation of the current implementation of JSON-for-VHDL is that it is synthesisable. For example, the maximum length of the file to be read is hardcoded. Precisely, constant |
I'm fine with base32 or base16, however I fear that the different simulator vendors all have different, arbitrary limits on lengths of generics that can be passed in via command line... |
While working on #595, I found https://github.com/VUnit/vunit/blob/master/tests/acceptance/artificial/vhdl/tb_set_generic.vhd. If that test passes in all the supported simulators, generics of type real should be supported. Hence, I am curious about the comments by @dstadelm and @LarsAsplund that are quoted above. In which context do generics of type real fail? |
If I use a real value for tb_axi_stream I get: /usr/local/bin/ghdl:error: unhandled type for generic override of 'g_stall_master' |
@dstadelm, you are correct. It seems that GHDL does supports real values as generics of a top-level entity, as long as a default value is provided and it is not overwritten through CLI args. That's why: https://github.com/VUnit/vunit/blob/master/tests/acceptance/artificial/vhdl/run.py#L63-L66 |
This issue is related to using JSON to pass complex generics, as it is done in example
json2vhdl
. As commented in 45870be#r36112229, it might be desirable to split/extend the example to three separate tests:The text was updated successfully, but these errors were encountered: