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

Use VERILOG_INCLUDE_DIRS in Verilator #661

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fkwilken
Copy link

Copy link
Member

@donn donn left a comment

Choose a reason for hiding this comment

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

Thanks for the catch! Just a minor issue. :)

@@ -158,6 +163,10 @@ def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
if self.config["LINTER_ERROR_ON_LATCH"]:
extra_args.append("--Werror-LATCH")

if include_dirs := self.config["VERILOG_INCLUDE_DIRS"]:
include_flags = ["-I" + str(dir) for dir in include_dirs]
Copy link
Member

Choose a reason for hiding this comment

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

The way you've coded this, all the includes would be one argument, which, so if you have two directories, it would be:

-Idir1 -Idir2

This would include the directory literally named dir1 -Idir2, which is neither directory.

This can be fixed pretty easily: Replace 167, 168 with just this.

Suggested change
include_flags = ["-I" + str(dir) for dir in include_dirs]
extra_args.extend([f"-I{dir}" for dir in include_dirs])

Copy link
Author

Choose a reason for hiding this comment

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

Nice change, implemented!

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.

2 participants