aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ecp5/cells_sim.v
diff options
context:
space:
mode:
Diffstat (limited to 'techlibs/ecp5/cells_sim.v')
-rw-r--r--techlibs/ecp5/cells_sim.v21
1 files changed, 21 insertions, 0 deletions
diff --git a/techlibs/ecp5/cells_sim.v b/techlibs/ecp5/cells_sim.v
index 12b33e925..69685683f 100644
--- a/techlibs/ecp5/cells_sim.v
+++ b/techlibs/ecp5/cells_sim.v
@@ -294,6 +294,7 @@ endmodule
// ---------------------------------------
+(* abc9_flop=(SRMODE != "ASYNC"), lib_whitebox=(SRMODE != "ASYNC") *)
module TRELLIS_FF(input CLK, LSR, CE, DI, M, output reg Q);
parameter GSR = "ENABLED";
parameter [127:0] CEMUX = "1";
@@ -340,6 +341,26 @@ module TRELLIS_FF(input CLK, LSR, CE, DI, M, output reg Q);
Q <= DI;
end
endgenerate
+
+ generate
+ // TODO
+ if (CLKMUX == "INV")
+ specify
+ $setup(DI, negedge CLK, 0);
+ $setup(CE, negedge CLK, 0);
+ $setup(LSR, negedge CLK, 0);
+ if (muxlsr) (negedge CLK => (Q : DI)) = 0;
+ if (!muxlsr && muxce) (negedge CLK => (Q : srval)) = 0;
+ endspecify
+ else
+ specify
+ $setup(DI, posedge CLK, 0);
+ $setup(CE, posedge CLK, 0);
+ $setup(LSR, posedge CLK, 0);
+ if (muxlsr) (posedge CLK => (Q : srval)) = 0;
+ if (!muxlsr && muxce) (posedge CLK => (Q : DI)) = 0;
+ endspecify
+ endgenerate
endmodule
// ---------------------------------------