`endif
endmodule
+module FDSE (output Q, input C, CE, D, S);
+ parameter [0:0] INIT = 1'b1;
+ parameter [0:0] IS_C_INVERTED = 1'b0;
+ parameter [0:0] IS_D_INVERTED = 1'b0;
+ parameter [0:0] IS_S_INVERTED = 1'b0;
+`ifdef DFF_MODE
+ wire QQ, $Q;
+ generate if (INIT == 1'b1) begin
+ assign Q = ~QQ;
+ FDRE #(
+ .INIT(1'b0),
+ .IS_C_INVERTED(IS_C_INVERTED),
+ .IS_D_INVERTED(IS_D_INVERTED),
+ .IS_R_INVERTED(IS_S_INVERTED)
+ ) _TECHMAP_REPLACE_ (
+ .D(~D), .Q($Q), .C(C), .CE(CE), .R(S)
+ );
+ end
+ else begin
+ assign Q = QQ;
+ FDSE #(
+ .INIT(1'b0),
+ .IS_C_INVERTED(IS_C_INVERTED),
+ .IS_D_INVERTED(IS_D_INVERTED),
+ .IS_S_INVERTED(IS_S_INVERTED)
+ ) _TECHMAP_REPLACE_ (
+ .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
+ );
+ end endgenerate
+ $__ABC9_FF_ abc_dff (.D($Q), .Q(QQ));
+
+ // Special signals
+ wire [1:0] _TECHMAP_REPLACE_.$abc9_clock = {C, IS_C_INVERTED};
+ wire [0:0] _TECHMAP_REPLACE_.$abc9_init = 1'b0;
+ wire [0:0] _TECHMAP_REPLACE_.$abc9_currQ = QQ;
+`else
+ (* abc9_keep *)
+ FDSE #(
+ .INIT(INIT),
+ .IS_C_INVERTED(IS_C_INVERTED),
+ .IS_D_INVERTED(IS_D_INVERTED),
+ .IS_S_INVERTED(IS_S_INVERTED)
+ ) _TECHMAP_REPLACE_ (
+ .D(D), .Q(Q), .C(C), .CE(CE), .S(S)
+ );
+`endif
+endmodule
+module FDSE_1 (output Q, input C, CE, D, S);
+ parameter [0:0] INIT = 1'b1;
+`ifdef DFF_MODE
+ wire QQ, $Q;
+ generate if (INIT == 1'b1) begin
+ assign Q = ~QQ;
+ FDRE_1 #(
+ .INIT(1'b0)
+ ) _TECHMAP_REPLACE_ (
+ .D(~D), .Q($Q), .C(C), .CE(CE), .R(S)
+ );
+ end
+ else begin
+ assign Q = QQ;
+ FDSE_1 #(
+ .INIT(1'b0)
+ ) _TECHMAP_REPLACE_ (
+ .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
+ );
+ end endgenerate
+ $__ABC9_FF_ abc_dff (.D($Q), .Q(QQ));
+
+ // Special signals
+ wire [1:0] _TECHMAP_REPLACE_.$abc9_clock = {C, 1'b1 /* IS_C_INVERTED */};
+ wire [0:0] _TECHMAP_REPLACE_.$abc9_init = 1'b0;
+ wire [0:0] _TECHMAP_REPLACE_.$abc9_currQ = QQ;
+`else
+ (* abc9_keep *)
+ FDSE_1 #(
+ .INIT(INIT)
+ ) _TECHMAP_REPLACE_ (
+ .D(D), .Q(Q), .C(C), .CE(CE), .S(S)
+ );
+`endif
+endmodule
+
module FDCE (output Q, input C, CE, D, CLR);
parameter [0:0] INIT = 1'b0;
parameter [0:0] IS_C_INVERTED = 1'b0;
`endif
endmodule
-module FDSE (output Q, input C, CE, D, S);
- parameter [0:0] INIT = 1'b1;
- parameter [0:0] IS_C_INVERTED = 1'b0;
- parameter [0:0] IS_D_INVERTED = 1'b0;
- parameter [0:0] IS_S_INVERTED = 1'b0;
-`ifdef DFF_MODE
- wire QQ, $Q;
- generate if (INIT == 1'b1) begin
- assign Q = ~QQ;
- FDRE #(
- .INIT(1'b0),
- .IS_C_INVERTED(IS_C_INVERTED),
- .IS_D_INVERTED(IS_D_INVERTED),
- .IS_R_INVERTED(IS_S_INVERTED)
- ) _TECHMAP_REPLACE_ (
- .D(~D), .Q($Q), .C(C), .CE(CE), .R(S)
- );
- end
- else begin
- assign Q = QQ;
- FDSE #(
- .INIT(1'b0),
- .IS_C_INVERTED(IS_C_INVERTED),
- .IS_D_INVERTED(IS_D_INVERTED),
- .IS_S_INVERTED(IS_S_INVERTED)
- ) _TECHMAP_REPLACE_ (
- .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
- );
- end endgenerate
- $__ABC9_FF_ abc_dff (.D($Q), .Q(QQ));
-
- // Special signals
- wire [1:0] _TECHMAP_REPLACE_.$abc9_clock = {C, IS_C_INVERTED};
- wire [0:0] _TECHMAP_REPLACE_.$abc9_init = 1'b0;
- wire [0:0] _TECHMAP_REPLACE_.$abc9_currQ = QQ;
-`else
- (* abc9_keep *)
- FDSE #(
- .INIT(INIT),
- .IS_C_INVERTED(IS_C_INVERTED),
- .IS_D_INVERTED(IS_D_INVERTED),
- .IS_S_INVERTED(IS_S_INVERTED)
- ) _TECHMAP_REPLACE_ (
- .D(D), .Q(Q), .C(C), .CE(CE), .S(S)
- );
-`endif
-endmodule
-module FDSE_1 (output Q, input C, CE, D, S);
- parameter [0:0] INIT = 1'b1;
-`ifdef DFF_MODE
- wire QQ, $Q;
- generate if (INIT == 1'b1) begin
- assign Q = ~QQ;
- FDRE_1 #(
- .INIT(1'b0)
- ) _TECHMAP_REPLACE_ (
- .D(~D), .Q($Q), .C(C), .CE(CE), .R(S)
- );
- end
- else begin
- assign Q = QQ;
- FDSE_1 #(
- .INIT(1'b0)
- ) _TECHMAP_REPLACE_ (
- .D(D), .Q($Q), .C(C), .CE(CE), .S(S)
- );
- end endgenerate
- $__ABC9_FF_ abc_dff (.D($Q), .Q(QQ));
-
- // Special signals
- wire [1:0] _TECHMAP_REPLACE_.$abc9_clock = {C, 1'b1 /* IS_C_INVERTED */};
- wire [0:0] _TECHMAP_REPLACE_.$abc9_init = 1'b0;
- wire [0:0] _TECHMAP_REPLACE_.$abc9_currQ = QQ;
-`else
- (* abc9_keep *)
- FDSE_1 #(
- .INIT(INIT)
- ) _TECHMAP_REPLACE_ (
- .D(D), .Q(Q), .C(C), .CE(CE), .S(S)
- );
-`endif
-endmodule
-
// Attach a (combinatorial) black-box onto the output
// of thes LUTRAM primitives to capture their
// asynchronous read behaviour
always @(negedge C) if (R) Q <= 1'b0; else if (CE) Q <= D;
endmodule
+(* abc9_box_id=1102, lib_whitebox, abc9_flop *)
+module FDSE (
+ (* abc9_arrival=303 *)
+ output reg Q,
+ (* clkbuf_sink *)
+ (* invertible_pin = "IS_C_INVERTED" *)
+ input C,
+ input CE,
+ (* invertible_pin = "IS_D_INVERTED" *)
+ input D,
+ (* invertible_pin = "IS_S_INVERTED" *)
+ input S
+);
+ parameter [0:0] INIT = 1'b1;
+ parameter [0:0] IS_C_INVERTED = 1'b0;
+ parameter [0:0] IS_D_INVERTED = 1'b0;
+ parameter [0:0] IS_S_INVERTED = 1'b0;
+ initial Q <= INIT;
+ generate case (|IS_C_INVERTED)
+ 1'b0: always @(posedge C) if (S == !IS_S_INVERTED) Q <= 1'b1; else if (CE) Q <= D ^ IS_D_INVERTED;
+ 1'b1: always @(negedge C) if (S == !IS_S_INVERTED) Q <= 1'b1; else if (CE) Q <= D ^ IS_D_INVERTED;
+ endcase endgenerate
+endmodule
+
+(* abc9_box_id=1103, lib_whitebox, abc9_flop *)
+module FDSE_1 (
+ (* abc9_arrival=303 *)
+ output reg Q,
+ (* clkbuf_sink *)
+ input C,
+ input CE, D, S
+);
+ parameter [0:0] INIT = 1'b1;
+ initial Q <= INIT;
+ always @(negedge C) if (S) Q <= 1'b1; else if (CE) Q <= D;
+endmodule
+
module FDRSE (
output reg Q,
(* clkbuf_sink *)
Q <= d;
endmodule
-(* abc9_box_id=1102, lib_whitebox, abc9_flop *)
+(* abc9_box_id=1104, lib_whitebox, abc9_flop *)
module FDCE (
(* abc9_arrival=303 *)
output reg Q,
endcase endgenerate
endmodule
-(* abc9_box_id=1103, lib_whitebox, abc9_flop *)
+(* abc9_box_id=1105, lib_whitebox, abc9_flop *)
module FDCE_1 (
(* abc9_arrival=303 *)
output reg Q,
always @(negedge C, posedge CLR) if (CLR) Q <= 1'b0; else if (CE) Q <= D;
endmodule
-module FDCPE (
- output wire Q,
- (* clkbuf_sink *)
- (* invertible_pin = "IS_C_INVERTED" *)
- input C,
- input CE,
- (* invertible_pin = "IS_CLR_INVERTED" *)
- input CLR,
- input D,
- (* invertible_pin = "IS_PRE_INVERTED" *)
- input PRE
-);
- parameter [0:0] INIT = 1'b0;
- parameter [0:0] IS_C_INVERTED = 1'b0;
- parameter [0:0] IS_CLR_INVERTED = 1'b0;
- parameter [0:0] IS_PRE_INVERTED = 1'b0;
- wire c = C ^ IS_C_INVERTED;
- wire clr = CLR ^ IS_CLR_INVERTED;
- wire pre = PRE ^ IS_PRE_INVERTED;
- // Hacky model to avoid simulation-synthesis mismatches.
- reg qc, qp, qs;
- initial qc = INIT;
- initial qp = INIT;
- initial qs = 0;
- always @(posedge c, posedge clr) begin
- if (clr)
- qc <= 0;
- else if (CE)
- qc <= D;
- end
- always @(posedge c, posedge pre) begin
- if (pre)
- qp <= 1;
- else if (CE)
- qp <= D;
- end
- always @* begin
- if (clr)
- qs <= 0;
- else if (pre)
- qs <= 1;
- end
- assign Q = qs ? qp : qc;
-endmodule
-
-(* abc9_box_id=1104, lib_whitebox, abc9_flop *)
+(* abc9_box_id=1106, lib_whitebox, abc9_flop *)
module FDPE (
(* abc9_arrival=303 *)
output reg Q,
endcase endgenerate
endmodule
-(* abc9_box_id=1105, lib_whitebox, abc9_flop *)
+(* abc9_box_id=1107, lib_whitebox, abc9_flop *)
module FDPE_1 (
(* abc9_arrival=303 *)
output reg Q,
always @(negedge C, posedge PRE) if (PRE) Q <= 1'b1; else if (CE) Q <= D;
endmodule
-(* abc9_box_id=1106, lib_whitebox, abc9_flop *)
-module FDSE (
- (* abc9_arrival=303 *)
- output reg Q,
+module FDCPE (
+ output wire Q,
(* clkbuf_sink *)
(* invertible_pin = "IS_C_INVERTED" *)
input C,
input CE,
- (* invertible_pin = "IS_D_INVERTED" *)
+ (* invertible_pin = "IS_CLR_INVERTED" *)
+ input CLR,
input D,
- (* invertible_pin = "IS_S_INVERTED" *)
- input S
+ (* invertible_pin = "IS_PRE_INVERTED" *)
+ input PRE
);
- parameter [0:0] INIT = 1'b1;
+ parameter [0:0] INIT = 1'b0;
parameter [0:0] IS_C_INVERTED = 1'b0;
- parameter [0:0] IS_D_INVERTED = 1'b0;
- parameter [0:0] IS_S_INVERTED = 1'b0;
- initial Q <= INIT;
- generate case (|IS_C_INVERTED)
- 1'b0: always @(posedge C) if (S == !IS_S_INVERTED) Q <= 1'b1; else if (CE) Q <= D ^ IS_D_INVERTED;
- 1'b1: always @(negedge C) if (S == !IS_S_INVERTED) Q <= 1'b1; else if (CE) Q <= D ^ IS_D_INVERTED;
- endcase endgenerate
-endmodule
-
-(* abc9_box_id=1107, lib_whitebox, abc9_flop *)
-module FDSE_1 (
- (* abc9_arrival=303 *)
- output reg Q,
- (* clkbuf_sink *)
- input C,
- input CE, D, S
-);
- parameter [0:0] INIT = 1'b1;
- initial Q <= INIT;
- always @(negedge C) if (S) Q <= 1'b1; else if (CE) Q <= D;
+ parameter [0:0] IS_CLR_INVERTED = 1'b0;
+ parameter [0:0] IS_PRE_INVERTED = 1'b0;
+ wire c = C ^ IS_C_INVERTED;
+ wire clr = CLR ^ IS_CLR_INVERTED;
+ wire pre = PRE ^ IS_PRE_INVERTED;
+ // Hacky model to avoid simulation-synthesis mismatches.
+ reg qc, qp, qs;
+ initial qc = INIT;
+ initial qp = INIT;
+ initial qs = 0;
+ always @(posedge c, posedge clr) begin
+ if (clr)
+ qc <= 0;
+ else if (CE)
+ qc <= D;
+ end
+ always @(posedge c, posedge pre) begin
+ if (pre)
+ qp <= 1;
+ else if (CE)
+ qp <= D;
+ end
+ always @* begin
+ if (clr)
+ qs <= 0;
+ else if (pre)
+ qs <= 1;
+ end
+ assign Q = qs ? qp : qc;
endmodule
module LDCE (