aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-24 11:51:55 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-24 11:51:55 -0700
commitaa1eeda567d09e2d2ffd40cd008d0166d2910273 (patch)
tree016ba7d84d64abde2db534128d517f8b3e6fc152 /techlibs/xilinx
parentc2387394e32e7a4513076b5d81beb499ceea2542 (diff)
downloadyosys-aa1eeda567d09e2d2ffd40cd008d0166d2910273.tar.gz
yosys-aa1eeda567d09e2d2ffd40cd008d0166d2910273.tar.bz2
yosys-aa1eeda567d09e2d2ffd40cd008d0166d2910273.zip
Modify costs for muxcover
Diffstat (limited to 'techlibs/xilinx')
-rw-r--r--techlibs/xilinx/synth_xilinx.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc
index 2cf28fce1..a84f54e99 100644
--- a/techlibs/xilinx/synth_xilinx.cc
+++ b/techlibs/xilinx/synth_xilinx.cc
@@ -282,7 +282,21 @@ struct SynthXilinxPass : public ScriptPass
// NB: Cost of mux2 is 100; mux8 should cost between 3 and 4
// of those so that 4:1 muxes and below are implemented
// out of mux2s
- std::string muxcover_args = " -dmux=0 -mux8=350 -mux16=400";
+ std::string muxcover_args = " -dmux=0";
+ switch (minmuxf) {
+ case 5: muxcover_args += " -mux8=350 -mux16=400"; break;
+ case 6: muxcover_args += " -mux8=450 -mux16=500"; break;
+ case 7: muxcover_args += " -mux8=550 -mux16=600"; break;
+ case 8: muxcover_args += " -mux8=650 -mux16=700"; break;
+ case 9: muxcover_args += " -mux16=750"; break;
+ case 10: muxcover_args += " -mux16=850"; break;
+ case 11: muxcover_args += " -mux16=950"; break;
+ case 12: muxcover_args += " -mux16=1050"; break;
+ case 13: muxcover_args += " -mux16=1150"; break;
+ case 14: muxcover_args += " -mux16=1250"; break;
+ case 15: muxcover_args += " -mux16=1350"; break;
+ default: muxcover_args += " -mux16=1450"; break;
+ }
run("muxcover " + muxcover_args, "('-minmuxf' only)");
}
}