Exception IVOR33 in MPC5777C Floating-Point Operations and Exception Conditions.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exception IVOR33 in MPC5777C Floating-Point Operations and Exception Conditions.

2,529 Views
kwru
Contributor III

Exception IVOR33 in MPC5777C Floating-Point Operations and Exception Conditions.

I am performing floating-point operations using the MPC5777C. I am encountering Exception IVOR33 and would like to inquire about it.

First, my MSR setting is as follows:
MSR = 0x0202B000 (SPE, FP enabled)

The test data used is:
FLT_MAX = 3.403e+38
FLT_MIN = 1.175e-38
FLT_TRUE_MIN = 1.401e-45

dNum -> double

fNum -> float

 

Case 1:
dNum = FLT_MAX * 2;
fNum = (float)dNum;
→ Exception did not occur

Case 2:
dNum = FLT_MIN / 2.;
fNum = (float)dNum;
→ Exception did not occur

Case 3:
dNum = FLT_TRUE_MIN / 2;
fNum = (float)dNum;
→ Exception did not occur

Case 4:
fTmp = 1.e+30f;
fNum = fTmp * fTmp;
→ Exception did not occur

Case 5:
fTmp = 1.e-20f;
fNum = fTmp * fTmp;
→ Exception occurred!

Why does an exception not occur in Case 1 when exceeding the upper limit?
Also, I would like to know the precise conditions under which the exception occurs.

Tags (1)
0 Kudos
Reply
4 Replies

2,499 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

What is your setting of SPEFSCR register?

davidtosenovjan_0-1764062727726.png

 

0 Kudos
Reply

2,476 Views
kwru
Contributor III

I configured FINVE/FDBZE/FUNFE/FOVFE using the SPESFCR register.

 

When I check the register, however, it shows SPESFCR = 0x0020303B (FINXS/FG/FX/FINVE/FDBZE/FUNFE/FRMC(11)).

 

It is strange that the FOVFE setting is not reflected even though I enabled it.

0 Kudos
Reply

2,446 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

