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

Fix module names in export of verilog testbenches #1288

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

olofos
Copy link

@olofos olofos commented May 1, 2024

When exporting verilog testbenches, module names are not properly escaped.

For example, if the file "My-file" contains a test named "My-test" then the module declaration for the testbench will start with module My-file_My-test_tb; and the instantiation of the "My-file" module will look like \My-file \My-file 0 (...). In both cases the hyphen makes the names illegal verilog identifiers.

With this PR you will instead get module \My-file_My-test_tb ; and \My-file \My-file0 (...)

I've added a new test file in "src/test/resources/dig/hdl_names/a-b.dig" and two tests that use this file. I'm not sure if this is the nicest way of writing these tests

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 this pull request may close these issues.

None yet

1 participant