module __fixed_point__num_nonzero_integer_bits( input wire [31:0] NUM_BITS, input wire [31:0] BINARY_EXPONENT, output wire [31:0] out ); wire [31:0] neg_53; wire [31:0] add_58; wire [31:0] sel_62; assign neg_53 = -BINARY_EXPONENT; assign add_58 = NUM_BITS + BINARY_EXPONENT; assign sel_62 = BINARY_EXPONENT[31] ? add_58 & {32{$signed({{1{neg_53[31]}}, neg_53}) < $signed({1'h0, NUM_BITS})}} : NUM_BITS; assign out = sel_62; endmodule