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

Passing string define from a runner fails #3500

Closed
Lockedloop opened this issue Nov 8, 2023 · 2 comments
Closed

Passing string define from a runner fails #3500

Lockedloop opened this issue Nov 8, 2023 · 2 comments

Comments

@Lockedloop
Copy link

I am running cocotb-1.8.0 and trying to create a string macro via runner.
E.g. I want to achieve define MACRO_NAME "some-string" using runners and Questa simulator.
Adding an entry in the defines dictionary defines["MACRO_NAME"] = "some_string" results in "+define+MACRO_NAME=some_string".
I also tried defines["MACRO_NAME"] = "\"some_string\"" , resulting in "+define+MACRO_NAME=\"some_string"", but the simulation fails with the error message

 (vlog-7300) Actual expression for parameter 'MACRO_NAME' in module instance 'my_module' must be constant.

Everything works fine for integer parameters, so it seems to me it is an issue of the "stringification" in the Questa simulator function in runner.py.

Thank you!

@ktbarrett
Copy link
Member

Addressed by #3391.

@Lockedloop
Copy link
Author

I see, it seems to be the same problem. Closing this issue and keeping an eye out at #3391 for a solution. Thanks!

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

No branches or pull requests

2 participants