Skip to content

Commit

Permalink
fix cells_sim.v
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-min-1 committed Jul 4, 2024
1 parent e5bdc9b commit 7770fa7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions techlibs/mchp/cells_sim.v
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7770fa7

Please sign in to comment.