aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/machxo2
diff options
context:
space:
mode:
authorMarcelina Koƛcielnicka <mwk@0x04.net>2021-11-09 11:22:48 +0100
committerMarcelina Koƛcielnicka <mwk@0x04.net>2021-11-09 15:40:16 +0100
commit15b0d717ed658b342ce5f74df5a65827eed04a94 (patch)
treee9dfb025526ea0f1fbddf705987872fc889a951c /techlibs/machxo2
parent4871d8f19911dc48bf7726519437be8a821c0a1f (diff)
downloadyosys-15b0d717ed658b342ce5f74df5a65827eed04a94.tar.gz
yosys-15b0d717ed658b342ce5f74df5a65827eed04a94.tar.bz2
yosys-15b0d717ed658b342ce5f74df5a65827eed04a94.zip
iopadmap: Add native support for negative-polarity output enable.
Diffstat (limited to 'techlibs/machxo2')
-rw-r--r--techlibs/machxo2/cells_map.v4
-rw-r--r--techlibs/machxo2/cells_sim.v4
-rw-r--r--techlibs/machxo2/synth_machxo2.cc2
3 files changed, 5 insertions, 5 deletions
diff --git a/techlibs/machxo2/cells_map.v b/techlibs/machxo2/cells_map.v
index 82eb10d95..9c370f246 100644
--- a/techlibs/machxo2/cells_map.v
+++ b/techlibs/machxo2/cells_map.v
@@ -30,5 +30,5 @@ module \$_DFF_P_ (input D, C, output Q); FACADE_FF #(.CEMUX("1"), .CLKMUX("CLK"
// IO- "$__" cells for the iopadmap pass.
module \$__FACADE_OUTPAD (input I, output O); FACADE_IO #(.DIR("OUTPUT")) _TECHMAP_REPLACE_ (.PAD(O), .I(I), .T(1'b0)); endmodule
module \$__FACADE_INPAD (input I, output O); FACADE_IO #(.DIR("INPUT")) _TECHMAP_REPLACE_ (.PAD(I), .O(O)); endmodule
-module \$__FACADE_TOUTPAD (input I, OE, output O); FACADE_IO #(.DIR("OUTPUT")) _TECHMAP_REPLACE_ (.PAD(O), .I(I), .T(~OE)); endmodule
-module \$__FACADE_TINOUTPAD (input I, OE, output O, inout B); FACADE_IO #(.DIR("BIDIR")) _TECHMAP_REPLACE_ (.PAD(B), .I(I), .O(O), .T(~OE)); endmodule
+module \$__FACADE_TOUTPAD (input I, T, output O); FACADE_IO #(.DIR("OUTPUT")) _TECHMAP_REPLACE_ (.PAD(O), .I(I), .T(T)); endmodule
+module \$__FACADE_TINOUTPAD (input I, T, output O, inout B); FACADE_IO #(.DIR("BIDIR")) _TECHMAP_REPLACE_ (.PAD(B), .I(I), .O(O), .T(T)); endmodule
diff --git a/techlibs/machxo2/cells_sim.v b/techlibs/machxo2/cells_sim.v
index 161ddfe2e..dc68a3127 100644
--- a/techlibs/machxo2/cells_sim.v
+++ b/techlibs/machxo2/cells_sim.v
@@ -207,6 +207,6 @@ module \$__FACADE_OUTPAD (input I, output O); endmodule
(* blackbox *)
module \$__FACADE_INPAD (input I, output O); endmodule
(* blackbox *)
-module \$__FACADE_TOUTPAD (input I, OE, output O); endmodule
+module \$__FACADE_TOUTPAD (input I, T, output O); endmodule
(* blackbox *)
-module \$__FACADE_TINOUTPAD (input I, OE, output O, inout B); endmodule
+module \$__FACADE_TINOUTPAD (input I, T, output O, inout B); endmodule
diff --git a/techlibs/machxo2/synth_machxo2.cc b/techlibs/machxo2/synth_machxo2.cc
index bba8f4830..e86ec5aaf 100644
--- a/techlibs/machxo2/synth_machxo2.cc
+++ b/techlibs/machxo2/synth_machxo2.cc
@@ -185,7 +185,7 @@ struct SynthMachXO2Pass : public ScriptPass
{
if (!noiopad || help_mode)
{
- run("iopadmap -bits -outpad $__FACADE_OUTPAD I:O -inpad $__FACADE_INPAD O:I -toutpad $__FACADE_TOUTPAD OE:I:O -tinoutpad $__FACADE_TINOUTPAD OE:O:I:B A:top");
+ run("iopadmap -bits -outpad $__FACADE_OUTPAD I:O -inpad $__FACADE_INPAD O:I -toutpad $__FACADE_TOUTPAD ~T:I:O -tinoutpad $__FACADE_TINOUTPAD ~T:O:I:B A:top");
run("attrmvcp -attr src -attr LOC t:$__FACADE_OUTPAD %x:+[O] t:$__FACADE_TOUTPAD %x:+[O] t:$__FACADE_TINOUTPAD %x:+[B]");
run("attrmvcp -attr src -attr LOC -driven t:$__FACADE_INPAD %x:+[I]");
}