Forum Discussion
Altera_Forum
Honored Contributor
12 years agomodule mux8 (
output reg y = 8'd4,
input wire a,
input wire b,
input wire en);
...
y <= a ? y : y + 1;
endmodule The code example doesn't seem to make sense without an edge-sensitive always block. P.S.: The workaround must increment yreg instead of output variable y.