-
Notifications
You must be signed in to change notification settings - Fork 154
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
Invalid namespace reference in generated VHDL (for Synplify) #1996
Comments
I should have specified, this is Clash 1.2, I have not tested on a more recent version yet. |
Similar to ece7f26 for SystemVerilog, types should not appear qualified in the package body for the types package in VHDL. Fixes #1996. NOTE: To avoid backporting the changes for compatibility with prettyprinter-1.7.1, a more restrictive bound is set in this branch. (cherry picked from commit 5c6bf8b)
Similar to ece7f26 for SystemVerilog, types should not appear qualified in the package body for the types package in VHDL. Fixes #1996. NOTE: To avoid backporting the changes for compatibility with prettyprinter-1.7.1, a more restrictive bound is set in this branch. (cherry picked from commit 5c6bf8b)
@basile-henry The fix for this has been backported to 1.4 and 1.2 now. I don't think we automate builds from the 1.2 branch anymore though, but it gives you a way to get the fix without forcing you to upgrade to 1.4 immediately |
Great, thank you very much @alex-mckenna ! I can confirm this fix on the 1.2 branch fixes our issue. 🎉 😄 |
Clash generates VHDL that is not considered valid by Synopsis' Synplify Pro tool.
The following clash code:
Generates the following VHDL for the types file (the
topentity.vhdl
is straight forward and not relevant for this issue):vhdl/Main/main_types.vhdl
:Synplify Pro errors out with:
The issue as far as I understand it is that Synplify Pro doesn't like qualified/namespaced names used inside of the namespace definition itself. Maybe it's not in scope yet?
It could very well just be an issue with that tool, since Vivado and Quartus are happy with such VHDL. But it would be nice for Clash to generate code without these qualified names. Do these even need to be qualified anyway? Is it ever ambiguous what they refer to? If so, maybe Clash could have a flag to opt in to generate unqualified names.
The current workaround we have is to apply
sed -i '/^use work/b; s/main_types\.//g'
to this type file, after which Synplify Pro works just fine.The text was updated successfully, but these errors were encountered: