Linting issues
Hi,
I've been running Verilator in its linting mode and there are quite a few errors that need to be fixed. I've made the easy fixes but there are a few that need clarification.
You can see the simple fixes here: https://github.com/NuQuantum/urv-core/commit/87531fca8366dfae91d35f01b6517ec029e6ee81
For the ones that need input, they are all currently waived in this waiver file.
There are some width mismatches in the multiplier that I could work out the intent for:
ERROR: %Warning-WIDTHEXPAND: src/ohwr_urv_cpu_core_0/rtl/urv_multiply.v:258:32: Operator ASSIGNW expects 64 bits on the Assign RHS, but Assign RHS's VARREF 'yl_xl' generates 36 bits.
: ... In instance urv_cpu.execute.genblk1.multiplier
258 | wire [63:0] yl_xl_ext = yl_xl;
| ^
... For warning description see https://verilator.org/warn/WIDTHEXPAND?v=5.014
... Use "/* verilator lint_off WIDTHEXPAND */" and lint_on around source to disable this message.
%Warning-WIDTHTRUNC: src/ohwr_urv_cpu_core_0/rtl/urv_multiply.v:259:32: Operator ASSIGNW expects 64 bits on the Assign RHS, but Assign RHS's REPLICATE generates 68 bits.
: ... In instance urv_cpu.execute.genblk1.multiplier
259 | wire [63:0] yh_xl_ext = { {15{yh_xl[35] } }, yh_xl, 17'h0 };
| ^
%Warning-WIDTHTRUNC: src/ohwr_urv_cpu_core_0/rtl/urv_multiply.v:260:32: Operator ASSIGNW expects 64 bits on the Assign RHS, but Assign RHS's REPLICATE generates 68 bits.
: ... In instance urv_cpu.execute.genblk1.multiplier
260 | wire [63:0] yl_xh_ext = { {15{yl_xh[35] } }, yl_xh, 17'h0 };
| ^
%Warning-WIDTHTRUNC: src/ohwr_urv_cpu_core_0/rtl/urv_multiply.v:261:32: Operator ASSIGNW expects 64 bits on the Assign RHS, but Assign RHS's REPLICATE generates 70 bits.
: ... In instance urv_cpu.execute.genblk1.multiplier
261 | wire [63:0] yh_xh_ext = { xh_yh, 34'h0 };
| ^
%Error: Exiting due to 4 warning(s)
make: *** [Makefile:23: lint-only] Error 1
ERROR: Failed to build ohwr:urv:cpu_core:0 : '['make', 'lint-only']' exited with an error: 2
Then there are a bunch of other errors that need to be fixed that include:
- Missing generate block names
- Incomplete case statements that probably just require unused states to be defined.
- module names not match file names
- the use of non-blocking statements in combinational always blocks
I'm happy to help sort these out and issue a pull request if you can help with the width mismatches.
Shareef.