-
Notifications
You must be signed in to change notification settings - Fork 45
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
base: main
Are you sure you want to change the base?
Use VERILOG_INCLUDE_DIRS in Verilator #661
Conversation
Signed-off-by: fkwilken <[email protected]>
Signed-off-by: fkwilken <[email protected]>
There was a problem hiding this 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. :)
openlane/steps/verilator.py
Outdated
@@ -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] |
There was a problem hiding this comment.
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.
include_flags = ["-I" + str(dir) for dir in include_dirs] | |
extra_args.extend([f"-I{dir}" for dir in include_dirs]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change, implemented!
Signed-off-by: fkwilken <[email protected]>
Similar to The-OpenROAD-Project/OpenLane#2046