Verilog hates you. If reg [7:0] wptr; and wptr=255 these expressions are complet...
Flux @WillFlux@mastodon.social
Verilog hates you.
If reg [7:0] wptr; and wptr=255 these expressions are completely different:
wptr + 1 == 0
wptr + 1'b1 == 0
I blogged about this yet it still caught me out: "Verilog uses the width of the widest operand when evaluating an expression".
The width of 1 is 32 bits because #Verilog.