`timescale 1ns/1ns
module D_FF(Reset, Ck, Load, D, Q);
input Reset, Ck, Load, D;
output Q;
reg Q;
always@(posedge Ck)
begin
if(Reset) Q <= 1'b0; //synchronous reset
else if(Load) Q <= D;
else Q <= Q;
end
endmodule
'Study > Digital System Design and Lab[Verilog]' 카테고리의 다른 글
#4-1 "IF", "Case" Statement - Counter (1) | 2023.10.15 |
---|---|
#3-2 Shift Register (0) | 2023.10.15 |
#4 if, case statement and verilog models(Multiplexers, register, counter) (1) | 2023.10.15 |
#4 Simple Synthesis Examples (0) | 2023.10.15 |
#3 Modeling Flip-Flops Using Always Block (0) | 2023.10.14 |