Documentation
 ALTERA datasheet 
 XILINX datasheet 
 LATTICE datasheet 
 ASIC datasheet 
Application Notes Products Summary
DFPMU

Floating Point Coprocessor


The DFPMU is a Floating Point Coprocessor, designed to assist CPU in performing the floating point mathematic computations. The DFPMU directly replaces C software functions, by equivalent, very fast hardware operations, which significantly accelerate system performance. It does not require any programming, so it also does not require any modifications of the main software. Everything is done automatically during software compi-lation by the DFPMU C driver.
The DFPMU was designed to operate with DCD’s DP8051, but can also operate with any other 8-, 16- and 32-bit processor. Drivers for all popular 8051 C compilers are delivered to-gether with the DFPMU package.
The DFPMU uses the specialized CORDIC and standard algorithms to compute math functions. It supports addition, subtraction, multiplication, division, square root, comparison, absolute value, change sign of a number and trigonometric functions: sine, cosine, tangent and arctangent. It has built-in conversion instructions from integer type to floating point type and vice versa. The input numbers format is according to IEEE-754 standard. The DFPMU supports single precision real numbers, 16-bit and 32-bit integers. The DFPMU is prepared to use with 8-, 16- and 32-bit processors.
The DFPMU is a technology independent design that can be implemented in a variety of process technologies.


Key Features

Applications

  • Direct replacement for C float software functions such as: +, -, *, /,==, !=,>=, <=, <, >
  • C interface supplied for all popular compilers: GNU C/C++, 8051 compilers
  • No programming required
  • IEEE-754 Single precision real format support – float type
  • 16-bit word and 32-bit short integers format supported – integer types
  • Flexible arguments and result registers location
  • Performs the following functions:
    • FADD, FSUB – addition, subtraction
    • FMUL, FDIV – multiplication, division
    • FSQRT – square root
    • FCHS, FABS – change of sign, absolute value
    • FXAM – examine input data
    • FUCOM – comparison
    • FSIN, FCOS – sine, cosine
    • FTAN – tangent
    • FATAN – arctangent
    • FILDW, FILD – 16-bit, 32-bit integer to float
    • FISTW, FIST – float to 16-bit, 32-bit integer
  • Exceptions built-in routines
  • Masks each exception indicator:
    • Precision lack PE
    • Underflow result UE
    • Overflow result OE
    • Invalid operand IE
    • Division by zero ZE
    • Denormal operand DE
  • Fully synthesizable
  • Static synchronous design
  • Positive edge clocking and no internal tri-states
  • Scan test ready
  • Math coprocessors
  • DSP algorithms
  • Embedded arithmetic coprocessor
  • Fast data processing & control


The table and figures below illustrates the system with DFPMU performance improvements for two typical CPU.
The DFPMU floating point instructions performance has been compared to standard C library functions delivered with every commercial C compiler. Each program was executed in the same system environments. Number of clock periods were measured between input data loading into work registers and output result storing after operation. The results are placed in tables below.
Improvement has been computed as a number of clock cycles reuired by the CPU to compute FP operation, by the number of clocks required to compute the same operation by system of CPU with DFPMU:



DP8051 based system

32-bit RISC based system

    The following table gives a survey about the DP8051+DFPMU performance compared to std 8051 microcontroller.

    Device Improvement
    80C511.0
    DP80517.3
    DP8051+DFPMU162.0




    Improvements of particular operations is presented below.

    IEEE-754 FP Instruction Improvement
    Addition73
    Subtraction60
    Multilication65
    Division182
    Square Root392
    Sine139
    Cosine144
    Tangent222
    Arcs Tangent182
    Average speed improvement:162
    The table below shows performance improvements of the sample 32-bit-RISC CPU with DFPMU, compared to the same system without the DFPMU coprocessor.

    Device Improvement
    CPU1.0
    CPU+DFPMU (arithmetic)7.5
    CPU+DFPMU (trigonometric)49.2
    CPU+DFPMU (overall)28.3




    Improvements of particular operations is presented below.

    IEEE-754 FP Instruction Improvement
    Addition6.4
    Subtraction6.5
    Multilication5.1
    Division6.5
    Square Root12.9
    Sine40.8
    Cosine41.3
    Tangent65
    Arcs Tangent49.6
    Average speed improvement:28.3


Symbol

 clk
 rst
 datai1 (31:0)
 addr2 (4:0)
 cs
 we
datao1 (31:0) 
irq 

Pins description

PinTypeDescription
clkinputGlobal clock
rstinputGlobal reset
datai1 (31:0)inputData bus input
addr2 (4:0)inputRegister address to read/write
csinputChip select for read/write
weinputData write enable
datao1 (31:0)outputData bus output
irqoutputInterrupt request indicator

Block diagram

Align
Control Unit
Exponent
CORDIC
Interface
datai1 (31:0)
datao1 (31:0)
addr2 (4:0)
cs
we
irq
Mantissa
Shifter
clk
rst

Units

Align

It performs the numbers analyze against IEEE-754 standard compliance. Information about the data classes are passed as result to appro-priate internal module.

Control Unit

It manages execution of all instructions and internal operation required to execute particular function.

Exponent

It performs operations on exponent part of number. The addition, subtraction, shifting, comparison and conversion operations are executed in this module. It contains exponents and work registers.

CORDIC

CORDIC performs trigonometric operations on input data. The sine, cosine, tangent and arctangent operations are executed in this module. It contains three work registers.

Interface

It is an interface between external device and DFPAU internal 32-bit modules. It contains data, control and status registers. It can be configured to work with 8-, 16- and 32-bit processors.

1 - data bus can be configured as 8-, 16- or 32- bit depends on processor’s bus size
2 - address bus is aligned to work with 8- (3:0), 16- (3:1) or 32- (4:2) bit processors

Mantissa

It performs operations on mantissa part of number. The addition, subtraction, multiplication, division, square root, comparison and conversion operations are executed in this module. It contains mantissas and work registers.

Shifter

It performs mantissa shifting during normalization, denormalization operations. Information about shifted-out bits are stored for rounding process.

Performance


Each core has been tested in variety of FPGA and ASIC technologies. Its implementation's results are summarized below.

ImplementationSpeed
grade
Logic CellsFrequency
[MHz]
APEX20KC-7515058
STRATIX-54460108
CYCLONE-6465090
CYCLONE-II-6452096
STRATIX-II-33300168
STRATIX-IV-23900220

DFPMU implementation results for ALTERA devices. The all features have been included.

ImplementationSpeed
grade
SlicesFrequency
[MHz]
SPARTAN-3-5233047
SPARTAN-3E-5293080
SPARTAN-6-3144580
VIRTEX-II-5233077
VIRTEX-II pro-7233085
VIRTEX-4-112930103
VIRTEX-5-31520135

DFPMU implementation results for XILINX devices. The all features have been included.

ImplementationSpeed
grade
LUTs/PFUsFrequency
[MHz]
ispXPGA-55327/139342

DFPMU implementation results for LATTICE devices. The all features have been included.


Family summary

DesignStandard complianceArithmetic operations
ADD, SUB, MUL, DIV, SQRT, COMP
Trigonometric operations
SIN, COS, TAN, ARCTAN
Processors interfacesSingle precisionDouble precision8/16/32 bit integers52-bit integers
8,16,32 bit
DFPAU IEEE-754+-++---
DFPMU IEEE-754++++-+-
DFPAU-DP IEEE-754+-+++++
DFPMU-DP IEEE-754+++++++


The main features of each Arithmetic Coprocessors family member has been summarized in table above. It gives a briefly member characterization helping user to select the most suitable IP Core for its application.