module __float32__trunc( input wire [31:0] f, output wire [31:0] out ); 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] f_bexp__1; wire [22:0] f_fraction__1; wire [7:0] EXPR_MASK; wire [7:0] exp; wire or_521; wire eq_523; wire eq_524; wire [22:0] fractional_mask__2; wire or_535; wire nor_536; wire [22:0] sel_540; wire f_sign__1; wire [31:0] tuple_556; assign f_bexp__1 = f[30:23]; assign f_fraction__1 = f[22:0]; assign EXPR_MASK = 8'hff; assign exp = f_bexp__1 + 8'h81; assign or_521 = f_bexp__1[7] | (&f_bexp__1[6:0]); assign eq_523 = f_fraction__1 == 23'h00_0000; assign eq_524 = f_bexp__1 == EXPR_MASK; assign fractional_mask__2 = {{24{exp[7]}}, exp} >= 32'h0000_0017 ? 23'h00_0000 : 23'h7f_ffff >> {{24{exp[7]}}, exp}; assign or_535 = f_bexp__1 == 8'h00 & eq_523 | eq_524 & eq_523; assign nor_536 = ~(~eq_524 | eq_523); assign sel_540 = f_bexp__1 < 8'h96 ? ~(~f_fraction__1 | fractional_mask__2 | ~{23{or_521}}) : f_fraction__1; assign f_sign__1 = f[31:31]; assign tuple_556 = {~(nor_536 | ~f_sign__1), f_bexp__1 & {8{or_521}}, {priority_sel_1b_2way({or_535, nor_536}, 1'h1, 1'h0, sel_540[22]), sel_540[21:0] & {22{~(or_535 | nor_536)}}}}; assign out = tuple_556; endmodule