[Architecture] Patch DFF Verilog HDL

This commit is contained in:
tangxifan 2020-09-23 17:52:59 -06:00
parent 092ada39f4
commit 645db17168
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ input CK, // Clock Input
/* Local ports follow */
input D, // Data Input
output Q // Q output
output QB // QB output
);
//------------Internal Variables--------
reg q_reg;
@ -27,7 +28,13 @@ end else if (WE) begin
q_reg <= D;
end
`ifndef ENABLE_FORMAL_VERIFICATION
// Wire q_reg to Q
assign Q = q_reg;
assign QB = ~q_reg;
`else
assign Q = 1'bZ;
assign QB = !Q;
`endif
endmodule //End Of Module