You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Valid syntax rejected. Verible-verilog-syntax does not allow 'protect in the following cases:
anywhere within a primitive definition
between module name and port list
Version
% verible-verilog-syntax --version
v0.0-3471-g9cb45092
Commit 2023-12-23
Built 2023-12-23T08:07:18Z
To Reproduce
The following code all fails verible-verilog-syntax with syntax errors:
// protect keyword between primitive name and port listprimitive mux_p1
`protect
(out, sel, a, b);
output out;
input sel, a, b;
table// sel a b out01 ? : 1;
00 ? : 0;
1 ? 0 : 0;
1 ? 1 : 1;
x00 : 0;
x11 : 1;
endtable
`endprotect
endprimitive
// protect keyword after primitive port listprimitive mux_p2 (out, sel, a, b);
`protect
output out;
input sel, a, b;
table// sel a b out01 ? : 1;
00 ? : 0;
1 ? 0 : 0;
1 ? 1 : 1;
x00 : 0;
x11 : 1;
endtable
`endprotect
endprimitive
// protect keyword between module name and port listmodulemux_m
`protect
(out, sel, a, b);
output out;
input sel, a, b;
assign out = sel? a : b;
`endprotect
endmodule
Run
verible-verilog-syntax testme.sv with any of the above
Actual behavior:
Code rejected - error messages shown here are for the first case above:
testme.sv:4:1-8: syntax error at token "`protect"
testme.sv:6:3-8: syntax error at token "output"
testme.sv:7:3-7: syntax error at token "input"
testme.sv:9:3-7: syntax error at token "table"
testme.sv:12:7: syntax error at token "0"
testme.sv:13:7: syntax error at token "1"
testme.sv:14:7: syntax error at token "1"
testme.sv:15:7: syntax error at token "x"
testme.sv:16:7: syntax error at token "x"
testme.sv:17:3-10: syntax error at token "endtable"
Expected behavior
Accepts syntax
The text was updated successfully, but these errors were encountered:
Describe the bug
Valid syntax rejected. Verible-verilog-syntax does not allow
'protect
in the following cases:Version
To Reproduce
The following code all fails verible-verilog-syntax with syntax errors:
Run
verible-verilog-syntax testme.sv with any of the above
Actual behavior:
Code rejected - error messages shown here are for the first case above:
Expected behavior
Accepts syntax
The text was updated successfully, but these errors were encountered: