DSPRelated.com
Forums

Floating point number representation

Started by sant...@isac.gov.in November 24, 2006
Hi
I would like to know how a floating point number is represented in
DM if the width of the DM is configured for 16 bits and PM as 48 bits.
I am using the EZLITE version for ADSP-21020/60 that is showing all
floating point numbers as 32 bit. I am expecting the floating point
numbers should use two consecutive addresses when the DM is configured
as 16 bit. Any idea how it is represented in the Visual DSP++ (4.5)
environment?
Regards,
Santanu
Santanu wrote:
>
> Hi
> I would like to know how a floating point number is represented
> in DM if the width of the DM is configured for 16 bits and PM as 48
> bits. I am using the EZLITE version for ADSP-21020/60 that is
> showing all floating point numbers as 32 bit. I am expecting the
> floating point numbers should use two consecutive addresses when
> the DM is configured as 16 bit. Any idea how it is represented in
> the Visual DSP++ (4.5) environment?

The number format and addressing doesn't depend on VisualDSP - it's
determined by the processor. If the 21020 behaves like the 21060,
then the floating-point numbers you put into the ALU and multiplier
units have to be 32bit (or 40bit). You can convert a 32bit / 40bit
floating-point number to short word (16bit) floating-point and back
using the FPACK and FUNBACK instructions. These can then be stored in
consecutive locations in short word memory.

The word width in the architecture file that one can specify for a
memory segment only affects addresses inside that segment.

Regards,
Andor