I have tested it with MPC5674F having the same core (MPC5777C I don't available jut now) and I have set all bits in the register. I guess you could have some problem in your assembler code.

0 Kudos
Reply

2,237 Views
kwru
Contributor III

Thank you for your reply.
How was the SPESFCR register configured, and how was it actually set?

What exactly does it mean that all the tests were successful?

When the FOVFE in the SPESFCR register is enabled, does an exception occur in test case No. 1 above?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2247915%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EException%20IVOR33%20in%20MPC5777C%20Floating-Point%20Operations%20and%20Exception%20Conditions.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2247915%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EException%20IVOR33%20in%20MPC5777C%20Floating-Point%20Operations%20and%20Exception%20Conditions.%3C%2FP%3E%3CP%3EI%20am%20performing%20floating-point%20operations%20using%20the%20MPC5777C.%20I%20am%20encountering%20Exception%20IVOR33%20and%20would%20like%20to%20inquire%20about%20it.%3C%2FP%3E%3CP%3EFirst%2C%20my%20MSR%20setting%20is%20as%20follows%3A%3CBR%20%2F%3EMSR%20%3D%200x0202B000%20(SPE%2C%20FP%20enabled)%3C%2FP%3E%3CP%3EThe%20test%20data%20used%20is%3A%3CBR%20%2F%3EFLT_MAX%20%3D%203.403e%2B38%3CBR%20%2F%3EFLT_MIN%20%3D%201.175e-38%3CBR%20%2F%3EFLT_TRUE_MIN%20%3D%201.401e-45%3C%2FP%3E%3CP%3EdNum%20-%26gt%3B%20double%3C%2FP%3E%3CP%3EfNum%20-%26gt%3B%20float%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ECase%201%3A%3CBR%20%2F%3EdNum%20%3D%20FLT_MAX%20*%202%3B%3CBR%20%2F%3EfNum%20%3D%20(float)dNum%3B%3CBR%20%2F%3E%E2%86%92%20Exception%20did%20not%20occur%3C%2FP%3E%3CP%3ECase%202%3A%3CBR%20%2F%3EdNum%20%3D%20FLT_MIN%20%2F%202.%3B%3CBR%20%2F%3EfNum%20%3D%20(float)dNum%3B%3CBR%20%2F%3E%E2%86%92%20Exception%20did%20not%20occur%3C%2FP%3E%3CP%3ECase%203%3A%3CBR%20%2F%3EdNum%20%3D%20FLT_TRUE_MIN%20%2F%202%3B%3CBR%20%2F%3EfNum%20%3D%20(float)dNum%3B%3CBR%20%2F%3E%E2%86%92%20Exception%20did%20not%20occur%3C%2FP%3E%3CP%3ECase%204%3A%3CBR%20%2F%3EfTmp%20%3D%201.e%2B30f%3B%3CBR%20%2F%3EfNum%20%3D%20fTmp%20*%20fTmp%3B%3CBR%20%2F%3E%E2%86%92%20Exception%20did%20not%20occur%3C%2FP%3E%3CP%3ECase%205%3A%3CBR%20%2F%3EfTmp%20%3D%201.e-20f%3B%3CBR%20%2F%3EfNum%20%3D%20fTmp%20*%20fTmp%3B%3CBR%20%2F%3E%E2%86%92%20Exception%20occurred!%3C%2FP%3E%3CP%3EWhy%20does%20an%20exception%20not%20occur%20in%20Case%201%20when%20exceeding%20the%20upper%20limit%3F%3CBR%20%2F%3EAlso%2C%20I%20would%20like%20to%20know%20the%20precise%20conditions%20under%20which%20the%20exception%20occurs.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2248757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Exception%20IVOR33%20in%20MPC5777C%20Floating-Point%20Operations%20and%20Exception%20Conditions.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2248757%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20configured%20FINVE%2FFDBZE%2FFUNFE%2FFOVFE%20using%20the%20SPESFCR%20register.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EWhen%20I%20check%20the%20register%2C%20however%2C%20it%20shows%20SPESFCR%20%3D%200x0020303B%20(FINXS%2FFG%2FFX%2FFINVE%2FFDBZE%2FFUNFE%2FFRMC(11)).%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIt%20is%20strange%20that%20the%20FOVFE%20setting%20is%20not%20reflected%20even%20though%20I%20enabled%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2248239%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Exception%20IVOR33%20in%20MPC5777C%20Floating-Point%20Operations%20and%20Exception%20Conditions.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2248239%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EWhat%20is%20your%20setting%20of%26nbsp%3BSPEFSCR%20register%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22davidtosenovjan_0-1764062727726.png%22%20style%3D%22width%3A%20665px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22davidtosenovjan_0-1764062727726.png%22%20style%3D%22width%3A%20665px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22davidtosenovjan_0-1764062727726.png%22%20style%3D%22width%3A%20665px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22davidtosenovjan_0-1764062727726.png%22%20style%3D%22width%3A%20665px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F367129i2C42864FE30752BB%2Fimage-dimensions%2F665x554%3Fv%3Dv2%22%20width%3D%22665%22%20height%3D%22554%22%20role%3D%22button%22%20title%3D%22davidtosenovjan_0-1764062727726.png%22%20alt%3D%22davidtosenovjan_0-1764062727726.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2249311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Exception%20IVOR33%20in%20MPC5777C%20Floating-Point%20Operations%20and%20Exception%20Conditions.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2249311%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20have%20tested%20it%20with%20MPC5674F%20having%20the%20same%20core%20(MPC5777C%20I%20don't%20available%20jut%20now)%20and%20I%20have%20set%20all%20bits%20in%20the%20register.%20I%20guess%20you%20could%20have%20some%20problem%20in%20your%20assembler%20code.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2255706%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Exception%20IVOR33%20in%20MPC5777C%20Floating-Point%20Operations%20and%20Exception%20Conditions.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2255706%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20for%20your%20reply.%3CBR%20%2F%3EHow%20was%20the%20SPESFCR%20register%20configured%2C%20and%20how%20was%20it%20actually%20set%3F%3C%2FP%3E%3CP%3EWhat%20exactly%20does%20it%20mean%20that%20all%20the%20tests%20were%20successful%3F%3C%2FP%3E%3CP%3EWhen%20the%20FOVFE%20in%20the%20SPESFCR%20register%20is%20enabled%2C%20does%20an%20exception%20occur%20in%20test%20case%20No.%201%20above%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E