mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-15 10:26:17 +00:00
Added tri-state I/O extraction for GreenPak
This commit is contained in:
parent
66095153fd
commit
dcee3256d5
5 changed files with 29 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
||||||
OBJS += techlibs/greenpak4/synth_greenpak4.o
|
OBJS += techlibs/greenpak4/synth_greenpak4.o
|
||||||
OBJS += techlibs/greenpak4/greenpak4_counters.o
|
OBJS += techlibs/greenpak4/greenpak4_counters.o
|
||||||
|
|
||||||
|
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_extract.v))
|
||||||
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_map.v))
|
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_map.v))
|
||||||
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_sim.v))
|
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/cells_sim.v))
|
||||||
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/gp_dff.lib))
|
$(eval $(call add_share_file,share/greenpak4,techlibs/greenpak4/gp_dff.lib))
|
||||||
|
|
15
techlibs/greenpak4/cells_extract.v
Normal file
15
techlibs/greenpak4/cells_extract.v
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
//Wrapper module to patch up output of iopadmap
|
||||||
|
module GP_IOBUF(input IN, output OUT, input OE, inout IO);
|
||||||
|
|
||||||
|
GP_IBUF ibuf(
|
||||||
|
.IN(IO),
|
||||||
|
.OUT(OUT)
|
||||||
|
);
|
||||||
|
|
||||||
|
$_TBUF_ tbuf(
|
||||||
|
.A(IN),
|
||||||
|
.E(OE),
|
||||||
|
.Y(OUT)
|
||||||
|
);
|
||||||
|
|
||||||
|
endmodule
|
|
@ -24,6 +24,15 @@ module GP_DFFR(input D, CLK, nRST, output reg Q);
|
||||||
);
|
);
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
module GP_OBUFT(input IN, input OE, output OUT);
|
||||||
|
GP_IOBUF _TECHMAP_REPLACE_ (
|
||||||
|
.IN(IN),
|
||||||
|
.OE(OE),
|
||||||
|
.IO(OUT),
|
||||||
|
.OUT()
|
||||||
|
);
|
||||||
|
endmodule
|
||||||
|
|
||||||
module \$lut (A, Y);
|
module \$lut (A, Y);
|
||||||
parameter WIDTH = 0;
|
parameter WIDTH = 0;
|
||||||
parameter LUT = 0;
|
parameter LUT = 0;
|
||||||
|
|
|
@ -138,9 +138,9 @@ module GP_IBUF(input IN, output OUT);
|
||||||
assign OUT = IN;
|
assign OUT = IN;
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module GP_IOBUF(input IN, input DIR, output OUT, inout IO);
|
module GP_IOBUF(input IN, input OE, output OUT, inout IO);
|
||||||
assign IN = IO;
|
assign IN = IO;
|
||||||
assign DIR = OE ? OUT : 1'bz;
|
assign IO = OE ? OUT : 1'bz;
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module GP_INV(input IN, output OUT);
|
module GP_INV(input IN, output OUT);
|
||||||
|
|
|
@ -176,6 +176,8 @@ struct SynthGreenPAK4Pass : public ScriptPass
|
||||||
if (check_label("map_cells"))
|
if (check_label("map_cells"))
|
||||||
{
|
{
|
||||||
run("shregmap -tech greenpak4");
|
run("shregmap -tech greenpak4");
|
||||||
|
run("iopadmap -bits -inpad GP_IBUF OUT:IN -outpad GP_OBUF IN:OUT -inoutpad GP_IBUF OUT:IN");
|
||||||
|
run("extract -map +/greenpak4/cells_extract.v -verbose");
|
||||||
run("dfflibmap -liberty +/greenpak4/gp_dff.lib");
|
run("dfflibmap -liberty +/greenpak4/gp_dff.lib");
|
||||||
run("techmap -map +/greenpak4/cells_map.v");
|
run("techmap -map +/greenpak4/cells_map.v");
|
||||||
run("dffinit -ff GP_DFF Q INIT");
|
run("dffinit -ff GP_DFF Q INIT");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue