cv.h 1.62 KB
/*
 *  cv.h: types, macros, etc. for Coverage unit
 *
 *
 */

#ifndef COVERAGE_UNIT_INCLD
#define COVERAGE_UNIT_INCLD


typedef struct
{
  /* required by C-sim */
    char *label;  /* label must be first */
    char **argv;
    int argc;
    int gclk_old;

  /*    I n p u t    S i g n a l s    */

    int gclk;

    int ew_cv_data;		/* [12:0] */
    int ew_cv_start_x;		/* [11:0] */
    int cycle_type;		/* lsb of cycle type */
    int ew_cv_newspan;		/* start span */
    int left;			/* left major flag */
    int reset_l;
  
  /*    O u t p u t    S i g n a l s    */

    int cv_value;    		/* [3:0], 1.3 coverage value */
    int mask15;			/* flag */
    int x_offset;		/* [1:0], x subpixel correction */
    int y_offset;		/* [1:0], y subpixel correction */
    int x_dither;		/* [1:0], 1 clock before start_span */

  /*    I n t e r n a l     R e g i s t e r s    */

    unsigned int 	xm0: 13;
    unsigned int 	xm1: 13;
    unsigned int 	xm2: 13;
    unsigned int 	xm3: 13;
    unsigned int 	xh0: 13;
    unsigned int 	xh1: 13;
    unsigned int 	xh2: 13;
    unsigned int 	xh3: 13;

    unsigned int 	xmin0: 13;
    unsigned int 	xmin1: 13;
    unsigned int 	xmin2: 13;
    unsigned int 	xmin3: 13;
    unsigned int 	xmax0: 13;
    unsigned int 	xmax1: 13;
    unsigned int 	xmax2: 13;
    unsigned int 	xmax3: 13;

    unsigned int 	xval: 4;

    unsigned int 	comp_new: 1;
    unsigned int 	x_cur: 12;

    /* debug */
    unsigned int 	mask:   16;
    unsigned int 	mask_l: 16;
    unsigned int 	mask_r: 16;

} cv_t;


/*
 *  Prototypes
 */

void cv(cv_t **pp0, cv_t **pp1);
void cv_init(cv_t *p0, cv_t *p1);


#endif /* COVERAGE_UNIT_INCLD */