From: Niels M. <ni...@ly...> - 2023-03-30 06:08:00
|
Hi, I've noticed that icarus verilog doesn't like this piece of code: module foo(input [7:0] x, output y); assign y = !&x; endmodule I'm running Icarus Verilog version 13.0 (devel) (s20141205-283-g437dc10), and it complains error: Operand of unary ! is not a primary expression. Other tools, in particular yosys, seems to accept this syntax, and in general, I had expected that any stacking of unary operators is syntactically ok. Adding a pair of parentheses makes iverilog accept it, like module foo(input [7:0] x, output y); assign y = !(&x); endmodule So my question is, what does the spec for verilog syntax say? Regards, /Niels -- Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677. Internet email is subject to wholesale government surveillance. |