diff options
author | whitequark <whitequark@whitequark.org> | 2018-12-05 00:28:03 +0000 |
---|---|---|
committer | whitequark <whitequark@whitequark.org> | 2018-12-05 16:30:37 +0000 |
commit | ea4870b12690bd313852c952f4fd17efaf63abb6 (patch) | |
tree | d33b76649fc55e56de07e3a01c1cc5db10f7cd81 /techlibs/ice40/synth_ice40.cc | |
parent | 9e072ec21f9985126e1cfeb04fa7f2bc963790b3 (diff) | |
download | yosys-ea4870b12690bd313852c952f4fd17efaf63abb6.tar.gz yosys-ea4870b12690bd313852c952f4fd17efaf63abb6.tar.bz2 yosys-ea4870b12690bd313852c952f4fd17efaf63abb6.zip |
synth_ice40: add -relut option, to run ice40_unlut and opt_lut.
Diffstat (limited to 'techlibs/ice40/synth_ice40.cc')
-rw-r--r-- | techlibs/ice40/synth_ice40.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/techlibs/ice40/synth_ice40.cc b/techlibs/ice40/synth_ice40.cc index 93965a55d..7094db50d 100644 --- a/techlibs/ice40/synth_ice40.cc +++ b/techlibs/ice40/synth_ice40.cc @@ -63,6 +63,9 @@ struct SynthIce40Pass : public ScriptPass log(" -retime\n"); log(" run 'abc' with -dff option\n"); log("\n"); + log(" -relut\n"); + log(" combine LUTs after synthesis\n"); + log("\n"); log(" -nocarry\n"); log(" do not use SB_CARRY cells in output netlist\n"); log("\n"); @@ -90,7 +93,7 @@ struct SynthIce40Pass : public ScriptPass } string top_opt, blif_file, edif_file, json_file; - bool nocarry, nodffe, nobram, flatten, retime, abc2, vpr; + bool nocarry, nodffe, nobram, flatten, retime, relut, abc2, vpr; int min_ce_use; void clear_flags() YS_OVERRIDE @@ -105,6 +108,7 @@ struct SynthIce40Pass : public ScriptPass nobram = false; flatten = true; retime = false; + relut = false; abc2 = false; vpr = false; } @@ -153,6 +157,10 @@ struct SynthIce40Pass : public ScriptPass retime = true; continue; } + if (args[argidx] == "-relut") { + relut = true; + continue; + } if (args[argidx] == "-nocarry") { nocarry = true; continue; @@ -259,6 +267,10 @@ struct SynthIce40Pass : public ScriptPass run("techmap -map +/ice40/latches_map.v"); run("abc -lut 4"); run("clean"); + if (relut || help_mode) { + run("ice40_unlut", "(only if -relut)"); + run("opt_lut", " (only if -relut)"); + } } if (check_label("map_cells")) |