Large numbers silently truncated
module bigint(input clk, output reg [128:0] cnt); always @(posedge clk) cnt = cnt + 129'hdeadbeefc001f00ddeadbeefc001f00ddeadbeefc001f00ddeadbeefc001f00d; endmodule // bigint
In the above code no warnings are issued when the 256 bit number is silently truncated to 129 bits. However if the 129 is changed to 128, the correct message 'too many digits', is correctly issued. Feel free to use this for the regression suite if wanted.
Also available in: Atom