How do we correctly use the CMSIS-DSP functions that have fixed-point (Qx) input/outputs?

I want to use CMSIS-DSP library functions to perform matrix-vector multiplications on integers. It seems that the library, instead of integers, mainly supports operations on fixed-point numbers in Q7, Q15, and Q31 formats, which are in fact Q1.7, Q1.15, Q1.31 formats according to IBM's definition of fixed-point numbers. This means their values are between -1 and +1.

The matrix/vector inputs as well as the output of the functions arm_mat_vec_mult_q7/15/31 are in all Q7/15/31 formats. My main question here is about how to interpret the output of CMSIS-DSP functions that have input/outputs in Q7/Q15/Q31 format. Multiplying a vector by a matrix where both have entries within [-1,+1] does not necessarily result in a vector with entries in [-1,+1]. But the output of arm_mat_vec_mult_q7 is in Q7. Are the results saturated between -1 and +1? If so, should we reduce the range of inputs to prevent the saturation?

Parents Reply Children
No data