ddiv - 2024.2 English

MicroBlaze Processor Reference Guide (UG984)

Document ID
UG984
Release Date
2024-11-27
Version
2024.2 English
Figure 1. ddiv

Description

The double precision floating-point value in rBL is divided by the double floating-point value in rAL and the result is placed into register rDL.

Pseudocode

if isDnz(rAL) or isDnz(rBL) then
   (rDL) ← 0xFFF8000000000000
   FSR[DO] ← 1
   ESR[EC] ← 00110
else
   if isSigNaN(rAL) or isSigNaN(rBL) or (isZero(rAL) and isZero(rBL)) or
         (isInfinite(rAL) and isInfinite(rBL)) then
      (rDL) ← 0xFFF8000000000000
      FSR[IO] ← 1
      ESR[EC] ← 00110
   else if isQuietNaN(rAL) or isQuietNaN(rBL) then
      (rDL) ← 0xFFF8000000000000
   else if isZero(rAL) and not isInfinite(rBL) then
      (rDL) ← signInfinite((rBL)/(rAL))
      FSR[DZ] ← 1
      ESR[EC] ← 00110
   else    if isDnz((rBL) / (rAL)) then
      (rDL) ← signZero((rBL) / (rAL))
      FSR[UF] ← 1
      ESR[EC] ← 00110
   else if isNaN((rBL)/(rAL)) then
      (rDL) ← signInfinite((rBL) / (rAL))
      FSR[OF] ← 1
      ESR[EC] ← 00110
   else
      (rDL) ← (rBL) / (rAL)

Registers Altered

  • rDL, unless an FP exception is generated, in which case the register is unchanged
  • ESR[EC], if an FP exception is generated
  • FSR[IO,UF,OF,DO,DZ]

Latency

  • 28 cycles with C_AREA_OPTIMIZED=0
  • 30 cycles with C_AREA_OPTIMIZED=1
  • 24 cycles with C_AREA_OPTIMIZED=2

Notes

  • This instruction is only available when the MicroBlaze parameter C_USE_FPU is greater than 0.