Skip to content

Commit 494e5f2

Browse files
committed
Added "synth_ice40 -abc2"
1 parent 4d0a6da commit 494e5f2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

techlibs/ice40/synth_ice40.cc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ struct SynthIce40Pass : public Pass {
7272
log(" -nobram\n");
7373
log(" do not use SB_RAM40_4K* cells in output netlist\n");
7474
log("\n");
75+
log(" -abc2\n");
76+
log(" run two passes of 'abc' for slightly improved logic density\n");
77+
log("\n");
7578
log("\n");
7679
log("The following commands are executed by this synthesis command:\n");
7780
log("\n");
@@ -109,6 +112,7 @@ struct SynthIce40Pass : public Pass {
109112
log(" ice40_opt -full\n");
110113
log("\n");
111114
log(" map_luts:\n");
115+
log(" abc (only if -abc2)\n");
112116
log(" abc -lut 4\n");
113117
log(" clean\n");
114118
log("\n");
@@ -137,6 +141,7 @@ struct SynthIce40Pass : public Pass {
137141
bool nobram = false;
138142
bool flatten = true;
139143
bool retime = false;
144+
bool abc2 = false;
140145

141146
size_t argidx;
142147
for (argidx = 1; argidx < args.size(); argidx++)
@@ -181,6 +186,10 @@ struct SynthIce40Pass : public Pass {
181186
nobram = true;
182187
continue;
183188
}
189+
if (args[argidx] == "-abc2") {
190+
abc2 = true;
191+
continue;
192+
}
184193
break;
185194
}
186195
extra_args(args, argidx, design);
@@ -244,6 +253,8 @@ struct SynthIce40Pass : public Pass {
244253

245254
if (check_label(active, run_from, run_to, "map_luts"))
246255
{
256+
if (abc2)
257+
Pass::call(design, "abc");
247258
Pass::call(design, "abc -lut 4");
248259
Pass::call(design, "clean");
249260
}

0 commit comments

Comments
 (0)