Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion dv/cs_registers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ else
$(TOOLDIR)share/verilator/include \
$(TOOLDIR)share/verilator/include/vltstd \
/usr/share/verilator/include \
/usr/share/verilator/include/vltstd \
/usr/local/share/verilator/include \
/usr/local/share/verilator/include/vltstd \
/opt/verilator/share/verilator/include \
$(HOME)/verilator/include
/opt/verilator/share/verilator/include/vltstd \
$(HOME)/verilator/include \
$(HOME)/verilator/include/vltstd
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if I think it's a good idea to list all possible paths where Verilator is installed. What's the problem with requiring people to define verilator root?

Copy link
Author

Choose a reason for hiding this comment

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

I defined verilator root and still couldn't find the svdpi header file.

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the problem I'm on board with adding the "vlstd" path to the Verilator root, but I don't think it's a good idea to add all the possible locations where Verilator could be installed.


# Find first valid include path
VERILATOR_INCLUDE := $(firstword $(foreach dir,$(VERILATOR_INCLUDE_PATHS),$(if $(wildcard $(dir)/svdpi.h),$(dir),)))
Expand All @@ -48,6 +52,7 @@ else
$(warning Searched in: $(VERILATOR_INCLUDE_PATHS))
$(warning You can manually specify it using: make build-csr-test INCLUDES="-I/path/to/verilator/include -I./env -I./rst_driver -I./reg_driver -I./model")
$(warning Or set VERILATOR_ROOT environment variable pointing to your Verilator installation)
VERILATOR_INCLUDE = # Leave empty or set a default fallback path if applicable
endif
endif

Expand Down