-
Notifications
You must be signed in to change notification settings - Fork 548
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
Fix Verilator 5.010 compilation error #2042
base: master
Are you sure you want to change the base?
Conversation
Hi there! Sorry for the slow response. I'm a bit confused because I don't see these errors when I build locally. When I start with a clean repository, I see something like this:
Maybe this means I'm doing something different from you? Can you share the way you're running Verilator that gets these errors? Many thanks. |
I have followed the instructions provided in the "Ibex Simple System README" to build the system. Below are the versions of Python and Verilator that I am using: ❯ python --version
Python 3.10.11
❯ verilator --version
Verilator 5.010 2023-04-30 rev UNKNOWN.REV When I executed the command: fusesoc --cores-root=. run --target=sim --setup --build lowrisc:ibex:ibex_simple_system --RV32E=0 --RV32M=ibex_pkg::RV32MFast or make build-simple-system I encountered a compilation error in Verilator. The error was specifically related to the usage of the keywords "MULTIDRIVEN" and "BLKSEQ" in the file "ibex_tracer.sv". And if I change to Verilator 5.006, everything will be fine. ❯ verilator --version
Verilator 5.006 2023-01-22 rev v5.006 |
This is done properly in that PR: see the comments there for extra info (and don't merge this!)
Ahh! Sorry for the stupidity: I had misread the version number in your original report. The error about For those bits, I'm very happy with this change, but please could you also add a comment that says something the following? "Tell Verilator not to worry about writing to this variable. It thinks that we're doing so from several processes, contradicting IEEE 1800-2017 9.2.2.2, because it can't see that the other sites are only called from this process". The other bit (where Verilator warns about a blocking assignment in a sequential logic process) is sort of similar: we happen to know that we're only writing and reading the variable in this process. I think we can write things in a way that Verilator will understand, though, which might be nicer than waiving the warning. Could you change the logic so that we only update Would you mind updating this PR correspondingly? Many thanks! |
These days, I have identified the commit that caused the errors in Verilator. However, I am not familiar enough with Verilator's code to fix it. Additionally there is a similar issue For now, I have decided to give up on fixing Verilator's code. Instead, I will update the PR correspondingly in this week. |
Verilator was throwing a compilation error due to MULTIDRIVEN and BLKSEQ in ibex_tracer.sv This change ensures successful compilation with Verilator 5.010
a7d1ef7
to
77e87a4
Compare
I have updated this commit. 👋 |
Your suggestion makes Maybe the best sulution is just add a lint_off to verilator. ERROR: %Error-BLKANDNBLK: ../src/lowrisc_ibex_ibex_tracer_0.1/rtl/ibex_tracer.sv:84:16: Unsupported: Blocked and non-blocking assignments to same variable: 'u_top.u_ibex_tracer.xfile_handle'
: ... In instance ibex_simple_system
84 | reg [31:0] xfile_handle;
| ^~~~~~~~~~~~
../src/lowrisc_ibex_ibex_tracer_0.1/rtl/ibex_tracer.sv:754:15: ... Location of blocking assignment
754 | $fclose(xfile_handle);
| ^~~~~~~~~~~~
../src/lowrisc_ibex_ibex_tracer_0.1/rtl/ibex_tracer.sv:125:7: ... Location of nonblocking assignment
125 | xfile_handle <= file_handle;
| ^~~~~~~~~~~~
... For error description see https://verilator.org/warn/BLKANDNBLK?v=4.228
%Error: Exiting due to 1 error(s)
... See the manual at https://verilator.org/verilator_doc.html for more assistance.
make[1]: *** [Makefile:16:Vibex_simple_system.mk] 错误 1
ERROR: Failed to build lowrisc:ibex:ibex_simple_system:0 : '['make', '-j', '12']' exited with an error: 2 |
error log
Verilator was throwing a compilation error due to
MULTIDRIVEN and BLKSEQ in ibex_tracer.sv
This change ensures successful compilation with Verilator 5.010