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

make gpio_defaults can incorrectly parse user_defines.v Verilog block comments #539

Open
amm-efabless opened this issue May 1, 2024 · 1 comment · May be fixed by #542
Open

make gpio_defaults can incorrectly parse user_defines.v Verilog block comments #539

amm-efabless opened this issue May 1, 2024 · 1 comment · May be fixed by #542

Comments

@amm-efabless
Copy link

When you run make gpio_defaults on a caravel_user_project, it parses the contents of verilog/rtl/user_defines.v and we've noticed an issue where Verilog block comments are parsed incorrectly and treated as real code.

The following code should result in mag/gpio_defaults_block_1111.mag being created, but instead it uses the value in the comments and so creates mag/gpio_defaults_block_1eee.mag:

`define USER_CONFIG_GPIO_37_INIT 13'h1111
/*
`define USER_CONFIG_GPIO_37_INIT 13'h1eee
*/

...and thus it looks like the latter (unintended, commented) value gets used in synthesis.

I think this came to light because of @d-m-bailey running a check per #532

@d-m-bailey d-m-bailey linked a pull request May 3, 2024 that will close this issue
@amm-efabless
Copy link
Author

@DavidRLindley FYI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant