diff options
author | William D. Jones <thor0505@comcast.net> | 2020-11-26 13:39:40 -0500 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-02-23 17:39:58 +0100 |
commit | c76f361b56216aa4021c88e5d00b7d8323165967 (patch) | |
tree | 642346b70530e2190114a4623cdc720c9025e5f7 | |
parent | 03cbf1327d01dbb7997d2f2b241340c29ff35e00 (diff) | |
download | yosys-c76f361b56216aa4021c88e5d00b7d8323165967.tar.gz yosys-c76f361b56216aa4021c88e5d00b7d8323165967.tar.bz2 yosys-c76f361b56216aa4021c88e5d00b7d8323165967.zip |
machxo2: synth_machxo2 now maps ports to FACADE_IO.
-rw-r--r-- | techlibs/machxo2/cells_map.v | 7 | ||||
-rw-r--r-- | techlibs/machxo2/synth_machxo2.cc | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/techlibs/machxo2/cells_map.v b/techlibs/machxo2/cells_map.v index 924df6f25..a02630703 100644 --- a/techlibs/machxo2/cells_map.v +++ b/techlibs/machxo2/cells_map.v @@ -24,4 +24,11 @@ module \$lut (A, Y); LUT4 #(.INIT({rep{LUT}})) _TECHMAP_REPLACE_ (.A(I[0]), .B(I[1]), .C(I[2]), .D(I[3]), .Z(Y)); endmodule +// DFFs 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), .EN(1'b1)); 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), .EN(OE)); endmodule +module \$__FACADE_TINOUTPAD (input I, OE, output O, inout B); FACADE_IO #(.DIR("BIDIR")) _TECHMAP_REPLACE_ (.PAD(B), .I(I), .O(O), .EN(OE)); endmodule diff --git a/techlibs/machxo2/synth_machxo2.cc b/techlibs/machxo2/synth_machxo2.cc index f126f9c32..794f25d0a 100644 --- a/techlibs/machxo2/synth_machxo2.cc +++ b/techlibs/machxo2/synth_machxo2.cc @@ -173,6 +173,11 @@ struct SynthMachXO2Pass : public ScriptPass run("opt -fast"); } + if (check_label("map_ios")) + { + 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"); + } + if (check_label("map_ffs")) { run("dfflegalize -cell $_DFF_P_ 0"); |