fix cells_sim.v

This commit is contained in:
Chun Lin Min 2024-07-04 05:20:22 -07:00
parent e5bdc9b5c9
commit 7770fa70e1
1 changed files with 15 additions and 5 deletions

View File

@ -166,15 +166,20 @@ module MCHP_SYNC_SET_DFF(
input En,
output Q);
parameter [0:0] INIT = 1'b0; // unused
reg q_ff;
always @(posedge CLK) begin
if (En == 1) begin
if (Set == 0)
Q <= 1;
q_ff <= 1;
else
Q <= D;
q_ff <= D;
end
end
assign Q = q_ff;
specify
$setup(D , posedge CLK &&& En && Set, 0); // neg setup not supported?
$setup(En, posedge CLK, 109);
@ -192,15 +197,20 @@ module MCHP_SYNC_RESET_DFF(
input En,
output Q);
parameter [0:0] INIT = 1'b0; // unused
always @(posedge C) begin
reg q_ff;
always @(posedge CLK) begin
if (En == 1) begin
if (Reset == 0)
Q <= 0;
q_ff <= 0;
else
Q <= D;
q_ff <= D;
end
end
assign Q = q_ff;
specify
$setup(D , posedge CLK &&& En && Reset, 0); // neg setup not supported?
$setup(En, posedge CLK, 109);