mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #673 from daveshah1/ecp5_improve
Small ECP5 improvements
This commit is contained in:
commit
11c8a9eb96
|
@ -8,6 +8,7 @@ $(eval $(call add_share_file,share/ecp5,techlibs/ecp5/dram.txt))
|
||||||
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/brams_map.v))
|
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/brams_map.v))
|
||||||
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/bram.txt))
|
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/bram.txt))
|
||||||
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/arith_map.v))
|
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/arith_map.v))
|
||||||
|
$(eval $(call add_share_file,share/ecp5,techlibs/ecp5/latches_map.v))
|
||||||
|
|
||||||
EXTRA_OBJS += techlibs/ecp5/brams_init.mk techlibs/ecp5/brams_connect.mk
|
EXTRA_OBJS += techlibs/ecp5/brams_init.mk techlibs/ecp5/brams_connect.mk
|
||||||
.SECONDARY: techlibs/ecp5/brams_init.mk techlibs/ecp5/brams_connect.mk
|
.SECONDARY: techlibs/ecp5/brams_init.mk techlibs/ecp5/brams_connect.mk
|
||||||
|
|
|
@ -265,16 +265,18 @@ module TRELLIS_IO(
|
||||||
output O
|
output O
|
||||||
);
|
);
|
||||||
parameter DIR = "INPUT";
|
parameter DIR = "INPUT";
|
||||||
|
reg T_pd;
|
||||||
|
always @(*) if (T === 1'bz) T_pd <= 1'b0; else T_pd <= T;
|
||||||
|
|
||||||
generate
|
generate
|
||||||
if (DIR == "INPUT") begin
|
if (DIR == "INPUT") begin
|
||||||
assign B = 1'bz;
|
assign B = 1'bz;
|
||||||
assign O = B;
|
assign O = B;
|
||||||
end else if (DIR == "OUTPUT") begin
|
end else if (DIR == "OUTPUT") begin
|
||||||
assign B = T ? 1'bz : I;
|
assign B = T_pd ? 1'bz : I;
|
||||||
assign O = 1'bx;
|
assign O = 1'bx;
|
||||||
end else if (DIR == "INOUT") begin
|
end else if (DIR == "BIDIR") begin
|
||||||
assign B = T ? 1'bz : I;
|
assign B = T_pd ? 1'bz : I;
|
||||||
assign O = B;
|
assign O = B;
|
||||||
end else begin
|
end else begin
|
||||||
ERROR_UNKNOWN_IO_MODE error();
|
ERROR_UNKNOWN_IO_MODE error();
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
module \$_DLATCH_N_ (E, D, Q);
|
||||||
|
wire [1023:0] _TECHMAP_DO_ = "simplemap; opt";
|
||||||
|
input E, D;
|
||||||
|
output Q = !E ? D : Q;
|
||||||
|
endmodule
|
||||||
|
|
||||||
|
module \$_DLATCH_P_ (E, D, Q);
|
||||||
|
wire [1023:0] _TECHMAP_DO_ = "simplemap; opt";
|
||||||
|
input E, D;
|
||||||
|
output Q = E ? D : Q;
|
||||||
|
endmodule
|
|
@ -266,10 +266,7 @@ struct SynthEcp5Pass : public ScriptPass
|
||||||
if (abc2 || help_mode) {
|
if (abc2 || help_mode) {
|
||||||
run("abc", " (only if -abc2)");
|
run("abc", " (only if -abc2)");
|
||||||
}
|
}
|
||||||
//TODO
|
|
||||||
#if 0
|
|
||||||
run("techmap -map +/ecp5/latches_map.v");
|
run("techmap -map +/ecp5/latches_map.v");
|
||||||
#endif
|
|
||||||
if (nomux)
|
if (nomux)
|
||||||
run("abc -lut 4");
|
run("abc -lut 4");
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue