core-v-mcu
core-v-mcu copied to clipboard
944 warnings raised by Verilator
We build the Verilator model as follows:
fusesoc --cores-root . run --target=lint --setup --build openhwgroup.org:systems:core-v-mcu
Verilator raises 944 warnings. The warnings and frequency counts are:
ALWCOMBORDER 1
CASEINCOMPLETE 40
CASEX 4
CMPCONST 2
COMBDLY 2
IMPLICIT 220
LATCH 6
MULTIDRIVEN 3
PINMISSING 149
REDEFMACRO 7
STMTDLY 1
UNOPTFLAT 27
UNSIGNED 2
WIDTH 480
WIDTHCONCAT 7
These should all be investigated and either fixed or be marked as ignored. Note that UNOPTFLAT will have an impact on Verilator model performance.
Hi @jeremybennett, which version of Verilator are you using? I ask, not because I have a particular opinion, but because Verilator seems to change its behaviour a good deal from one version to the next. I'll switch to whatever you recommend.
@MikeOpenHWGroup - sorry forgot to add this in. It is today's top of tree:
$ verilator --version
Verilator 4.203 devel rev v4.202-43-gaba38830
I did notice that you need a pretty up to date Verilator to build the MCU at all.
From an RTL perspective I'd say we need to prioritize:
IMPLICIT 220
PINMISSING 149
MULTIDRIVEN 3
which, unfortunately, make up quite some amount of pins... Before we start I would also suggest we take the action to set-up CI so that we, once we fixed them, do not introduce more by adding new code!
@zarubaf This is not a valid reason for closing this issue. You've just created a waiver file to ignore all the warnings. The issue is about addressing the warnings!
Hi @zarubaf and @jeremybennett, what is the status of this issue?
There are two aspects to this
-
Verilator warnings are useful because they indicate potential sub-optimal design and hence potential bugs. So they should be investigated, and if they are not an issue, the RTL can be tagged with Verilator comments to prevent the individual warning.
-
Some Verilator warnings are indicative of potential performance problems in the generated model. The one that stands out here is
UNOPTFLAT
but that already has its own issue #140. Some of the others may also have a small effect.
Really the warnings should be triaged into multiple issues and addressed separately, as we have done for all the UNOPTFLAT
warnings. I suggest keeping the issue open, but not fixing it for 1.0.0.
It actually got worse. The waiver file has been compromised during merging outdated branches. I think we are back at square one with this.
@gmartin102 has agreed to investigate this, but it will not gate RTL Freeze because:
- Synopsys DC lint warnings and errors are higher priortiy (and not yet fully resolved)
- Many Verilator lint warnings are due to tool, not code issues.