Division by 0 - TMS5704357 CortexR5

Thread Starter

Lorenzo Ruscitti

Joined Nov 12, 2018
35
Hello I was verifying the activation of the exception in case of division by zero. currently on my CCS project I have deleted all libraries. I do a simple a = 1/0. I get the warning but then in the end the exception does not activate and if I go to debug and I see the value of the variable I see that inside it I have the value zero; honestly I was expecting "infinite". I am wrong ? further thing. I saw that there are some functions contained in the libc, which I have excluded, such as u_div0, but having not included them which division function is my project using? meanwhile, I limit myself to these questions. thank you
 

Thread Starter

Lorenzo Ruscitti

Joined Nov 12, 2018
35
Quando l'ALU provoca la generazione di un'eccezione, perché ti interessa cosa rimane nell'ALU? Ha anche una rappresentazione per un risultato infinito?
[/CITAZIONE]

I focused on this thing because since the exception does not trigger I asked myself: Since I see that the value of the variable is neither "infinity" and "NaN" but zero, it is possible that in case of division with zero the system set the result to zero without triggering the exception? I have also activated the DZ bit but I do not have the activation of the exception. I don't understand if I'm doing something wrong. thank you
 

Papabravo

Joined Feb 24, 2006
22,082
There can be many reasons for things not behaving as you might expect. Your task is to eliminate them one by one, until what is left is the answer. You may have to contact an FAE for help.
 
Top