diff options
author | William D. Jones <thor0505@comcast.net> | 2021-01-31 11:33:20 -0500 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-02-23 17:39:58 +0100 |
commit | 4e9def23de62c4e25478cdcaaba525d8686ac90c (patch) | |
tree | beb6fa5d082424a63aaec0784704661b8633e2b5 | |
parent | 8b14152506cdae1f15a33189736cbd3388f3b345 (diff) | |
download | yosys-4e9def23de62c4e25478cdcaaba525d8686ac90c.tar.gz yosys-4e9def23de62c4e25478cdcaaba525d8686ac90c.tar.bz2 yosys-4e9def23de62c4e25478cdcaaba525d8686ac90c.zip |
machxo2: Tristate is active-low.
-rw-r--r-- | techlibs/machxo2/cells_map.v | 6 | ||||
-rw-r--r-- | techlibs/machxo2/cells_sim.v | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/techlibs/machxo2/cells_map.v b/techlibs/machxo2/cells_map.v index 15428d4dc..82eb10d95 100644 --- a/techlibs/machxo2/cells_map.v +++ b/techlibs/machxo2/cells_map.v @@ -28,7 +28,7 @@ endmodule module \$_DFF_P_ (input D, C, output Q); FACADE_FF #(.CEMUX("1"), .CLKMUX("CLK"), .LSRMUX("LSR"), .REGSET("RESET")) _TECHMAP_REPLACE_ (.CLK(C), .LSR(1'b0), .DI(D), .Q(Q)); endmodule // 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'b1)); endmodule +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, 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 diff --git a/techlibs/machxo2/cells_sim.v b/techlibs/machxo2/cells_sim.v index d2267e8fd..5f985d477 100644 --- a/techlibs/machxo2/cells_sim.v +++ b/techlibs/machxo2/cells_sim.v @@ -168,9 +168,9 @@ module FACADE_IO #( if (DIR == "INPUT") begin assign O = PAD; end else if (DIR == "OUTPUT") begin - assign PAD = T ? I : 1'bz; + assign PAD = T ? 1'bz : I; end else if (DIR == "BIDIR") begin - assign PAD = T ? I : 1'bz; + assign PAD = T ? 1'bz : I; assign O = PAD; end else begin ERROR_UNKNOWN_IO_MODE error(); |