Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Classes | Macros | Typedefs | Functions | Variables
grfpu_test.c File Reference
#include "testmod.h"
Include dependency graph for grfpu_test.c:

Classes

struct  dp3_type
 
struct  sp3_type
 

Macros

#define FTT_CEXC   0x1c01f
 
#define FTT   0x1c000
 
#define IEEE754EXC   (1 << 14)
 
#define UNFINEXC   (1 << 15)
 
#define NX   1
 
#define DZ   2
 
#define UF   4
 
#define OF   8
 
#define NV   16
 
#define EQ   0
 
#define LT   1
 
#define GT   2
 
#define UN   3
 

Typedefs

typedef unsigned long long uint64
 

Functions

void grfpu_fdivd (uint64 *a, uint64 *b, uint64 *c)
 
void grfpu_ttrap ()
 
void divident (uint64 *a)
 
void divromtst (uint64 *a, uint64 *b)
 
unsigned int grfpu_fitos (int a)
 
uint64 grfpu_fitod (int a)
 
unsigned int grfpu_fdtoi (uint64 a)
 
unsigned int grfpu_fstoi (unsigned int a)
 
unsigned int grfpu_fdtos (uint64 a)
 
uint64 grfpu_fstod (unsigned int a)
 
int grfpu_fcmpd (uint64 a, uint64 b)
 
int grfpu_fcmped (uint64 a, uint64 b)
 
uint64 grfpu_fsubd (uint64 a, uint64 b)
 
void grfpc_dpdep_tst (uint64 *a)
 
void grfpc_spdep_tst (unsigned int *a)
 
void grfpc_spdpdep_tst (uint64 *a)
 
void grfpc_spdpdep_tst2 (uint64 *a)
 
void initfpreg ()
 
int grfpc_edac_test ()
 
int grfpu_test ()
 

Variables

volatile unsigned int fsr1
 
volatile unsigned int fq1
 
volatile unsigned int tfsr
 
volatile unsigned int grfpufq
 
uint64 denorm = 0x0000000000010000LL
 
uint64 nzero = 0x8000000000000000LL
 
uint64 inf = 0xfff0000000000000LL
 
uint64 ninf = 0xfff0000000000000LL
 
uint64 pinf = 0x7ff0000000000000LL
 
uint64 qnan = 0x7ff8000000000000LL
 
unsigned int qnan_sp = 0x7fc00000
 
uint64 snan = 0x7ff4000000000000LL
 
uint64 qsnan = 0x7fffe00000000000LL
 
unsigned long int qsnan_sp = 0x7fff0000
 
unsigned int divisor [256]
 
unsigned int divres [512]
 
unsigned int sqrtres [256]
 
struct dp3_type faddd_tv [16]
 
struct dp3_type fmuld_tv [11]
 
unsigned int fsr
 
uint64 z
 
unsigned int fl
 
double dbl
 
uint64 dpres = 0xbff8000000000000LL
 
uint64 spdpres = 0x3fefdff00ffc484aLL
 
unsigned int fptrap
 

Macro Definition Documentation

#define DZ   2

Referenced by grfpu_test().

#define EQ   0

Referenced by grfpu_test().

#define FTT   0x1c000

Referenced by grfpu_test().

#define FTT_CEXC   0x1c01f

Referenced by grfpu_test().

#define GT   2

Referenced by grfpu_test().

#define IEEE754EXC   (1 << 14)

Referenced by grfpu_test().

#define LT   1

Referenced by grfpu_test().

#define NV   16

Referenced by grfpu_test().

#define NX   1
#define OF   8

Referenced by grfpu_test().

#define UF   4

Referenced by grfpu_test().

#define UN   3

Referenced by grfpu_test().

#define UNFINEXC   (1 << 15)

Referenced by grfpu_test().

Typedef Documentation

typedef unsigned long long uint64

Function Documentation

void divident ( uint64 a)

Referenced by grfpu_test().

void divromtst ( uint64 a,
uint64 b 
)

Referenced by grfpu_test().

void grfpc_dpdep_tst ( uint64 a)

Referenced by grfpu_test().

int grfpc_edac_test ( )
void grfpc_spdep_tst ( unsigned int a)

Referenced by grfpu_test().

void grfpc_spdpdep_tst ( uint64 a)

Referenced by grfpu_test().

void grfpc_spdpdep_tst2 ( uint64 a)
int grfpu_fcmpd ( uint64  a,
uint64  b 
)

Referenced by grfpu_test().

int grfpu_fcmped ( uint64  a,
uint64  b 
)

Referenced by grfpu_test().

void grfpu_fdivd ( uint64 a,
uint64 b,
uint64 c 
)

Referenced by grfpu_test().

unsigned int grfpu_fdtoi ( uint64  a)

Referenced by grfpu_test().

unsigned int grfpu_fdtos ( uint64  a)

Referenced by grfpu_test().

