Skip to content

Commit 7d56069

Browse files
committed
techmap: map $alu to $fa instead of relying on extract_fa
1 parent 0c68909 commit 7d56069

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

techlibs/common/techmap.v

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,16 @@ module _90_alu (A, B, CI, BI, X, Y, CO);
283283
\$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf));
284284
\$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf));
285285

286-
\$lcu #(.WIDTH(Y_WIDTH)) lcu (.P(X), .G(AA & BB), .CI(CI), .CO(CO));
286+
(* force_downto *)
287+
wire [Y_WIDTH-1:0] P;
288+
wire [Y_WIDTH-1:0] G;
289+
wire [Y_WIDTH-1:0] Cnull;
290+
assign Cnull = 1'b0;
291+
292+
\$fa #(.WIDTH(Y_WIDTH)) fa (.A(AA), .B(BB), .C(Cnull), .X(G), .Y(P));
293+
\$lcu #(.WIDTH(Y_WIDTH)) lcu (.P(P), .G(G), .CI(CI), .CO(CO));
287294

288-
assign X = AA ^ BB;
295+
assign X = P;
289296
assign Y = X ^ {CO, CI};
290297
endmodule
291298

0 commit comments

Comments
 (0)