| module \$_DFF_P_ (D, Q, C); |
| input D; |
| input C; |
| output Q; |
| dff _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C)); |
| endmodule |
| |
| module \$_DFF_PN0_ (D, Q, C, R); |
| input D; |
| input C; |
| input R; |
| output Q; |
| dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(R)); |
| endmodule |
| |
| module \$_DFF_PP0_ (D, Q, C, R); |
| input D; |
| input C; |
| input R; |
| output Q; |
| dffr _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .R(!R)); |
| endmodule |
| |
| module \$_DFF_PN1_ (D, Q, C, R); |
| input D; |
| input C; |
| input R; |
| output Q; |
| dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(R)); |
| endmodule |
| |
| module \$_DFF_PP1_ (D, Q, C, R); |
| input D; |
| input C; |
| input R; |
| output Q; |
| dffs _TECHMAP_REPLACE_ (.Q(Q), .D(D), .C(C), .S(!R)); |
| endmodule |
| |
| module \$__SHREG_DFF_P_ (D, Q, C); |
| input D; |
| input C; |
| output Q; |
| |
| parameter DEPTH = 2; |
| reg [DEPTH-2:0] q; |
| //wire [DEPTH-1:0] d; |
| genvar i; |
| assign d[0] = D; |
| generate for (i = 0; i < DEPTH; i = i + 1) begin: slice |
| |
| |
| // First in chain |
| generate if (i == 0) begin |
| sh_dff #() _TECHMAP_REPLACE_ ( |
| .Q(q[i]), |
| .D(D), |
| .C(C) |
| ); |
| end endgenerate |
| // Middle in chain |
| generate if (i > 0 && i != DEPTH-1) begin |
| sh_dff #() _TECHMAP_REPLACE_ ( |
| .Q(q[i]), |
| .D(q[i-1]), |
| .C(C) |
| ); |
| end endgenerate |
| // Last in chain |
| generate if (i == DEPTH-1) begin |
| sh_dff #() _TECHMAP_REPLACE_ ( |
| .Q(Q), |
| .D(q[i-1]), |
| .C(C) |
| ); |
| end endgenerate |
| end: slice |
| endgenerate |
| |
| endmodule |