-
Notifications
You must be signed in to change notification settings - Fork 629
Environment Setup and Makefile Target Errors #2277
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
base: master
Are you sure you want to change the base?
Conversation
Add -fexceptions flag to verilator CFLAGS to support C++ exception handling in the simple system simulation environment.
Something seems rather odd about the first commit. I think that GCC defaults to |
Well I built verilator from their GitHub repository. Would that be causing this issue? |
@rswarbrick can you test things out using the environment details I provided? |
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.
Interesting that you need to add these include directories relative to verilator root. I appreciate you putting the effort into getting the Verilator root directly from Verilator.
@marnovandermaas @rswarbrick Here you go, added appropriate changes. Please review. |
@marnovandermaas @rswarbrick any feedback on this? |
@@ -175,7 +175,7 @@ targets: | |||
- '--trace-structs' | |||
- '--trace-params' | |||
- '--trace-max-array 1024' | |||
- '-CFLAGS "-std=c++14 -Wall -DVM_TRACE_FMT_FST -DTOPLEVEL_NAME=ibex_simple_system -g"' | |||
- '-CFLAGS "-std=c++14 -Wall -fexceptions -DVM_TRACE_FMT_FST -DTOPLEVEL_NAME=ibex_simple_system -g"' |
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.
Rupert mentioned that this flag should be enabled by default. Do you know why you need this explicitly? Do you still need this after you changed to the lowRISC toolchain?
@@ -8,7 +8,7 @@ COMMON_SRCS = $(wildcard $(COMMON_DIR)/*.c) | |||
INCS := -I$(COMMON_DIR) | |||
|
|||
# ARCH = rv32im # to disable compressed instructions | |||
ARCH ?= rv32imc | |||
ARCH ?= rv32imc_zicsr |
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.
Do you mind squashing this change to remove it from the commit history?
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.
Sure, will let you know once I'm done.
$(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 |
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.
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?
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.
I defined verilator root and still couldn't find the svdpi header file.
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.
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.
I cloned the repository and followed the steps outlined in the README.md. To verify functionality, I ran the following Makefile targets. However, I encountered errors in both cases. Screenshots of the corresponding error logs are attached below.
Target/Issue No. 1: make build-simple-system
When I run
make build-simple-system
I get the following error:Target/Issue No. 2: make build-csr-test
When I run
make build-csr-test
I get the following error:Environment Details
Please let me know if any additional setup steps are required or if the errors are known issues with the current branch/version. I'm happy to help troubleshoot further.