Forum Discussion
Altera_Forum
Honored Contributor
7 years ago --- Quote Start --- This is a quirk of Verilog. Reg is just a data type in the Verilog. What it maps to in logic is down to the behavior in the code. It is just unfortunate they chose the name "reg" --- Quote End --- Yes, indeed, sir. I found both the code snippets below generate the desired combinational logic. I would guess the 2nd one might be frowned upon. Would you be able to recommend a book that covers these sorts of issues? It would be nice to find one that is written in Verilog 2001. Thanks again, -J
always @ (KEY,count)
case(KEY)
0 : LED = count;
1 : LED = count;
endcase
always @ (KEY)
case(KEY)
0 : LED = count;
1 : LED = count;
endcase