aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-06-26 09:33:38 -0700
committerEddie Hung <eddie@fpgeh.com>2019-06-26 09:33:38 -0700
commit7389b043c0411f8cb9b2c6862f279bc35bba1104 (patch)
tree5b86bc96a888a0eaa6bd4f92e1ed7b96d2acf422 /techlibs
parentab6e8ce0f00bc9fcf38dc62ae9de26405f7b59d7 (diff)
parent98e5a625c45ae1ec8e6aa37a1db2238250e7a097 (diff)
downloadyosys-7389b043c0411f8cb9b2c6862f279bc35bba1104.tar.gz
yosys-7389b043c0411f8cb9b2c6862f279bc35bba1104.tar.bz2
yosys-7389b043c0411f8cb9b2c6862f279bc35bba1104.zip
Merge branch 'xc7nocarrymux' of https://github.com/koriakin/yosys into koriakin/xc7nocarrymux
Diffstat (limited to 'techlibs')
-rw-r--r--techlibs/xilinx/synth_xilinx.cc28
1 files changed, 24 insertions, 4 deletions
diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc
index a293081f1..27125d56c 100644
--- a/techlibs/xilinx/synth_xilinx.cc
+++ b/techlibs/xilinx/synth_xilinx.cc
@@ -67,6 +67,12 @@ struct SynthXilinxPass : public ScriptPass
log(" -nosrl\n");
log(" disable inference of shift registers\n");
log("\n");
+ log(" -nocarry\n");
+ log(" do not use XORCY/MUXCY/CARRY4 cells in output netlist\n");
+ log("\n");
+ log(" -nowidelut\n");
+ log(" do not use MUXF[78] resources to implement LUTs larger than LUT6s\n");
+ log("\n");
log(" -run <from_label>:<to_label>\n");
log(" only run the commands between the labels (see below). an empty\n");
log(" from label is synonymous to 'begin', and empty to label is\n");
@@ -85,7 +91,7 @@ struct SynthXilinxPass : public ScriptPass
}
std::string top_opt, edif_file, blif_file, arch;
- bool flatten, retime, vpr, nobram, nodram, nosrl;
+ bool flatten, retime, vpr, nobram, nodram, nosrl, nocarry, nowidelut;
void clear_flags() YS_OVERRIDE
{
@@ -98,6 +104,8 @@ struct SynthXilinxPass : public ScriptPass
nobram = false;
nodram = false;
nosrl = false;
+ nocarry = false;
+ nowidelut = false;
arch = "xc7";
}
@@ -141,6 +149,14 @@ struct SynthXilinxPass : public ScriptPass
retime = true;
continue;
}
+ if (args[argidx] == "-nocarry") {
+ nocarry = true;
+ continue;
+ }
+ if (args[argidx] == "-nomux") {
+ nomux = true;
+ continue;
+ }
if (args[argidx] == "-vpr") {
vpr = true;
continue;
@@ -237,10 +253,12 @@ struct SynthXilinxPass : public ScriptPass
run("shregmap -tech xilinx -minlen 3", "(skip if '-nosrl')");
}
- if (!vpr || help_mode)
+ if (help_mode)
+ run("techmap -map +/techmap.v -map +/xilinx/arith_map.v", "(skip if '-nocarry')");
+ else if (!vpr)
run("techmap -map +/techmap.v -map +/xilinx/arith_map.v");
else
- run("techmap -map +/techmap.v +/xilinx/arith_map.v -D _EXPLICIT_CARRY");
+ run("techmap -map +/techmap.v -map +/xilinx/arith_map.v -D _EXPLICIT_CARRY");
run("opt -fast");
}
@@ -252,7 +270,9 @@ struct SynthXilinxPass : public ScriptPass
if (check_label("map_luts")) {
if (help_mode)
- run("abc -luts 2:2,3,6:5,10,20 [-dff]");
+ run("abc -luts 2:2,3,6:5[,10,20] [-dff]", "(skip if 'nowidelut', only for '-retime')");
+ else if (nowidelut)
+ run("abc -luts 2:2,3,6:5" + string(retime ? " -dff" : ""));
else
run("abc -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
run("clean");