Block: Sign



PIC




Inports


In

Input u






Outports


Out

Value corresponding to sign of u




Description:

Signum function.

Calculation:

                 {
                  +1   In ≥ 0
Out = sign (In ) =
                  - 1  In < 0

Implementations:
FiP8 8 Bit Fixed Point Implementation
FiP16 16 Bit Fixed Point Implementation
FiP32 32 Bit Fixed Point Implementation

Implementation: FiP8


Name FiP8
ID 4896
Revision 0.1
C filename Sign_FiP8.c
H filename Sign_FiP8.h

8 Bit Fixed Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     int8          *In; 
     int8          Out; 
} SIGN_FIP8;

Implementation: FiP16


Name FiP16
ID 4897
Revision 0.1
C filename Sign_FiP16.c
H filename Sign_FiP16.h

16 Bit Fixed Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     int16         *In; 
     int16         Out; 
} SIGN_FIP16;

Implementation: FiP32


Name FiP32
ID 4898
Revision 0.1
C filename Sign_FiP32.c
H filename Sign_FiP32.h

32 Bit Fixed Point Implementation

Data Structure:

typedef struct { 
     uint16        ID; 
     int32         *In; 
     int32         Out; 
} SIGN_FIP32;