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

include of a defined filename #1324

Closed
veripoolbot opened this issue Jul 18, 2018 · 2 comments
Closed

include of a defined filename #1324

veripoolbot opened this issue Jul 18, 2018 · 2 comments
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: John DeRoo
Original Redmine Issue: 1324 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


I have inherited a System Verilog test environment that has a top.sv that instantiates the dut and which also has an initial block to run the phases of the testing. It uses a macro passed in from the command line to define the file that has the specific test that is to be run. So, at the top of the file, it has

`include `TEST

However, emacs mode complains "Can't find Verilog-read-defines file: 'TEST", which I more or less expected. So I created a trivial test file and added

`ifndef TEST
`define TEST "./empty_test.sv"
`endif

before the include. I still get the same error. As a test, I commented out the include `TEST and replaced it with

`include "./empty_test.sv"

And that worked. I then changed the `include back and ran emacs -q to make sure there was nothing in my .emacs that overrode defaults - still had the problem. To see if there was something else in the design that was causing the problem I took the files involved and stripped them down to what I think is the bare minimum, and the problem remained. At the end of the file I have a fairly standard emacs-mode footer:

///////////////////////////////////////////////////////////////////////////////
// Local Variables:
// verilog-library-directories: (".")
// eval:(verilog-read-defines)
// eval:(verilog-read-includes)
// End:

I don't really like the model of using command line arguments to define the file to be included, but that seems to be pretty widespread in this environment and I need to resolve several other bigger issues before I change that aspect of the environment. Am I doing something wrong? Is there some way to get verilog mode to either expand the TEST before evaluating the include, or just ignore this construction altogether?

If it helps, I can provide the test files.

Thanks,
John DeRoo

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-07-18T22:51:35Z


Expanding defines that are already defined is simple enough. Hopefully this is sufficient.

Fixed in git and verilog-mode-2018-07-18-b1e6a89-vpo.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: John DeRoo
Original Date: 2018-07-20T13:18:19Z


Thanks - that resolved the problem.

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

No branches or pull requests

2 participants