From: Pepijn de Vos Date: Mon, 28 Oct 2019 14:33:05 +0000 (+0100) Subject: add IOBUF X-Git-Tag: working-ls180~956^2~7 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f6269b04c4a5f44b62021759507bcbe61a7c8d7;p=yosys.git add IOBUF --- 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");