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

#ifndef DRIVER_INCLUDE
#define DRIVER_INCLUDE

#include "ints.h"


/*
 *  DMA states
 */

typedef enum {
  WAIT,
  OUTPUT_WORD,
  RANDOM_DELAY
} DmaStates;
 

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    reset;
  int    wr_fb;
  int    flush;
  int    zero;
  int	 gclk_en;

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

} driver_t;


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

#endif /* DRIVER_INCLUDE */