Vivado "resize" simulation error
a_in is signed 13 bits wide, so a_in * a_in is signed 26 bits wide, with the sign bit at [25]. You then assign the result to a_square, which is 32 bits wide. There is a size mismatch between the two and the sign bit is in the wrong position ([25] rather than [31]). The resize(input, size) function is sign aware, and correctly handles the conversion from the 26 bit wide a_in * a_in to the 32 bit wide a_square, placing the sign bit in bit [31].