8-bit register with synchronous reset
module reg8 (Q, reset, CLK, D);
input reset;
input CLK;
input [7:0] D;
output [7:0] Q;
reg [7:0] Q;
always @(posedge CLK)
if (reset)
Q = 0;
else
Q = D;
endmodule // reg8
Previous slide
Next slide
Back to first slide
View graphic version