3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-20 07:36:39 +00:00
This commit is contained in:
Emil J 2025-04-17 07:53:42 -04:00 committed by GitHub
commit 3c44ecbe6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -283,9 +283,16 @@ module _90_alu (A, B, CI, BI, X, Y, CO);
\$pos #(.A_SIGNED(A_SIGNED), .A_WIDTH(A_WIDTH), .Y_WIDTH(Y_WIDTH)) A_conv (.A(A), .Y(A_buf));
\$pos #(.A_SIGNED(B_SIGNED), .A_WIDTH(B_WIDTH), .Y_WIDTH(Y_WIDTH)) B_conv (.A(B), .Y(B_buf));
\$lcu #(.WIDTH(Y_WIDTH)) lcu (.P(X), .G(AA & BB), .CI(CI), .CO(CO));
(* force_downto *)
wire [Y_WIDTH-1:0] P;
wire [Y_WIDTH-1:0] G;
wire [Y_WIDTH-1:0] Cnull;
assign Cnull = 1'b0;
assign X = AA ^ BB;
\$fa #(.WIDTH(Y_WIDTH)) fa (.A(AA), .B(BB), .C(Cnull), .X(G), .Y(P));
\$lcu #(.WIDTH(Y_WIDTH)) lcu (.P(P), .G(G), .CI(CI), .CO(CO));
assign X = P;
assign Y = X ^ {CO, CI};
endmodule