module __float32__normalize( input wire sign, input wire [7:0] exp, input wire [23:0] fraction_with_hidden, output wire [31:0] out ); wire [23:0] reverse_172; wire [24:0] one_hot_173; wire [4:0] encode_175; wire [7:0] concat_176; wire is_denormal; wire nor_180; wire [7:0] sub_182; wire [22:0] normalized_fraction; assign reverse_172 = {fraction_with_hidden[0], fraction_with_hidden[1], fraction_with_hidden[2], fraction_with_hidden[3], fraction_with_hidden[4], fraction_with_hidden[5], fraction_with_hidden[6], fraction_with_hidden[7], fraction_with_hidden[8], fraction_with_hidden[9], fraction_with_hidden[10], fraction_with_hidden[11], fraction_with_hidden[12], fraction_with_hidden[13], fraction_with_hidden[14], fraction_with_hidden[15], fraction_with_hidden[16], fraction_with_hidden[17], fraction_with_hidden[18], fraction_with_hidden[19], fraction_with_hidden[20], fraction_with_hidden[21], fraction_with_hidden[22], fraction_with_hidden[23]}; assign one_hot_173 = {reverse_172[23:0] == 24'h00_0000, reverse_172[23] && reverse_172[22:0] == 23'h00_0000, reverse_172[22] && reverse_172[21:0] == 22'h00_0000, reverse_172[21] && reverse_172[20:0] == 21'h00_0000, reverse_172[20] && reverse_172[19:0] == 20'h0_0000, reverse_172[19] && reverse_172[18:0] == 19'h0_0000, reverse_172[18] && reverse_172[17:0] == 18'h0_0000, reverse_172[17] && reverse_172[16:0] == 17'h0_0000, reverse_172[16] && reverse_172[15:0] == 16'h0000, reverse_172[15] && reverse_172[14:0] == 15'h0000, reverse_172[14] && reverse_172[13:0] == 14'h0000, reverse_172[13] && reverse_172[12:0] == 13'h0000, reverse_172[12] && reverse_172[11:0] == 12'h000, reverse_172[11] && reverse_172[10:0] == 11'h000, reverse_172[10] && reverse_172[9:0] == 10'h000, reverse_172[9] && reverse_172[8:0] == 9'h000, reverse_172[8] && reverse_172[7:0] == 8'h00, reverse_172[7] && reverse_172[6:0] == 7'h00, reverse_172[6] && reverse_172[5:0] == 6'h00, reverse_172[5] && reverse_172[4:0] == 5'h00, reverse_172[4] && reverse_172[3:0] == 4'h0, reverse_172[3] && reverse_172[2:0] == 3'h0, reverse_172[2] && reverse_172[1:0] == 2'h0, reverse_172[1] && !reverse_172[0], reverse_172[0]}; assign encode_175 = {one_hot_173[16] | one_hot_173[17] | one_hot_173[18] | one_hot_173[19] | one_hot_173[20] | one_hot_173[21] | one_hot_173[22] | one_hot_173[23] | one_hot_173[24], one_hot_173[8] | one_hot_173[9] | one_hot_173[10] | one_hot_173[11] | one_hot_173[12] | one_hot_173[13] | one_hot_173[14] | one_hot_173[15] | one_hot_173[24], one_hot_173[4] | one_hot_173[5] | one_hot_173[6] | one_hot_173[7] | one_hot_173[12] | one_hot_173[13] | one_hot_173[14] | one_hot_173[15] | one_hot_173[20] | one_hot_173[21] | one_hot_173[22] | one_hot_173[23], one_hot_173[2] | one_hot_173[3] | one_hot_173[6] | one_hot_173[7] | one_hot_173[10] | one_hot_173[11] | one_hot_173[14] | one_hot_173[15] | one_hot_173[18] | one_hot_173[19] | one_hot_173[22] | one_hot_173[23], one_hot_173[1] | one_hot_173[3] | one_hot_173[5] | one_hot_173[7] | one_hot_173[9] | one_hot_173[11] | one_hot_173[13] | one_hot_173[15] | one_hot_173[17] | one_hot_173[19] | one_hot_173[21] | one_hot_173[23]}; assign concat_176 = {3'h0, encode_175}; assign is_denormal = exp <= concat_176; assign nor_180 = ~(is_denormal | encode_175 == 5'h18); assign sub_182 = exp - concat_176; assign normalized_fraction = encode_175 >= 5'h17 ? 23'h00_0000 : fraction_with_hidden[22:0] << encode_175; assign out = {sign, sub_182 & {8{nor_180}}, normalized_fraction & {23{nor_180}}}; endmodule