(WIP): D Latch and D FlipFlop

This commit is contained in:
Yuri Tatishchev 2024-10-19 15:47:35 -07:00
parent d217faf166
commit 7c0645eaa1
Signed by: CaZzzer
GPG Key ID: E0EBF441EA424369

11
logic.v
View File

@ -69,7 +69,11 @@ input D, C;
input nP, nR;
output Q,Qbar;
// TBD
wire Cbar, Y, Ybar;
not C_inv(Cbar, C);
D_LATCH dlatch(Y, Ybar, D, Cbar, nP, nR);
SR_LATCH srlatch(Q, Qbar, Y, Ybar, C, nP, nR);
endmodule
@ -82,7 +86,10 @@ input D, C;
input nP, nR;
output Q,Qbar;
// TBD
wire Dbar;
not D_inv(Dbar, D);
SR_LATCH latch(Q, Qbar, D, Dbar, C, nP, nR);
endmodule