diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-04-14 07:51:23 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2020-05-14 10:33:56 -0700 |
commit | 34c77326420e4f906544e26499683869c47d09aa (patch) | |
tree | fed06706042b3052d7603a716d697c7abead94e6 /techlibs/ecp5/cells_sim.v | |
parent | e38b1280f9752d22c6d2a5803bec6a6cedf12a10 (diff) | |
download | yosys-34c77326420e4f906544e26499683869c47d09aa.tar.gz yosys-34c77326420e4f906544e26499683869c47d09aa.tar.bz2 yosys-34c77326420e4f906544e26499683869c47d09aa.zip |
ecp5: add synth_ecp5 -dff to work with -abc9
Diffstat (limited to 'techlibs/ecp5/cells_sim.v')
-rw-r--r-- | techlibs/ecp5/cells_sim.v | 21 |
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 // --------------------------------------- |