driver.h 2.7 KB
/*
 *
 *
 *
 *
 */

#ifndef DRIVER_INCLUDE
#define DRIVER_INCLUDE

#define LOD_DLYS          1
#define S_DLYS            2
#define T_DLYS            2
#define MIN_LEVEL_DLYS    1
#define DETAIL_EN_DLYS    1
#define SHARP_EN_DLYS     1
#define LOD_EN_DLYS       1
#define COPY_DLYS         4
#define SAMP_TYPE_DLYS    5
#define TLUT_EN_D6_DLYS   6
#define TLUT_TYPE_DLYS    8
#define MAX_LEVEL_DLYS    1
#define PRIM_TILE_DLYS    1
#define SHIFT_COORD_DLYS  4

#define TILE_ADRS_DLYS    2
#define TILE_DATA_DLYS    2
#define WE_TILE_SIZE_DLYS 2
#define WE_TILE_ATTR_DLYS 2

#define VM_IN_DLYS        6
#define VM_DV_DLYS        6

#define LOAD_DV_DLYS      6

#define DV_DLYS_MAX      11
#define EXIT1_DLYS_MAX   11
#define X_DLYS_MAX       11
#define Y_DLYS_MAX       11

#define COPY_LOAD_DLYS    6

#define DUMPLOD           1
#define DUMPTILEMEM       2
#define DUMPDIV           4
#define DUMPADJ           8
#define DUMPFRAC         16
#define DUMPADRS         32
#define DUMPSORT         64
#define DUMPLOAD        128
#define DUMPMUX         256
#define DUMPTEX         512


#include "ints.h"

typedef struct {
  /* required */
  char *label;
  int gclk;
  int gclk_old;
  int argc;
  char **argv;

  int copy_load_e;

  /* output */
  int st_span;
  int ncyc;

  int lod;
  int s;
  int t;
  int w;

  int min_level;
  int detail_en;
  int sharp_en;
  int lod_en;
  int persp_en;
  int copy;
  int samp_type;
  int tlut_en;
  int tlut_type;

  int max_level;
  int prim_tile;
  int load;
  int shift_coord;
 
  int tile_adrs;
  int64 tile_data;
  int we_tile_size;
  int we_tile_attr;

  int vm_in;
  int vm_dv; 

  int load_dv;

  int dv;

  int exit1;

  int x;
  int y;

  int64 copy_load;

  /*  Intermediate signals */

  int lod_dly[LOD_DLYS];
  int s_dly[S_DLYS];
  int t_dly[T_DLYS];
  int min_level_dly[MIN_LEVEL_DLYS];
  int detail_en_dly[DETAIL_EN_DLYS];
  int sharp_en_dly[SHARP_EN_DLYS];
  int lod_en_dly[LOD_EN_DLYS];
  int copy_dly[COPY_DLYS];
  int samp_type_dly[SAMP_TYPE_DLYS];
  int tlut_en_d6_dly[TLUT_EN_D6_DLYS];
  int tlut_type_dly[TLUT_TYPE_DLYS];
  int max_level_dly[MAX_LEVEL_DLYS];
  int prim_tile_dly[PRIM_TILE_DLYS];
  int shift_coord_dly[SHIFT_COORD_DLYS];

  int tile_adrs_dly[TILE_ADRS_DLYS];
  int64 tile_data_dly[TILE_DATA_DLYS];
  int we_tile_size_dly[WE_TILE_SIZE_DLYS];
  int we_tile_attr_dly[WE_TILE_ATTR_DLYS];

  int vm_in_dly[VM_IN_DLYS];
  int vm_dv_dly[VM_DV_DLYS];

  int load_dv_dly[LOAD_DV_DLYS];
  int dv_dly[DV_DLYS_MAX];
  int exit1_dly[EXIT1_DLYS_MAX];
  int x_dly[X_DLYS_MAX];
  int y_dly[Y_DLYS_MAX];
  
  int64 copy_load_dly[COPY_LOAD_DLYS];

} driver_t;


/*
 *  Prototypes
 */
void driver(driver_t **pp0, driver_t **pp1);
void driver_init(driver_t *p0, driver_t *p1);

#endif /* DRIVER_INCLUDE */