module __float32__add( input wire [31:0] x, input wire [31:0] y, output wire [31:0] out ); function automatic [1:0] priority_sel_2b_2way (input reg [1:0] sel, input reg [1:0] case0, input reg [1:0] case1, input reg [1:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_2b_2way = case0; end 2'b10: begin priority_sel_2b_2way = case1; end 2'b00: begin priority_sel_2b_2way = default_value; end default: begin // Propagate X priority_sel_2b_2way = 2'dx; end endcase end endfunction function automatic [2:0] priority_sel_3b_2way (input reg [1:0] sel, input reg [2:0] case0, input reg [2:0] case1, input reg [2:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_3b_2way = case0; end 2'b10: begin priority_sel_3b_2way = case1; end 2'b00: begin priority_sel_3b_2way = default_value; end default: begin // Propagate X priority_sel_3b_2way = 3'dx; end endcase end endfunction function automatic priority_sel_1b_2way (input reg [1:0] sel, input reg case0, input reg case1, input reg default_value); begin casez (sel) 2'b?1: begin priority_sel_1b_2way = case0; end 2'b10: begin priority_sel_1b_2way = case1; end 2'b00: begin priority_sel_1b_2way = default_value; end default: begin // Propagate X priority_sel_1b_2way = 1'dx; end endcase end endfunction wire [7:0] y_bexp__1; wire literal_28782; wire [7:0] x_bexp__1; wire [7:0] y_bexpnot; wire [8:0] x_bexp_extended__1; wire [8:0] y_bexpnot_extended; wire [8:0] full_result; wire overflow_detected; wire [22:0] tuple_index_28789; wire [22:0] tuple_index_28790; wire [7:0] x_bexp; wire [7:0] literal_28792; wire [7:0] y_bexp; wire literal_28794; wire [22:0] x_fraction; wire [22:0] y_fraction; wire nc; wire [23:0] fraction_x; wire [23:0] fraction_y; wire [23:0] sign_ext_28803; wire [7:0] narrowed_result; wire [7:0] x_bexpor_mask; wire tuple_index_28807; wire tuple_index_28808; wire [23:0] fraction_x__1; wire [23:0] fraction_y__1; wire [2:0] xddend_x__1_squeezed_const_lsb_bits; wire [7:0] result; wire x_sign; wire y_sign; wire [24:0] wide_x_squeezed; wire [26:0] wide_y_shift_bits; wire [7:0] shift; wire [26:0] shrl_28822; wire [27:0] shll_28824; wire [24:0] xddend_x__1_squeezed; wire [1:0] literal_28826; wire [23:0] literal_28834; wire [25:0] add_28835; wire sticky; wire [27:0] concat_28841; wire [27:0] xbs_fraction; wire carry_bit; wire nor_28882; wire nor_28877; wire nor_28878; wire nor_28868; wire nor_28869; wire and_28911; wire nor_28913; wire nor_28915; wire and_28908; wire nor_28904; wire and_28900; wire nor_28901; wire nor_28895; wire nor_28897; wire and_28940; wire nor_28921; wire nor_28922; wire and_28961; wire [1:0] priority_sel_28962; wire and_28957; wire and_28953; wire and_28949; wire [2:0] concat_28975; wire [2:0] concat_28972; wire [2:0] concat_28971; wire [2:0] concat_28969; wire [2:0] concat_28968; wire and_28980; wire [3:0] concat_28984; wire [3:0] sel_29093; wire [4:0] concat_28992; wire [4:0] leading_zeroes; wire [28:0] cancel_fraction; wire [26:0] cancel_fraction__1; wire [26:0] carry_fraction__1; wire [26:0] shifted_fraction; wire [2:0] normal_chunk; wire [2:0] fraction_shift__3; wire [1:0] half_way_chunk; wire do_round_up; wire [24:0] add_29012; wire rounding_carry; wire [8:0] add_29025; wire [5:0] sub_29026; wire fraction_is_zero; wire [9:0] wide_exponent_associative_element; wire [9:0] wide_exponent_associative_element__1; wire [9:0] wide_exponent; wire [9:0] wide_exponent__1; wire [7:0] MAX_EXPONENT; wire [22:0] literal_29039; wire [8:0] wide_exponent__2; wire eq_29041; wire eq_29042; wire eq_29043; wire eq_29044; wire [2:0] fraction_shift__2; wire is_operand_inf; wire and_reduce_29062; wire has_pos_inf; wire has_neg_inf; wire [27:0] rounded_fraction; wire [2:0] fraction_shift__1; wire [27:0] shrl_29075; wire is_result_nan; wire result_sign; wire [22:0] result_fraction; wire [22:0] sign_ext_29081; wire result_sign__1; wire [22:0] result_fraction__3; wire [22:0] FRACTION_HIGH_BIT; wire result_sign__2; wire [7:0] result_exponent__2; wire [22:0] result_fraction__4; assign y_bexp__1 = y[30:23]; assign literal_28782 = 1'h0; assign x_bexp__1 = x[30:23]; assign y_bexpnot = ~y_bexp__1; assign x_bexp_extended__1 = {literal_28782, x_bexp__1}; assign y_bexpnot_extended = {literal_28782, y_bexpnot}; assign full_result = x_bexp_extended__1 + y_bexpnot_extended; assign overflow_detected = full_result[8]; assign tuple_index_28789 = y[22:0]; assign tuple_index_28790 = x[22:0]; assign x_bexp = overflow_detected ? x_bexp__1 : y_bexp__1; assign literal_28792 = 8'h00; assign y_bexp = overflow_detected ? y_bexp__1 : x_bexp__1; assign literal_28794 = 1'h1; assign x_fraction = overflow_detected ? tuple_index_28790 : tuple_index_28789; assign y_fraction = overflow_detected ? tuple_index_28789 : tuple_index_28790; assign nc = ~overflow_detected; assign fraction_x = {literal_28794, x_fraction}; assign fraction_y = {literal_28794, y_fraction}; assign sign_ext_28803 = {24{y_bexp != literal_28792}}; assign narrowed_result = full_result[7:0]; assign x_bexpor_mask = {8{nc}}; assign tuple_index_28807 = y[31:31]; assign tuple_index_28808 = x[31:31]; assign fraction_x__1 = fraction_x & {24{x_bexp != literal_28792}}; assign fraction_y__1 = fraction_y & sign_ext_28803; assign xddend_x__1_squeezed_const_lsb_bits = 3'h0; assign result = narrowed_result ^ x_bexpor_mask; assign x_sign = overflow_detected ? tuple_index_28808 : tuple_index_28807; assign y_sign = overflow_detected ? tuple_index_28807 : tuple_index_28808; assign wide_x_squeezed = {literal_28782, fraction_x__1}; assign wide_y_shift_bits = {fraction_y__1, xddend_x__1_squeezed_const_lsb_bits}; assign shift = result + {7'h00, overflow_detected}; assign shrl_28822 = shift >= 8'h1b ? 27'h000_0000 : wide_y_shift_bits >> shift; assign shll_28824 = shift >= 8'h1c ? 28'h000_0000 : 28'hfff_ffff << shift; assign xddend_x__1_squeezed = x_sign ^ y_sign ? -wide_x_squeezed : wide_x_squeezed; assign literal_28826 = 2'h0; assign literal_28834 = 24'h00_0000; assign add_28835 = {{1{xddend_x__1_squeezed[24]}}, xddend_x__1_squeezed} + {literal_28826, shrl_28822[26:3]}; assign sticky = ~({literal_28782, ~y_fraction} | ~sign_ext_28803 | shll_28824[26:3]) != literal_28834; assign concat_28841 = {add_28835[24:0], shrl_28822[2:1], shrl_28822[0] | sticky}; assign xbs_fraction = add_28835[25] ? -concat_28841 : concat_28841; assign carry_bit = xbs_fraction[27]; assign nor_28882 = ~(xbs_fraction[25] | xbs_fraction[24]); assign nor_28877 = ~(xbs_fraction[17] | xbs_fraction[16]); assign nor_28878 = ~(xbs_fraction[19] | xbs_fraction[18]); assign nor_28868 = ~(xbs_fraction[9] | xbs_fraction[8]); assign nor_28869 = ~(xbs_fraction[11] | xbs_fraction[10]); assign and_28911 = ~(carry_bit | xbs_fraction[26]) & nor_28882; assign nor_28913 = ~(xbs_fraction[21] | xbs_fraction[20]); assign nor_28915 = ~(carry_bit | ~xbs_fraction[26]); assign and_28908 = nor_28878 & nor_28877; assign nor_28904 = ~(xbs_fraction[13] | xbs_fraction[12]); assign and_28900 = nor_28869 & nor_28868; assign nor_28901 = ~(xbs_fraction[11] | ~xbs_fraction[10]); assign nor_28895 = ~(xbs_fraction[5] | xbs_fraction[4]); assign nor_28897 = ~(xbs_fraction[7] | xbs_fraction[6]); assign and_28940 = ~(xbs_fraction[23] | xbs_fraction[22]) & nor_28913; assign nor_28921 = ~(xbs_fraction[1] | xbs_fraction[0]); assign nor_28922 = ~(xbs_fraction[3] | xbs_fraction[2]); assign and_28961 = and_28911 & and_28940; assign priority_sel_28962 = priority_sel_2b_2way({~(carry_bit | xbs_fraction[26] | nor_28882), and_28911}, {nor_28915, literal_28782}, {literal_28794, ~(xbs_fraction[25] | ~xbs_fraction[24])}, {literal_28782, nor_28915}); assign and_28957 = ~(xbs_fraction[15] | xbs_fraction[14]) & nor_28904; assign and_28953 = nor_28897 & nor_28895; assign and_28949 = nor_28922 & nor_28921; assign concat_28975 = {literal_28794, ~(xbs_fraction[23] | xbs_fraction[22] | nor_28913) ? {literal_28794, ~(xbs_fraction[21] | ~xbs_fraction[20])} : {literal_28782, ~(xbs_fraction[23] | ~xbs_fraction[22])}}; assign concat_28972 = {and_28908, priority_sel_2b_2way({~(xbs_fraction[19] | xbs_fraction[18] | nor_28877), and_28908}, literal_28826, {literal_28794, ~(xbs_fraction[17] | ~xbs_fraction[16])}, {nor_28878, ~(xbs_fraction[19] | ~xbs_fraction[18])})}; assign concat_28971 = {literal_28794, ~(xbs_fraction[15] | xbs_fraction[14] | nor_28904) ? {literal_28794, ~(xbs_fraction[13] | ~xbs_fraction[12])} : {literal_28782, ~(xbs_fraction[15] | ~xbs_fraction[14])}}; assign concat_28969 = {and_28900, priority_sel_2b_2way({~(xbs_fraction[11] | xbs_fraction[10] | nor_28868), and_28900}, {nor_28901, literal_28782}, {literal_28794, ~(xbs_fraction[9] | ~xbs_fraction[8])}, {nor_28869, nor_28901})}; assign concat_28968 = {literal_28794, ~(xbs_fraction[7] | xbs_fraction[6] | nor_28895) ? {literal_28794, ~(xbs_fraction[5] | ~xbs_fraction[4])} : {nor_28897, ~(xbs_fraction[7] | ~xbs_fraction[6])}}; assign and_28980 = and_28908 & and_28957; assign concat_28984 = {literal_28794, and_28949, priority_sel_2b_2way({~(xbs_fraction[3] | xbs_fraction[2] | nor_28921), and_28949}, literal_28826, {literal_28794, ~(xbs_fraction[1] | ~xbs_fraction[0])}, {nor_28922, ~(xbs_fraction[3] | ~xbs_fraction[2])})}; assign sel_29093 = ~(~and_28961 | and_28980) ? {literal_28794, ~(~and_28908 | and_28957) ? concat_28971 : concat_28972} : {and_28961, priority_sel_3b_2way({~(~and_28911 | and_28940), and_28961}, {priority_sel_28962, literal_28782}, concat_28975, {literal_28782, priority_sel_28962})}; assign concat_28992 = {literal_28794, and_28900 & and_28953 ? concat_28984 : {literal_28782, ~(~and_28900 | and_28953) ? concat_28968 : concat_28969}}; assign leading_zeroes = and_28961 & and_28980 ? concat_28992 : {literal_28782, sel_29093}; assign cancel_fraction = leading_zeroes >= 5'h1d ? 29'h0000_0000 : {literal_28782, xbs_fraction} << leading_zeroes; assign cancel_fraction__1 = cancel_fraction[27:1]; assign carry_fraction__1 = {xbs_fraction[27:2], xbs_fraction[1] | xbs_fraction[0]}; assign shifted_fraction = carry_bit ? carry_fraction__1 : cancel_fraction__1; assign normal_chunk = shifted_fraction[2:0]; assign fraction_shift__3 = 3'h4; assign half_way_chunk = shifted_fraction[3:2]; assign do_round_up = normal_chunk > fraction_shift__3 | half_way_chunk == 2'h3; assign add_29012 = {literal_28782, shifted_fraction[26:3]} + {literal_28834, do_round_up}; assign rounding_carry = add_29012[24]; assign add_29025 = {literal_28782, x_bexp} + 9'h001; assign sub_29026 = {5'h00, rounding_carry} - {literal_28782, leading_zeroes}; assign fraction_is_zero = add_28835 == 26'h000_0000 & ~(shrl_28822[1] | shrl_28822[2]) & ~(shrl_28822[0] | sticky); assign wide_exponent_associative_element = {literal_28782, add_29025}; assign wide_exponent_associative_element__1 = {{4{sub_29026[5]}}, sub_29026}; assign wide_exponent = wide_exponent_associative_element + wide_exponent_associative_element__1; assign wide_exponent__1 = wide_exponent & {10{~fraction_is_zero}}; assign MAX_EXPONENT = 8'hff; assign literal_29039 = 23'h00_0000; assign wide_exponent__2 = wide_exponent__1[8:0] & {9{~wide_exponent__1[9]}}; assign eq_29041 = x_bexp == MAX_EXPONENT; assign eq_29042 = x_fraction == literal_29039; assign eq_29043 = y_bexp == MAX_EXPONENT; assign eq_29044 = y_fraction == literal_29039; assign fraction_shift__2 = 3'h3; assign is_operand_inf = eq_29041 & eq_29042 | eq_29043 & eq_29044; assign and_reduce_29062 = &wide_exponent__2[7:0]; assign has_pos_inf = ~(~eq_29041 | ~eq_29042 | x_sign) | ~(~eq_29043 | ~eq_29044 | y_sign); assign has_neg_inf = eq_29041 & eq_29042 & x_sign | eq_29043 & eq_29044 & y_sign; assign rounded_fraction = {add_29012, normal_chunk}; assign fraction_shift__1 = rounding_carry ? fraction_shift__3 : fraction_shift__2; assign shrl_29075 = rounded_fraction >> fraction_shift__1; assign is_result_nan = ~(~eq_29041 | eq_29042) | ~(~eq_29043 | eq_29044) | has_pos_inf & has_neg_inf; assign result_sign = priority_sel_1b_2way({add_28835[25], fraction_is_zero}, x_sign & y_sign, ~y_sign, y_sign); assign result_fraction = shrl_29075[22:0]; assign sign_ext_29081 = {23{~(is_operand_inf | wide_exponent__2[8] | and_reduce_29062 | ~((|wide_exponent__2[8:1]) | wide_exponent__2[0]))}}; assign result_sign__1 = is_operand_inf ? ~has_pos_inf : result_sign; assign result_fraction__3 = result_fraction & sign_ext_29081; assign FRACTION_HIGH_BIT = 23'h40_0000; assign result_sign__2 = ~is_result_nan & result_sign__1; assign result_exponent__2 = is_result_nan | is_operand_inf | wide_exponent__2[8] | and_reduce_29062 ? MAX_EXPONENT : wide_exponent__2[7:0]; assign result_fraction__4 = is_result_nan ? FRACTION_HIGH_BIT : result_fraction__3; assign out = {result_sign__2, result_exponent__2, result_fraction__4}; endmodule