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

vendor._gowin: fix comment syntax for add_preferences #1563

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

wipeseals
Copy link
Contributor

Amaranth version

0.6.0.dev76

minimal program that demonstrates

run TangNano9kPlatform().build(AnyElaboratableClass(), do_program=True)

Warning: Invalid constraint: # (add_preferences placeholder)
1 warning, 0 errors

What you expected to happen, and what actually happened

Tracing the cause from the error logs, the problem is probably in the commented out text appended by default in add_preferences.

The IO constraints file (.cst) in the gowin platform handles commentouts with //, but add_preferences handles them with #.

I assume that it is probably mistaken for commentout in .ys.

// Automatically generated by Amaranth 0.6.0.dev76. Do not edit.
IO_LOC “clk27_0__io” 52;
IO_PORT “clk27_0__io” IO_TYPE=LVCMOS33;

(snip)

IO_LOC “button_1__io” 4; ...
IO_PORT “button_1__io” IO_TYPE=LVCMOS33;
IO_LOC “uart_0__tx__io” 17;
IO_PORT “uart_0__tx__io” PULL_MODE=UP;
IO_PORT “uart_0__tx__io” IO_TYPE=LVCMOS33;
# (add_preferences placeholder)

Copy link
Member

@whitequark whitequark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@whitequark whitequark added this pull request to the merge queue Feb 8, 2025
Merged via the queue into amaranth-lang:main with commit 9f9ea2c Feb 8, 2025
46 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants