mirror of https://github.com/YosysHQ/yosys.git
Error out if -abc9 and -retime specified
This commit is contained in:
parent
27b27b8781
commit
6bbd286e03
|
@ -199,6 +199,9 @@ struct SynthEcp5Pass : public ScriptPass
|
||||||
if (!design->full_selection())
|
if (!design->full_selection())
|
||||||
log_cmd_error("This command only operates on fully selected designs!\n");
|
log_cmd_error("This command only operates on fully selected designs!\n");
|
||||||
|
|
||||||
|
if (abc9 && retime)
|
||||||
|
log_cmd_error("-retime option not currently compatible with -abc9!\n");
|
||||||
|
|
||||||
log_header(design, "Executing SYNTH_ECP5 pass.\n");
|
log_header(design, "Executing SYNTH_ECP5 pass.\n");
|
||||||
log_push();
|
log_push();
|
||||||
|
|
||||||
|
|
|
@ -227,6 +227,9 @@ struct SynthIce40Pass : public ScriptPass
|
||||||
if (device_opt != "hx" && device_opt != "lp" && device_opt !="u")
|
if (device_opt != "hx" && device_opt != "lp" && device_opt !="u")
|
||||||
log_cmd_error("Invalid or no device specified: '%s'\n", device_opt.c_str());
|
log_cmd_error("Invalid or no device specified: '%s'\n", device_opt.c_str());
|
||||||
|
|
||||||
|
if (abc == "abc9" && retime)
|
||||||
|
log_cmd_error("-retime option not currently compatible with -abc9!\n");
|
||||||
|
|
||||||
log_header(design, "Executing SYNTH_ICE40 pass.\n");
|
log_header(design, "Executing SYNTH_ICE40 pass.\n");
|
||||||
log_push();
|
log_push();
|
||||||
|
|
||||||
|
@ -296,7 +299,7 @@ struct SynthIce40Pass : public ScriptPass
|
||||||
run("techmap");
|
run("techmap");
|
||||||
else
|
else
|
||||||
run("techmap -map +/techmap.v -map +/ice40/arith_map.v");
|
run("techmap -map +/techmap.v -map +/ice40/arith_map.v");
|
||||||
if ((retime || help_mode) && abc != "abc9")
|
if (retime || help_mode)
|
||||||
run(abc + " -dff", "(only if -retime)");
|
run(abc + " -dff", "(only if -retime)");
|
||||||
run("ice40_opt");
|
run("ice40_opt");
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
USING_YOSYS_NAMESPACE
|
USING_YOSYS_NAMESPACE
|
||||||
PRIVATE_NAMESPACE_BEGIN
|
PRIVATE_NAMESPACE_BEGIN
|
||||||
|
|
||||||
#define XC7_WIRE_DELAY "300" // Number with which ABC will map a 6-input gate
|
#define XC7_WIRE_DELAY 300 // Number with which ABC will map a 6-input gate
|
||||||
// to one LUT6 (instead of a LUT5 + LUT2)
|
// to one LUT6 (instead of a LUT5 + LUT2)
|
||||||
|
|
||||||
struct SynthXilinxPass : public ScriptPass
|
struct SynthXilinxPass : public ScriptPass
|
||||||
{
|
{
|
||||||
|
@ -195,11 +195,14 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
extra_args(args, argidx, design);
|
extra_args(args, argidx, design);
|
||||||
|
|
||||||
if (family != "xcup" && family != "xcu" && family != "xc7" && family != "xc6s")
|
if (family != "xcup" && family != "xcu" && family != "xc7" && family != "xc6s")
|
||||||
log_cmd_error("Invalid Xilinx -family setting: %s\n", family.c_str());
|
log_cmd_error("Invalid Xilinx -family setting: '%s'.\n", family.c_str());
|
||||||
|
|
||||||
if (!design->full_selection())
|
if (!design->full_selection())
|
||||||
log_cmd_error("This command only operates on fully selected designs!\n");
|
log_cmd_error("This command only operates on fully selected designs!\n");
|
||||||
|
|
||||||
|
if (abc9 && retime)
|
||||||
|
log_cmd_error("-retime option not currently compatible with -abc9!\n");
|
||||||
|
|
||||||
log_header(design, "Executing SYNTH_XILINX pass.\n");
|
log_header(design, "Executing SYNTH_XILINX pass.\n");
|
||||||
log_push();
|
log_push();
|
||||||
|
|
||||||
|
@ -297,9 +300,9 @@ struct SynthXilinxPass : public ScriptPass
|
||||||
if (family != "xc7")
|
if (family != "xc7")
|
||||||
log_warning("'synth_xilinx -abc9' currently supports '-family xc7' only.\n");
|
log_warning("'synth_xilinx -abc9' currently supports '-family xc7' only.\n");
|
||||||
if (nowidelut)
|
if (nowidelut)
|
||||||
run("abc9 -lut +/xilinx/abc_xc7_nowide.lut -box +/xilinx/abc_xc7.box -W " + std::string(XC7_WIRE_DELAY) + string(retime ? " -dff" : ""));
|
run("abc9 -lut +/xilinx/abc_xc7_nowide.lut -box +/xilinx/abc_xc7.box -W " + std::to_string(XC7_WIRE_DELAY));
|
||||||
else
|
else
|
||||||
run("abc9 -lut +/xilinx/abc_xc7.lut -box +/xilinx/abc_xc7.box -W " + std::string(XC7_WIRE_DELAY) + string(retime ? " -dff" : ""));
|
run("abc9 -lut +/xilinx/abc_xc7.lut -box +/xilinx/abc_xc7.box -W " + std::to_string(XC7_WIRE_DELAY));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (nowidelut)
|
if (nowidelut)
|
||||||
|
|
Loading…
Reference in New Issue