aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/gowin
diff options
context:
space:
mode:
authorPepijn de Vos <pepijndevos@gmail.com>2019-10-28 15:33:05 +0100
committerPepijn de Vos <pepijndevos@gmail.com>2019-10-28 15:33:05 +0100
commit0f6269b04c4a5f44b62021759507bcbe61a7c8d7 (patch)
tree17f1fb8a1e4532045c86cbb7151fc15a02481be2 /techlibs/gowin
parent903f9973913371452005eb173ac50fec1d5d1447 (diff)
downloadyosys-0f6269b04c4a5f44b62021759507bcbe61a7c8d7.tar.gz
yosys-0f6269b04c4a5f44b62021759507bcbe61a7c8d7.tar.bz2
yosys-0f6269b04c4a5f44b62021759507bcbe61a7c8d7.zip
add IOBUF
Diffstat (limited to 'techlibs/gowin')
-rw-r--r--techlibs/gowin/cells_sim.v8
-rw-r--r--techlibs/gowin/synth_gowin.cc3
2 files changed, 10 insertions, 1 deletions
diff --git a/techlibs/gowin/cells_sim.v b/techlibs/gowin/cells_sim.v
index cc1ac48e6..a67855dab 100644
--- a/techlibs/gowin/cells_sim.v
+++ b/techlibs/gowin/cells_sim.v
@@ -308,6 +308,14 @@ module TBUF (O, I, OEN);
assign O = OEN ? I : 1'bz;
endmodule
+module IOBUF (O, IO, I, OEN);
+ input I,OEN;
+ output O;
+ inout IO;
+ assign IO = OEN ? I : 1'bz;
+ assign I = IO;
+endmodule
+
module GSR (input GSRI);
wire GSRO = GSRI;
endmodule
diff --git a/techlibs/gowin/synth_gowin.cc b/techlibs/gowin/synth_gowin.cc
index d541edd84..a70ff93bb 100644
--- a/techlibs/gowin/synth_gowin.cc
+++ b/techlibs/gowin/synth_gowin.cc
@@ -230,7 +230,8 @@ struct SynthGowinPass : public ScriptPass
run("techmap -map +/gowin/cells_map.v");
run("setundef -undriven -params -zero");
run("hilomap -singleton -hicell VCC V -locell GND G");
- run("iopadmap -bits -inpad IBUF O:I -outpad OBUF I:O, -toutpad TBUF OEN:I:O", "(unless -noiopads)");
+ run("iopadmap -bits -inpad IBUF O:I -outpad OBUF I:O "
+ "-toutpad TBUF OEN:I:O -tinoutpad IOBUF OEN:O:I:IO", "(unless -noiopads)");
run("dffinit -ff DFF Q INIT");
run("clean");