Skip to content

Commit

Permalink
support other I/O configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed May 9, 2024
1 parent 3ddc553 commit bbbf9c1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions techlibs/nanoxplore/io_map.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions techlibs/nanoxplore/synth_nanoxplore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
7 changes: 4 additions & 3 deletions tests/arch/nanoxplore/tribuf.ys
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bbbf9c1

Please sign in to comment.