diff --git a/techlibs/nanoxplore/io_map.v b/techlibs/nanoxplore/io_map.v index 42fac461903..edbb0437b11 100644 --- a/techlibs/nanoxplore/io_map.v +++ b/techlibs/nanoxplore/io_map.v @@ -6,3 +6,10 @@ module \$__BEYOND_OBUF (output PAD, input I); NX_IOB_O _TECHMAP_REPLACE_ (.IO(PAD), .I(I), .C(1'b1)); endmodule +module \$__BEYOND_TOBUF (output PAD, input I, input C); + NX_IOB _TECHMAP_REPLACE_ (.IO(PAD), .I(I), .C(C)); +endmodule + +module \$__BEYOND_IOBUF (output PAD, input I, output O, output C); + NX_IOB _TECHMAP_REPLACE_ (.IO(PAD), .I(I), .O(O), .C(C)); +endmodule diff --git a/techlibs/nanoxplore/synth_nanoxplore.cc b/techlibs/nanoxplore/synth_nanoxplore.cc index 3842877e433..52d0256031e 100644 --- a/techlibs/nanoxplore/synth_nanoxplore.cc +++ b/techlibs/nanoxplore/synth_nanoxplore.cc @@ -292,10 +292,10 @@ struct SynthNanoXplorePass : public ScriptPass run("nx_carry"); } if (help_mode || iopad) { - run("iopadmap -bits -outpad $__BEYOND_OBUF I:PAD -inpad $__BEYOND_IBUF O:PAD A:top", "(only if '-iopad')"); + run("iopadmap -bits -outpad $__BEYOND_OBUF I:PAD -toutpad $__BEYOND_TOBUF C:I:PAD -inpad $__BEYOND_IBUF O:PAD -tinoutpad $__BEYOND_IOBUF C:O:I:PAD A:top", "(only if '-iopad')"); run("techmap -map +/nanoxplore/io_map.v"); - run("attrmvcp -attr LOC t:NX_IOB_O n:*"); - run("attrmvcp -attr LOC -driven t:NX_IOB_I n:*"); + run("attrmvcp -attr LOC t:NX_IOB_O t:NX_IOB n:*"); + run("attrmvcp -attr LOC -driven t:NX_IOB_I t:NX_IOB n:*"); } run("opt -fast"); } diff --git a/tests/arch/nanoxplore/tribuf.ys b/tests/arch/nanoxplore/tribuf.ys index c72e2e1ad5e..e55764f0126 100644 --- a/tests/arch/nanoxplore/tribuf.ys +++ b/tests/arch/nanoxplore/tribuf.ys @@ -4,9 +4,10 @@ proc tribuf flatten synth -equiv_opt -assert -map +/nanoxplore/cells_sim.v -map +/simcells.v synth_nanoxplore # equivalency check +equiv_opt -assert -map +/nanoxplore/cells_sim.v -map +/simcells.v synth_nanoxplore -iopad # equivalency check design -load postopt # load the post-opt design (otherwise equiv_opt loads the pre-opt design) cd tristate # Constrain all select calls below inside the top module #Internal cell type used. Need support it. -select -assert-count 1 t:$_TBUF_ -select -assert-none t:$_TBUF_ %% t:* %D +select -assert-count 1 t:NX_IOB +select -assert-count 2 t:NX_IOB_I +select -assert-none t:NX_IOB t:NX_IOB_I %% t:* %D