This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Saturation instructions

Anonymous
Anonymous


Hi,

 

I would like to ask a question on saturation.

 

I read from page 39, SPRU732J,TMS320C64x-C64x+ DSP CPU and Instruction Set Reference Guide, that the Control Status Register (CSR) has a bit SAT which controls saturation on arithmetic operations:

 

 

I also found lots of instructions, in particular MPY, have like SMPY variants.

 

May I get some more detailed material (book recommendation, link, etc.) on the theory and hardware implementation of saturation arithmetic?

 

And by default, does the C compiler use saturation arithmetic, or ordinary modular arithmetic?

 

 

 

 

Thanks,

Zheng

  • An internet search on saturation arithmetic will answer a lot of your questions.  The C language definition of addition etc. is the usual math operations provided by most programming languages.  Specifically, it is not saturated math.  For that, use compiler intrinsics such as _smpy().  Look those up in the compiler manual.

    Thanks and regards,

    -George