tab2sim.h
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* tab2sim.h
*/
#ifndef TAB2SIM_INCLD
#define TAB2SIM_INCLD
#define MAX_SIGNALS 1024
#define MAX_CLOCKS 50
#define MAX_SIG_NAME 100
#define MAX_CLK_PHASES 10
typedef enum {
QSIM_INPUT,
QSIM_OUTPUT,
QSIM_BIDIR,
QSIM_VALID
} SignalNodeType;
typedef struct {
char sig_name[MAX_SIG_NAME];
char val_sig_name[MAX_SIG_NAME]; /* data valid */
char en_sig_name[MAX_SIG_NAME]; /* output enable sig name */
char clk_sig_name[MAX_SIG_NAME]; /* output enable sig name */
int msb;
int lsb;
int size; /* bits */
int hex_dig; /* nibbles */
float edge; /* nanoseconds */
int edgev; /* edge time / fastest clock period */
float strobe; /* nanoseconds */
int strobev; /* strobe time / fastest clock period */
int multiple; /* multiple of vector rate this signal changes at */
SignalNodeType type;
int valid; /* valid signal present */
int val_sig_indx; /* valid signal index */
int oe_sig_indx; /* output enable signal index */
int polarity;/* polarity of output enable sig, 0 = active low */
} SigDef;
typedef struct {
char sig_name[MAX_SIG_NAME];
int val[MAX_CLK_PHASES];
float time[MAX_CLK_PHASES];
int phases; /* how many transitions in a period */
float period; /* period of clock */
int multiple; /* multiple of fastest clock */
int dummy; /* dummy clock, not echoed to sim file */
} ClockDef;
typedef struct {
int indx; /* original index of signal in vector */
float time; /* edge or strobe time */
int bidir; /* 1 is input entry, 0 is output entry */
} SortTable;
#endif /* TAB2SIM_INCLD */