driver.h 905 Bytes
/*
 *  driver.h, memory structure for CS driver
 *
 *
 *
 */

#ifndef DRIVER_INCLUDE
#define DRIVER_INCLUDE

#include "ints.h"

#define	DELAY_ONE		1
#define	DELAY_TWO		2

/*
 *  DMA states
 */

typedef enum {
  WAIT,
  OUTPUT_WORD,
  DELAY1,
  DELAY2
} DmaState;
 

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

  /* input */
  int	 clk;
  int	 request;

  /* output */
  int64	xbus_cs_data;
  int	xbus_cs_valid;
  int	ew_cs_busy;
  int	ms_busy;
  int	rel_sync_tile;
  int	rel_sync_pipe;
  int	rel_sync_full;
  int	rel_sync_load;
  int	texel_size;
  int	copy_fill;
  int	reset_l;
  int	dv;

  /* intermediate regs */
  DmaState	state;
  int	count;

  /* delayed values */

  int	dv_delay[DELAY_TWO];

} driver_t;

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

#endif /* DRIVER_INCLUDE */