Skip to content

Commit

Permalink
Size method in if expression inside randomize...with (wrong warning)
Browse files Browse the repository at this point in the history
Warning message does not contain an expression that causes the problem:
%Warning-CONSTRAINTIGN: /path/riscv-dv/src/riscv_instr_stream.sv:286:51: Unsupported: randomizing this expression, treating as state
                        /path/riscv-dv/src/riscv_instr_pkg.sv:1589:1: ... note: In file included from 'riscv_instr_pkg.sv'
                        ... For warning description see https://verilator.org/warn/CONSTRAINTIGN?v=5.031
                        ... Use "/* verilator lint_off CONSTRAINTIGN */" and lint_on around source to disable this message.

Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Dec 16, 2024
1 parent a192727 commit 3cae8dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/riscv_instr_stream.sv
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class riscv_rand_instr_stream extends riscv_instr_stream;

function void randomize_gpr(riscv_instr instr);
`DV_CHECK_RANDOMIZE_WITH_FATAL(instr,
if (avail_regs.size() > 0) {
if (1 > 0) {
if (has_rs1) {
rs1 inside {avail_regs};
}
Expand Down

0 comments on commit 3cae8dd

Please sign in to comment.