Ponmalar21
Newbie level 4
![Newbie level 4](/styles/images/ranks/blevel1.gif)
Debug the error in the following verilog code:
Code Verilog - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 module ring_count(q,clk,clr); input clk,clr; output [3:0]q; reg [3:0]q; always @(posedge clk) if(clr==1) q<=4′b1000; else begin q[3]<=q[0]; q[2]<=q[3]; q[1]<=q[2]; q[0]<=q[1]; end endmodule
Last edited by a moderator: