diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-05-05 18:18:48 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-05-05 18:18:48 +0200 |
commit | ec1938737bcfb625d4e62afaefd30d67acb588bf (patch) | |
tree | c6da1bec0741f5487ce54e36cd6bcdb08d6b56f9 | |
parent | 9647dc3c07039c49b9bcf5932050467ca451ceef (diff) | |
parent | 2096a05ec2aaecb89316c5a229b497c21c2327f9 (diff) | |
download | yosys-ec1938737bcfb625d4e62afaefd30d67acb588bf.tar.gz yosys-ec1938737bcfb625d4e62afaefd30d67acb588bf.tar.bz2 yosys-ec1938737bcfb625d4e62afaefd30d67acb588bf.zip |
Merge pull request #159 from azonenberg/master
Fixes to use new I/O pad techmapping, renamed ports for GP_SHREG
-rw-r--r-- | passes/techmap/shregmap.cc | 2 | ||||
-rw-r--r-- | techlibs/greenpak4/Makefile.inc | 1 | ||||
-rw-r--r-- | techlibs/greenpak4/cells_extract.v | 15 | ||||
-rw-r--r-- | techlibs/greenpak4/cells_sim.v | 8 | ||||
-rw-r--r-- | techlibs/greenpak4/synth_greenpak4.cc | 5 |
5 files changed, 7 insertions, 24 deletions
diff --git a/passes/techmap/shregmap.cc b/passes/techmap/shregmap.cc index 7a8495b79..766c1c65f 100644 --- a/passes/techmap/shregmap.cc +++ b/passes/techmap/shregmap.cc @@ -82,7 +82,7 @@ struct ShregmapTechGreenpak4 : ShregmapTech int i = 0; for (auto tap : taps) { newcell->setPort(i ? "\\OUTB" : "\\OUTA", tap.second); - newcell->setParam(i ? "\\OUTB_DELAY" : "\\OUTA_DELAY", tap.first + 1); + newcell->setParam(i ? "\\OUTB_TAP" : "\\OUTA_TAP", tap.first + 1); i++; } diff --git a/techlibs/greenpak4/Makefile.inc b/techlibs/greenpak4/Makefile.inc index 4e8e9415c..969b7c80d 100644 --- a/techlibs/greenpak4/Makefile.inc +++ b/techlibs/greenpak4/Makefile.inc @@ -2,7 +2,6 @@ OBJS += techlibs/greenpak4/synth_greenpak4.o OBJS += techlibs/greenpak4/greenpak4_counters.o -$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_extract.v)) $(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_map.v)) $(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_sim.v)) $(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/gp_dff.lib)) diff --git a/techlibs/greenpak4/cells_extract.v b/techlibs/greenpak4/cells_extract.v deleted file mode 100644 index 96feb7328..000000000 --- a/techlibs/greenpak4/cells_extract.v +++ /dev/null @@ -1,15 +0,0 @@ -//Wrapper module to patch up output of iopadmap -module GP_IOBUF(input IN, output OUT, input OE, inout IO); - - GP_IBUF ibuf( - .IN(IO), - .OUT(OUT) - ); - - $_TBUF_ tbuf( - .A(IN), - .E(OE), - .Y(OUT) - ); - -endmodule diff --git a/techlibs/greenpak4/cells_sim.v b/techlibs/greenpak4/cells_sim.v index 6c3ffcaa0..6cf29fe6e 100644 --- a/techlibs/greenpak4/cells_sim.v +++ b/techlibs/greenpak4/cells_sim.v @@ -278,9 +278,9 @@ endmodule module GP_SHREG(input nRST, input CLK, input IN, output OUTA, output OUTB); - parameter OUTA_DELAY = 1; + parameter OUTA_TAP = 1; parameter OUTA_INVERT = 0; - parameter OUTB_DELAY = 1; + parameter OUTB_TAP = 1; reg[15:0] shreg = 0; @@ -294,8 +294,8 @@ module GP_SHREG(input nRST, input CLK, input IN, output OUTA, output OUTB); end - assign OUTA = (OUTA_INVERT) ? ~shreg[OUTA_DELAY - 1] : shreg[OUTA_DELAY - 1]; - assign OUTB = shreg[OUTB_DELAY - 1]; + assign OUTA = (OUTA_INVERT) ? ~shreg[OUTA_TAP - 1] : shreg[OUTA_TAP - 1]; + assign OUTB = shreg[OUTB_TAP - 1]; endmodule diff --git a/techlibs/greenpak4/synth_greenpak4.cc b/techlibs/greenpak4/synth_greenpak4.cc index 55412ea2b..b7296055a 100644 --- a/techlibs/greenpak4/synth_greenpak4.cc +++ b/techlibs/greenpak4/synth_greenpak4.cc @@ -176,14 +176,13 @@ struct SynthGreenPAK4Pass : public ScriptPass if (check_label("map_cells")) { run("shregmap -tech greenpak4"); - run("iopadmap -bits -inpad GP_IBUF OUT:IN -outpad GP_OBUF IN:OUT -inoutpad GP_IBUF OUT:IN"); - run("extract -map +/greenpak4/cells_extract.v -verbose"); run("dfflibmap -liberty +/greenpak4/gp_dff.lib"); - run("techmap -map +/greenpak4/cells_map.v"); run("dffinit -ff GP_DFF Q INIT"); run("dffinit -ff GP_DFFR Q INIT"); run("dffinit -ff GP_DFFS Q INIT"); run("dffinit -ff GP_DFFSR Q INIT"); + run("iopadmap -bits -inpad GP_IBUF OUT:IN -outpad GP_OBUF IN:OUT -inoutpad GP_OBUF OUT:IN -toutpad GP_OBUFT OE:IN:OUT -tinoutpad GP_IOBUF OE:OUT:IN:IO"); + run("techmap -map +/greenpak4/cells_map.v"); run("clean"); } |