Skip to content

Commit 1238fcd

Browse files
committed
Revert "Merge pull request YosysHQ#4997 from YosysHQ/emil/techmap-alu-half-adder"
This reverts commit a316b8f, reversing changes made to d4071b6.
1 parent da2e021 commit 1238fcd

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

techlibs/common/techmap.v

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,9 @@ 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-
(* 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));
286+
\$lcu #(.WIDTH(Y_WIDTH)) lcu (.P(X), .G(AA & BB), .CI(CI), .CO(CO));
294287

295-
assign X = P;
288+
assign X = AA ^ BB;
296289
assign Y = X ^ {CO, CI};
297290
endmodule
298291

0 commit comments

Comments
 (0)