data/full_repos/permissive/219219909/Complex_Multiplier/align_2.v
data/verilator_xmls/80d2214a-43e5-4e75-be29-e46c3b0e18dd.xml
module align_2(
    input [23:0] A,
    input [23:0] B,
    input [7:0] AE,
    input [7:0] BE,
    input [7:0] D,
    output reg [23:0] A1,
    output reg [23:0] B1,
    output reg [7:0] AE1,
    output reg [7:0] BE1
    );

always @(A,B,AE,BE,D) begin
if (AE>BE) begin
B1<=B>>D;
BE1<=BE+D;
A1<=A;
AE1<=AE;
end
else if (AE<BE) begin
A1<=A>>D;
AE1<=AE+D;
B1<=B;
BE1<=BE;
end
else begin
A1<=A;
B1<=B;
BE1<=BE;
AE1<=AE;
end
end

endmodule
module align_2(
    input [23:0] A,
    input [23:0] B,
    input [7:0] AE,
    input [7:0] BE,
    input [7:0] D,
    output reg [23:0] A1,
    output reg [23:0] B1,
    output reg [7:0] AE1,
    output reg [7:0] BE1
    );


always @(A,B,AE,BE,D) begin
if (AE>BE) begin
B1<=B>>D;
BE1<=BE+D;
A1<=A;
AE1<=AE;
end
else if (AE<BE) begin
A1<=A>>D;
AE1<=AE+D;
B1<=B;
BE1<=BE;
end
else begin
A1<=A;
B1<=B;
BE1<=BE;
AE1<=AE;
end
end

endmodule