chip design made easy

Popular Pages

online Verilog Code for counter

Verilog code sample for counter.

module counter (Clk, CLR, Q_out);
input Clk, CLR;
output [3:0] Q_out;
reg [3:0] temp;

always @(posedge Clk or posedge CLR)
begin
if (CLR)
temp = 4'b0000;
else
temp = temp + 1'b1;
end
assign Q_out = temp;
endmodule


People found these links also interested and knowledgeable

Register Transfer Language Discussions

Popular columns


Pool of Chip Articles are available.....