add flipflop module

This commit is contained in:
Imants Pulkstenis
2019-11-24 19:27:46 +02:00
parent 5e318949b6
commit 518bbe43cb
3 changed files with 61 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
module d_flipflop_sync_rst(
input D,
output reg Q,
input clk,
input reset);
always@(posedge clk, posedge reset)
begin
if(reset)
Q <= 1'd0;
else
Q <= D;
end
endmodule