-
Notifications
You must be signed in to change notification settings - Fork 175
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
vendor._gowin: fix clock name quotes for Gowin IDE #1501
vendor._gowin: fix clock name quotes for Gowin IDE #1501
Conversation
I don't think this change is correct, as it doesn't handle As far as I know there is no way to escape a lone |
Hi and thanks for your review, I'm not sure what you're expecting from the def tcl_escape_brace(string):
if string.count("{") != string.count("}"):
raise ValueError("Unbalanced braces in string")
return f"{{{string}}}" Also, it seems like Gowin's SDC parser really doesn't like braces in names. Both of the following statements generate syntax errors:
So I'm not sure that what we're trying to fix here is meaningful. FWIW I'm running the latest version available of Gowin IDE (V1.9.10.02 build 75964). |
Oh, depressing. So they don't even try to accept correct Tcl. (The reason I bring up braces in names at all is that using |
I think I'll disassemble their Tcl parser and take a look to see what the grammar is, and if that fails to happen in a timely manner I'll merge this PR as-is. |
The lexer lives in the function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Gowin IDE seems unhappy with quotes in clock signal names. For instance, with the following SDC: create_clock -name "clk50_0__io" -period 20.0 [get_ports {clk50_0__io}] Gowin IDE will complain with the following error message: ERROR (TA2000) : "top.sdc":2 | 'syntax error' near token '-period' Changing quotes with curly braces fixes the issue.
a285a73
to
bcef275
Compare
Gowin IDE seems unhappy with quotes in clock signal names. For instance, with the following SDC:
Gowin IDE will complain with the following error message:
Replacing quotes with curly braces fixes the issue. I tested this fix on Amaranth 0.5.1.