Block: Div



PIC




Inports


In1

Dividend



In2

Divisor






Outports


Out

Quotient




Description:

Division of input 1 by input 2.

Calculation:

       (
       | 0         In1 =  0,In2 = 0
       ||{
Out =    maxV  al  In1 >  0,In2 = 0
       || minV  al  In1 <  0,In2 = 0
       |( In1       otherwise
         In2

Note: maxVal and minVal refer to the maximum/minimum representable value of the implementation.

Implementations:
FiP8 8 Bit Fixed Point Implementation
FiP16 16 Bit Fixed Point Implementation
FiP32 32 Bit Fixed Point Implementation
Float32 32 Bit Floating Point Implementation
Float64 64 Bit Floating Point Implementation

Implementation: FiP8


Name FiP8
ID 4928
Revision 0.1
C filename Div_FiP8.c
H filename Div_FiP8.h

8 Bit Fixed Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In1; 
     int8          *In2; 
     int8          Out; 
} DIV_FIP8;

Implementation: FiP16


Name FiP16
ID 4929
Revision 0.1
C filename Div_FiP16.c
H filename Div_FiP16.h

16 Bit Fixed Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In1; 
     int16         *In2; 
     int16         Out; 
} DIV_FIP16;

Implementation: FiP32


Name FiP32
ID 4930
Revision 0.1
C filename Div_FiP32.c
H filename Div_FiP32.h

32 Bit Fixed Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In1; 
     int32         *In2; 
     int32         Out; 
} DIV_FIP32;

Implementation: Float32


Name Float32
ID 4931
Revision 0.1
C filename Div_Float32.c
H filename Div_Float32.h

32 Bit Floating Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     float32       *In1; 
     float32       *In2; 
     float32       Out; 
} DIV_FLOAT32;

Implementation: Float64


Name Float64
ID 4932
Revision 0.1
C filename Div_Float64.c
H filename Div_Float64.h

64 Bit Floating Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     float64       *In1; 
     float64       *In2; 
     float64       Out; 
} DIV_FLOAT64;