-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Description
VerilogTranslationPass
fail with the following example.
def mk_aType(a: int = 4, b: int = 6):
return mk_bitstruct(
"aType",
{
"a": mk_bits(a),
"b": mk_bits(b),
"const": mk_bits(32),
},
namespace={},
)
class test(Component):
def construct(s, t):
s.in_ = InPort(t)
if __name__ == "__main__":
m = test(mk_aType())
m.elaborate()
m.set_metadata(VerilogTranslationPass.enable, True)
m.apply(VerilogTranslationPass())
When running verilator --lint-only ./test__t_aType__a_4__b_6__const_32__pickled.v
will give the following error.
%Error: test__t_aType__a_4__b_6__const_32__pickled.v:10:16: syntax error, unexpected const
10 | logic [31:0] const;
| ^~~~~
%Error: Exiting due to 1 error(s)
Fixing is easy as I can just not name things with the System Verilog key. But I will still report it as you have checks in place to prevent this, and the check fails to detect it.
Metadata
Metadata
Assignees
Labels
No labels