Verible report on 'regtool' generated file, ast_reg_pkg.sv
The LOG:
/ip_os/ast/rtl/ast_reg_pkg.sv:21:5: struct definitions always should be named using typedef. [Style: typedef-structs-unions] [typedef-structs-unions] ./ip_os/ast/rtl/ast_reg_pkg.sv:24:5: struct definitions always should be named using typedef. [Style: typedef-structs-unions] [typedef-structs-unions] ./ip_os/ast/rtl/ast_reg_pkg.sv:27:5: struct definitions always should be named using typedef. [Style: typedef-structs-unions] [typedef-structs-unions] ./ip_os/ast/rtl/ast_reg_pkg.sv:30:5: struct definitions always should be named using typedef. [Style: typedef-structs-unions] [typedef-structs-unions]
The actual code example:
20 typedef struct packed { 21 struct packed { 22 logic q; 23 } field0; 24 struct packed { 25 logic q; 25 } field1; 27 struct packed { 28 logic q; 29 } field4; 30 struct packed { 31 logic [7:0] q; 32 } field15_8; 33 } ast_reg2hw_rwtype1_reg_t;
How are you running Verible to get this warning? If you run it through the dvsim lint flow that we use, I think it's waived (see hw/lint/tools/veriblelint/rules.vbl).
/usr/local/opentitan/tools/verible/0.0-883-g2af116e/bin/verible-verilog-lint ast_reg_pkg.sv
Checking all the files using verible and not dvsim. Will add the waiver file to the run. Also will try to switch to dvsim as in CI.
Alternatively you can run the linters directly through fusesoc (which is what dvsim does under the hood):
cd $REPO_TOP # your opentitan repo checkout
fusesoc --cores-root=. run --target=lint --tool=veriblelint lowrisc:systems:ast:0.1