if (check_label("coarse")) {
run("synth -run coarse");
+
+ // shregmap -tech xilinx can cope with $shiftx and $mux
+ // cells for identifying variable-length shift registers,
+ // so attempt to convert $pmux-es to the former
+ // Also: wide multiplexer inference benefits from this too
+ if ((!nosrl && !nomux) || help_mode)
+ run("pmux2shiftx", "(skip if '-nosrl' and '-nomux')");
+
+ // Run a number of peephole optimisations, including one
+ // that optimises $mul cells driving $shiftx's B input
+ // and that aids wide mux analysis
+ run("peepopt");
}
if (check_label("bram", "(skip if '-nobram')")) {
}
if (check_label("fine")) {
- // shregmap -tech xilinx can cope with $shiftx and $mux
- // cells for identifying variable-length shift registers,
- // so attempt to convert $pmux-es to the former
- // Also: wide multiplexer inference benefits from this too
- if ((!nosrl && !nomux) || help_mode)
- run("pmux2shiftx", "(skip if '-nosrl' and '-nomux')");
-
run("opt -fast -full");
run("memory_map");
run("dffsr2dff");
else if (!nocarry || help_mode)
run("techmap -map +/xilinx/arith_map.v", "(skip if '-nocarry')");
+ if (!nomux || help_mode)
+ run("techmap -map +/xilinx/cells_map.v");
+
if (!nosrl || help_mode) {
// shregmap operates on bit-level flops, not word-level,
// so break those down here
run("shregmap -tech xilinx -minlen 3", "(skip if '-nosrl')");
}
- if (!nomux || help_mode)
- run("techmap -map +/xilinx/cells_map.v");
-
run("techmap");
run("opt -fast");
}