bpgen.h
2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/************************************************************************
WHAT: RSP SCALAR UNIT BYPASS VERIFICATION TEST PROGRAM GENERATOR
SCCS: %W% %G%
PTLS: $Id: bpgen.h,v 1.1.1.1 2002/10/29 08:07:06 blythe Exp $
FILE: table.c
ENGR: Evan Y. Wang
PROJ: Project Reality
(CR): 1994 Silicon Graphics, Inc.
************************************************************************/
#ifndef _table_h_
#define _table_h_
#define IMEM_BASE 0
#define IMEM_SIZE 0x1000 /* 4KB of IMEM */
#define DMEM_BASE 0x04000000
#define DMEM_SIZE 0x1000 /* 4KB of DMEM */
/************************************************************************
INSTRUCTION TABLE USED FOR GENERATING SCALAR UNIT BYPASS TESTS.
************************************************************************/
typedef struct {
char *instr; /* instruction string */
int op; /* instruction type */
int vtype; /* intermediate value type */
int min_nop; /* minimum NOPs between instrs */
int grpmsk; /* eliminate incongruent pairs */
int nonseq; /* cannot be placed sequent'ly */
} ITABLE;
#define VTYPE_U32 0 /* all generic logic/arith data */
#define VTYPE_U16 1 /* VCO data */
#define VTYPE_UIP 2 /* Instruction pointer */
#define VTYPE_UDP 3 /* Memory pointer */
#define VTYPE_EQU 4 /* Made identical to Reg[2] */
#define OP_BNE 0
#define OP_CFC2 (OP_BNE+1)
#define OP_CTC2 (OP_CFC2+1)
#define OP_JALR (OP_CTC2+1)
#define OP_LQV (OP_JALR+1)
#define OP_LW (OP_LQV+1)
#define OP_XOR (OP_LW+1)
#define OP_XORI (OP_XOR+1)
/************************************************************************
GLOBAL VARIABLES USED IN TEST GENERATION.
************************************************************************/
extern FILE *fhSFile;
extern FILE *fhTFile;
extern char cTFName[];
extern int FileCount;
extern int TestNum;
extern u32 Tip;
extern int Space;
extern int DestRegID;
extern int Src1RegID;
extern int Src2RegID;
extern int Src3RegID;
extern int DumpRegID;
extern ITABLE I1Table[];
extern ITABLE I2Table[];
extern int I1TableSize;
extern int I2TableSize;
extern u32 InstrEmulation();
extern void Header();
extern void Tail();
/************************************************************************
GLOBAL BARIABLES USED IN MODELING RSP.
************************************************************************/
extern u32 Vco;
extern u32 Reg[];
extern UD32 VReg[32][4];
extern UD32 DMem[];
#endif