bpgen.h 2.39 KB
/************************************************************************
  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