Blog‎ > ‎

Verilog code for 8-bit counter

nodule register8(D, clock, reset, Q);
input [7:0] D;
input clock, reset;
output Q [7:0] Q;

always @ (posedge clock or negdge reset)
   if(reset)
      Q <= 0;
   else
      Q <- D;
endmodule;
Comments