mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-19 12:23:39 +00:00
Merge remote-tracking branch 'origin/eddie/abc9_refactor' into eddie/abc9_required
This commit is contained in:
commit
915e7dde73
22 changed files with 789 additions and 389 deletions
|
@ -74,7 +74,7 @@
|
|||
// (e) a special _TECHMAP_REPLACE_.abc9_ff.Q wire that will be used for feedback
|
||||
// into the (combinatorial) FD* cell to facilitate clock-enable behaviour
|
||||
|
||||
module FDRE (output Q, input C, CE, D, R);
|
||||
module FDRE (output Q, (* techmap_autopurge *) input C, CE, D, R);
|
||||
parameter [0:0] INIT = 1'b0;
|
||||
parameter [0:0] IS_C_INVERTED = 1'b0;
|
||||
parameter [0:0] IS_D_INVERTED = 1'b0;
|
||||
|
@ -110,7 +110,7 @@ module FDRE (output Q, input C, CE, D, R);
|
|||
wire [0:0] abc9_ff.init = 1'b0;
|
||||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
|
||||
endmodule
|
||||
module FDRE_1 (output Q, input C, CE, D, R);
|
||||
module FDRE_1 (output Q, (* techmap_autopurge *) input C, CE, D, R);
|
||||
parameter [0:0] INIT = 1'b0;
|
||||
wire QQ, $Q;
|
||||
generate if (INIT == 1'b1) begin
|
||||
|
@ -138,7 +138,7 @@ module FDRE_1 (output Q, input C, CE, D, R);
|
|||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
|
||||
endmodule
|
||||
|
||||
module FDSE (output Q, input C, CE, D, S);
|
||||
module FDSE (output Q, (* techmap_autopurge *) input C, CE, D, S);
|
||||
parameter [0:0] INIT = 1'b1;
|
||||
parameter [0:0] IS_C_INVERTED = 1'b0;
|
||||
parameter [0:0] IS_D_INVERTED = 1'b0;
|
||||
|
@ -173,7 +173,7 @@ module FDSE (output Q, input C, CE, D, S);
|
|||
wire [0:0] abc9_ff.init = 1'b0;
|
||||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
|
||||
endmodule
|
||||
module FDSE_1 (output Q, input C, CE, D, S);
|
||||
module FDSE_1 (output Q, (* techmap_autopurge *) input C, CE, D, S);
|
||||
parameter [0:0] INIT = 1'b1;
|
||||
wire QQ, $Q;
|
||||
generate if (INIT == 1'b1) begin
|
||||
|
@ -200,7 +200,7 @@ module FDSE_1 (output Q, input C, CE, D, S);
|
|||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = QQ;
|
||||
endmodule
|
||||
|
||||
module FDCE (output Q, input C, CE, D, CLR);
|
||||
module FDCE (output Q, (* techmap_autopurge *) input C, CE, D, CLR);
|
||||
parameter [0:0] INIT = 1'b0;
|
||||
parameter [0:0] IS_C_INVERTED = 1'b0;
|
||||
parameter [0:0] IS_D_INVERTED = 1'b0;
|
||||
|
@ -249,7 +249,7 @@ module FDCE (output Q, input C, CE, D, CLR);
|
|||
wire [0:0] abc9_ff.init = 1'b0;
|
||||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
|
||||
endmodule
|
||||
module FDCE_1 (output Q, input C, CE, D, CLR);
|
||||
module FDCE_1 (output Q, (* techmap_autopurge *) input C, CE, D, CLR);
|
||||
parameter [0:0] INIT = 1'b0;
|
||||
wire QQ, $Q, $QQ;
|
||||
generate if (INIT == 1'b1) begin
|
||||
|
@ -288,7 +288,7 @@ module FDCE_1 (output Q, input C, CE, D, CLR);
|
|||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
|
||||
endmodule
|
||||
|
||||
module FDPE (output Q, input C, CE, D, PRE);
|
||||
module FDPE (output Q, (* techmap_autopurge *) input C, CE, D, PRE);
|
||||
parameter [0:0] INIT = 1'b1;
|
||||
parameter [0:0] IS_C_INVERTED = 1'b0;
|
||||
parameter [0:0] IS_D_INVERTED = 1'b0;
|
||||
|
@ -335,7 +335,7 @@ module FDPE (output Q, input C, CE, D, PRE);
|
|||
wire [0:0] abc9_ff.init = 1'b0;
|
||||
wire [0:0] _TECHMAP_REPLACE_.abc9_ff.Q = $QQ;
|
||||
endmodule
|
||||
module FDPE_1 (output Q, input C, CE, D, PRE);
|
||||
module FDPE_1 (output Q, (* techmap_autopurge *) input C, CE, D, PRE);
|
||||
parameter [0:0] INIT = 1'b1;
|
||||
wire QQ, $Q, $QQ;
|
||||
generate if (INIT == 1'b1) begin
|
||||
|
|
|
@ -26,13 +26,16 @@
|
|||
USING_YOSYS_NAMESPACE
|
||||
PRIVATE_NAMESPACE_BEGIN
|
||||
|
||||
#define XC7_WIRE_DELAY 300 // Number with which ABC will map a 6-input gate
|
||||
// to one LUT6 (instead of a LUT5 + LUT2)
|
||||
|
||||
struct SynthXilinxPass : public ScriptPass
|
||||
{
|
||||
SynthXilinxPass() : ScriptPass("synth_xilinx", "synthesis for Xilinx FPGAs") { }
|
||||
|
||||
void on_register() YS_OVERRIDE
|
||||
{
|
||||
RTLIL::constpad["synth_xilinx.abc9.xc7.W"] = "300"; // Number with which ABC will map a 6-input gate
|
||||
// to one LUT6 (instead of a LUT5 + LUT2)
|
||||
}
|
||||
|
||||
void help() YS_OVERRIDE
|
||||
{
|
||||
// |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
|
||||
|
@ -515,7 +518,7 @@ struct SynthXilinxPass : public ScriptPass
|
|||
techmap_args += " -map +/xilinx/arith_map.v";
|
||||
if (vpr)
|
||||
techmap_args += " -D _EXPLICIT_CARRY";
|
||||
else if (abc9)
|
||||
else
|
||||
techmap_args += " -D _CLB_CARRY";
|
||||
}
|
||||
run("techmap " + techmap_args);
|
||||
|
@ -555,7 +558,11 @@ struct SynthXilinxPass : public ScriptPass
|
|||
run("techmap " + techmap_args);
|
||||
run("read_verilog -icells -lib +/xilinx/abc9_model.v");
|
||||
std::string abc9_opts = " -box +/xilinx/abc9_xc7.box";
|
||||
abc9_opts += stringf(" -W %d", XC7_WIRE_DELAY);
|
||||
auto k = stringf("synth_xilinx.abc9.%s.W", family.c_str());
|
||||
if (active_design->scratchpad.count(k))
|
||||
abc9_opts += stringf(" -W %s", active_design->scratchpad_get_string(k).c_str());
|
||||
else
|
||||
abc9_opts += stringf(" -W %s", RTLIL::constpad.at(k).c_str());
|
||||
if (nowidelut)
|
||||
abc9_opts += " -lut +/xilinx/abc9_xc7_nowide.lut";
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue