aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx/synth_xilinx.cc
diff options
context:
space:
mode:
authorEddie Hung <eddie@fpgeh.com>2019-07-15 09:49:41 -0700
committerEddie Hung <eddie@fpgeh.com>2019-07-15 09:49:41 -0700
commit146451a767bc0ba77da86bdb8ebec5d3387b49ca (patch)
tree4477f092c352de034fef1a315a542778185d90ce /techlibs/xilinx/synth_xilinx.cc
parentb33ecd2a746b734fda33d8535afecf76bd35f59c (diff)
parenta97d30d2f88d2f7a41abf8b913bbc017b60d8c7d (diff)
downloadyosys-146451a767bc0ba77da86bdb8ebec5d3387b49ca.tar.gz
yosys-146451a767bc0ba77da86bdb8ebec5d3387b49ca.tar.bz2
yosys-146451a767bc0ba77da86bdb8ebec5d3387b49ca.zip
Merge remote-tracking branch 'origin/master' into xc7dsp
Diffstat (limited to 'techlibs/xilinx/synth_xilinx.cc')
-rw-r--r--techlibs/xilinx/synth_xilinx.cc25
1 files changed, 20 insertions, 5 deletions
diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc
index 9199fbb53..01e75b50e 100644
--- a/techlibs/xilinx/synth_xilinx.cc
+++ b/techlibs/xilinx/synth_xilinx.cc
@@ -244,8 +244,13 @@ struct SynthXilinxPass : public ScriptPass
run("read_verilog -lib +/xilinx/cells_xtra.v");
- if (!nobram || help_mode)
- run("read_verilog -lib +/xilinx/brams_bb.v", "(skip if '-nobram')");
+ if (help_mode) {
+ run("read_verilog -lib +/xilinx/{family}_brams_bb.v");
+ } else if (family == "xc6s") {
+ run("read_verilog -lib +/xilinx/xc6s_brams_bb.v");
+ } else if (family == "xc7") {
+ run("read_verilog -lib +/xilinx/xc7_brams_bb.v");
+ }
run(stringf("hierarchy -check %s", top_opt.c_str()));
}
@@ -292,9 +297,19 @@ struct SynthXilinxPass : public ScriptPass
}
if (check_label("bram", "(skip if '-nobram')")) {
- if (!nobram || help_mode) {
- run("memory_bram -rules +/xilinx/brams.txt");
- run("techmap -map +/xilinx/brams_map.v");
+ if (help_mode) {
+ run("memory_bram -rules +/xilinx/{family}_brams.txt");
+ run("techmap -map +/xilinx/{family}_brams_map.v");
+ } else if (!nobram) {
+ if (family == "xc6s") {
+ run("memory_bram -rules +/xilinx/xc6s_brams.txt");
+ run("techmap -map +/xilinx/xc6s_brams_map.v");
+ } else if (family == "xc7") {
+ run("memory_bram -rules +/xilinx/xc7_brams.txt");
+ run("techmap -map +/xilinx/xc7_brams_map.v");
+ } else {
+ log_warning("Block RAM inference not yet supported for family %s.\n", family.c_str());
+ }
}
}