opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[dv/ci] Verible doesn't understand stream_expression used in test_vectors_pkg.sv

Open rswarbrick opened this issue 5 years ago • 4 comments

This causes Verible to fail for DV sources for hmac and kmac. To see it, run:

util/dvsim/dvsim.py hw/top_earlgrey/lint/top_earlgrey_dv_lint_cfgs.hjson --max-parallel=1 --tool=veriblelint --select-cfgs kmac

and then look at the log file to see something like this:

../src/lowrisc_dv_test_vectors_0/test_vectors_pkg.sv:333:48: syntax error, rejected "with" (https://github.com/google/verible).

The error messages don't make it out to the console because of a bug fixed in #5026, but we can't land that fix until we fix the lint errors. (Incidentally, the branch for that PR won't show the syntax errors in the auto-generated CSR FPV tests, because we remove them from the run: see the last commit there for details).

@udinator: I think you added the relevant lines. Is there a way to express this code without the streaming operators?

@msfschaffner: FYI

rswarbrick avatar Feb 18 '21 14:02 rswarbrick

Yup,there should be a way (though less efficient) to express the same operation without streaming operators.

@msfschaffner do you think this is worth filing a bug on Verible for? The with expression in streaming operators is considered part of the LRM, so I'm not quite sure why Verible throws an error here.

udinator avatar Feb 18 '21 16:02 udinator

Yes, always file bugs for unsupported syntax in Verible. Usually those things are fixed quickly.

imphil avatar Feb 18 '21 16:02 imphil

Yes, please file an issue and a bug for this.

The streaming operator is indeed part of the LRM, but even commercial tools other than simulators had issues with that operator until just recently. In the mean time, if this is fixable by rewriting the code a bit, I would consider doing so.

msfschaffner avatar Feb 19 '21 18:02 msfschaffner

Fixed with #5318.

rswarbrick avatar Feb 22 '21 08:02 rswarbrick