3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-06 11:20:27 +00:00

ecp5: add synth_ecp5 -dff to work with -abc9

This commit is contained in:
Eddie Hung 2020-04-14 07:51:23 -07:00
parent e38b1280f9
commit 34c7732642
2 changed files with 47 additions and 12 deletions

View file

@ -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
// ---------------------------------------