uint64 grfpu_fitod ( int  a)

Referenced by grfpu_test().

unsigned int grfpu_fitos ( int  a)

Referenced by grfpu_test().

uint64 grfpu_fstod ( unsigned int  a)

Referenced by grfpu_test().

unsigned int grfpu_fstoi ( unsigned int  a)

Referenced by grfpu_test().

uint64 grfpu_fsubd ( uint64  a,
uint64  b 
)

Referenced by grfpu_test().

int grfpu_test ( )
void grfpu_ttrap ( )
void initfpreg ( )

Referenced by grfpu_test().

Variable Documentation

double dbl
uint64 denorm = 0x0000000000010000LL

Referenced by grfpu_test().

unsigned int divisor
unsigned int divres
uint64 dpres = 0xbff8000000000000LL
struct dp3_type faddd_tv
Initial value:
= {
{0x4200000000000000LL, 0x400fffffffffffffLL, 0x4200000000200000LL},
{0x420fffffffffffffLL, 0x4000000000000000LL, 0x4210000000080000LL},
{0x4200000000000001LL, 0x3eb0000000000001LL, 0x4200000000000002LL},
{0x420f484c0137d208LL, 0xc20e780f256007abLL, 0x41ba079b7af94ba0LL},
{0x4201484c0137d208LL, 0x420e780f256007abLL, 0x4217e02d934becdaLL},
{0x420f484c0137d208LL, 0xc21e780f256007abLL, 0xc20da7d249883d4eLL},
{0x421f484c0137d208LL, 0xc20e780f256007abLL, 0x42100c446e87ce32LL},
{0xc03340ab37120891LL, 0x0000000000000000LL, 0xc03340ab37120891LL},
{0x0000000000000000LL, 0xc29e7a0f236007a6LL, 0xc29e7a0f236007a6LL},
{0x6f3f484c0137d208LL, 0x6e2e780f256007abLL, 0x6f3f485b3d3f64b8LL},
{0x6f3f484c0137d208LL, 0xee2e780f256007abLL, 0x6f3f483cc5303f58LL},
{0x7fe2f780ab123809LL, 0x7fd0000000000000LL, 0x7feaf780ab123809LL},
{0x0020000000000000LL, 0x8028000000000000LL, 0x8010000000000000LL},
{0x7feff780ab123809LL, 0x7feff2010203a111LL, 0x7ff0000000000000LL},
{0x0010000000001000LL, 0x801ffffff203a111LL, 0x8000000000000000LL},
{0x001abcd000023809LL, 0x801abcd000000111LL, 0x0},
}

Referenced by grfpu_test().

unsigned int fl
struct dp3_type fmuld_tv
Initial value:
= {
{0x7e71000000000000LL, 0x4160100000000000LL, 0x7fe1110000000000LL},
{0x0178100000000000LL, 0x3e880000fff00000LL, 0x00120c00c073f800LL},
{0xc1efffffc0002000LL, 0x3fb3c75d224f280fLL, 0xc1b3c75cfac08192LL},
{0xa12fff8000001fffLL, 0x3ee0000000ff0000LL, 0xa01fff8001fe1807LL},
{0x41cffffe00000020LL, 0x40303ffffffffffdLL, 0x42103ffefc00000dLL},
{0x3fd000003fefffffLL, 0xbfd0000010000000LL, 0xbfb000004ff0003fLL},
{0x0170100000000000LL, 0x3e8000011a000000LL, 0x0LL},
{0x7e7c000000000000LL, 0x416a100001000010LL, 0x7ff0000000000000LL},
{0x75012034056ac000LL, 0xfa1009091000104fLL, 0xfff0000000000000LL},
{0x0100203040030200LL, 0x003020340000a00bLL, 0x0LL},
{0x7fe0001010200001LL, 0x400000000010200aLL, 0x7ff0000000000000LL}
}

Referenced by grfpu_test().

unsigned int fptrap
volatile unsigned int fq1
unsigned int fsr
volatile unsigned int fsr1
volatile unsigned int grfpufq
uint64 inf = 0xfff0000000000000LL

Referenced by grfpu_test().

uint64 ninf = 0xfff0000000000000LL

Referenced by grfpu_test().

uint64 nzero = 0x8000000000000000LL

Referenced by grfpu_test().

uint64 pinf = 0x7ff0000000000000LL

Referenced by grfpu_test().

uint64 qnan = 0x7ff8000000000000LL

Referenced by grfpu_test().

unsigned int qnan_sp = 0x7fc00000
uint64 qsnan = 0x7fffe00000000000LL

Referenced by grfpu_test().

unsigned long int qsnan_sp = 0x7fff0000

Referenced by grfpu_test().

uint64 snan = 0x7ff4000000000000LL

Referenced by grfpu_test().

uint64 spdpres = 0x3fefdff00ffc484aLL
unsigned int sqrtres
volatile unsigned int tfsr
uint64 z