mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-27 10:55:51 +00:00
change ql-bram-types pass to use mode parameter; clean up primitive libraries
This commit is contained in:
parent
688455ef69
commit
7c0dbc8822
13 changed files with 74503 additions and 74255 deletions
|
@ -16,116 +16,116 @@
|
|||
|
||||
// DFF, asynchronous set/reset, enable
|
||||
module \$_DFFSRE_PNNP_ (C, S, R, E, D, Q);
|
||||
input C;
|
||||
input S;
|
||||
input R;
|
||||
input E;
|
||||
input D;
|
||||
output Q;
|
||||
dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S));
|
||||
input C;
|
||||
input S;
|
||||
input R;
|
||||
input E;
|
||||
input D;
|
||||
output Q;
|
||||
dffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S));
|
||||
endmodule
|
||||
|
||||
module \$_DFFSRE_NNNP_ (C, S, R, E, D, Q);
|
||||
input C;
|
||||
input S;
|
||||
input R;
|
||||
input E;
|
||||
input D;
|
||||
output Q;
|
||||
dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S));
|
||||
input C;
|
||||
input S;
|
||||
input R;
|
||||
input E;
|
||||
input D;
|
||||
output Q;
|
||||
dffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(S));
|
||||
endmodule
|
||||
|
||||
// DFF, synchronous set or reset, enable
|
||||
module \$_SDFFE_PN0P_ (D, C, R, E, Q);
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1));
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1));
|
||||
endmodule
|
||||
|
||||
module \$_SDFFE_PN1P_ (D, C, R, E, Q);
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R));
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R));
|
||||
endmodule
|
||||
|
||||
module \$_SDFFE_NN0P_ (D, C, R, E, Q);
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1));
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(R), .S(1'b1));
|
||||
endmodule
|
||||
|
||||
module \$_SDFFE_NN1P_ (D, C, R, E, Q);
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R));
|
||||
input D;
|
||||
input C;
|
||||
input R;
|
||||
input E;
|
||||
output Q;
|
||||
sdffnsre _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .E(E), .R(1'b1), .S(R));
|
||||
endmodule
|
||||
|
||||
// Latch, no set/reset, no enable
|
||||
module \$_DLATCH_P_ (input E, D, output Q);
|
||||
latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(1'b1), .S(1'b1));
|
||||
latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(1'b1), .S(1'b1));
|
||||
endmodule
|
||||
|
||||
module \$_DLATCH_N_ (input E, D, output Q);
|
||||
latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(1'b1), .S(1'b1));
|
||||
latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(1'b1), .S(1'b1));
|
||||
endmodule
|
||||
|
||||
// Latch with async set and reset and enable
|
||||
module \$_DLATCHSR_PPP_ (input E, S, R, D, output Q);
|
||||
latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S));
|
||||
latchsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S));
|
||||
endmodule
|
||||
|
||||
module \$_DLATCHSR_NPP_ (input E, S, R, D, output Q);
|
||||
latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S));
|
||||
latchnsre _TECHMAP_REPLACE_ (.D(D), .Q(Q), .E(1'b1), .G(E), .R(!R), .S(!S));
|
||||
endmodule
|
||||
|
||||
module \$__SHREG_DFF_P_ (D, Q, C);
|
||||
input D;
|
||||
input C;
|
||||
output Q;
|
||||
input D;
|
||||
input C;
|
||||
output Q;
|
||||
|
||||
parameter DEPTH = 2;
|
||||
parameter DEPTH = 2;
|
||||
|
||||
reg [DEPTH-2:0] q;
|
||||
reg [DEPTH-2:0] q;
|
||||
|
||||
genvar i;
|
||||
generate for (i = 0; i < DEPTH; i = i + 1) begin: slice
|
||||
genvar i;
|
||||
generate for (i = 0; i < DEPTH; i = i + 1) begin: slice
|
||||
|
||||
// First in chain
|
||||
generate if (i == 0) begin
|
||||
sh_dff #() shreg_beg (
|
||||
.Q(q[i]),
|
||||
.D(D),
|
||||
.C(C)
|
||||
);
|
||||
end endgenerate
|
||||
// Middle in chain
|
||||
generate if (i > 0 && i != DEPTH-1) begin
|
||||
sh_dff #() shreg_mid (
|
||||
.Q(q[i]),
|
||||
.D(q[i-1]),
|
||||
.C(C)
|
||||
);
|
||||
end endgenerate
|
||||
// Last in chain
|
||||
generate if (i == DEPTH-1) begin
|
||||
sh_dff #() shreg_end (
|
||||
.Q(Q),
|
||||
.D(q[i-1]),
|
||||
.C(C)
|
||||
);
|
||||
end endgenerate
|
||||
// First in chain
|
||||
generate if (i == 0) begin
|
||||
sh_dff #() shreg_beg (
|
||||
.Q(q[i]),
|
||||
.D(D),
|
||||
.C(C)
|
||||
);
|
||||
end endgenerate
|
||||
// Middle in chain
|
||||
generate if (i > 0 && i != DEPTH-1) begin
|
||||
sh_dff #() shreg_mid (
|
||||
.Q(q[i]),
|
||||
.D(q[i-1]),
|
||||
.C(C)
|
||||
);
|
||||
end endgenerate
|
||||
// Last in chain
|
||||
generate if (i == DEPTH-1) begin
|
||||
sh_dff #() shreg_end (
|
||||
.Q(Q),
|
||||
.D(q[i-1]),
|
||||
.C(C)
|
||||
);
|
||||
end endgenerate
|
||||
end: slice
|
||||
endgenerate
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue