st.h
5.35 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*
* st.h -- interfaces for Texture/Color/Z Steppers
*
*
*
*/
#ifndef ST_STEPPERS_INCLD
#define ST_STEPPERS_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 signals, must be int */
int gclk; /* gated clock */
/*
* NOTE:
*
* Because of a zero delay path through the edge pipe (EP) module
* some muxing normally done in the EP is done in the steppers
* instead. Since the input don't match the verilog, the symbol
* for this module is checked in to the source tree.
*/
int ew_d; /* s,15.7, from EP, not an input in verilog */
int tlut_en; /* do muxing here, done in EP in verilog */
int tc_load; /* condition tlut_en, done in EP in verilog */
int startspan_r;
int startspan_g;
int startspan_b;
int startspan_a;
int startspan_z;
int startspan_s;
int startspan_t;
int startspan_w;
int ep_st_r; /* [15:0], start point, s, 9.6, pad with 5 0's */
int ep_st_g; /* [15:0], start point, s, 9.6, pad with 5 0's */
int ep_st_b; /* [15:0], start point, s, 9.6, pad with 5 0's */
int ep_st_a; /* [15:0], start point, s, 9.6, pad with 5 0's */
int ep_st_z; /* [21:0], start point, s,15.6, pad with 10 0's */
int ep_st_s: 22; /* [21:0], start point, s,10.11, pad with 5 0's */
int ep_st_t: 22; /* [21:0], start point, s,10.11, pad with 5 0's */
int ep_st_w: 22; /* [21:0], start point, s, 0.21, pad with 5 0's */
int at_st_dxr; /* [21:0], change in x, s,10.11 */
int at_st_dxg; /* [21:0], change in x, s,10.11 */
int at_st_dxb; /* [21:0], change in x, s,10.11 */
int at_st_dxa; /* [21:0], change in x, s,10.11 */
int at_st_dxz; /* [31:0], change in x, s,15.16 */
int at_st_dxs: 27; /* [26:0], change in x, s,10.16 */
int at_st_dxt: 27; /* [26:0], change in x, s,10.16 */
int at_st_dxw: 27; /* [26:0], change in x, s,10.16 */
int at_st_dyr; /* [12:0], change in y, s,10.2 */
int at_st_dyg; /* [12:0], change in y, s,10.2 */
int at_st_dyb; /* [12:0], change in y, s,10.2 */
int at_st_dya; /* [12:0], change in y, s,10.2 */
int at_st_dyz; /* [21:0], change in y, s,15.6 */
/* LOD fix */
int at_st_dys; /* [16:0], change in y, s,10.6 */
int at_st_dyt; /* [16:0], change in y, s,10.6 */
int at_st_dyw; /* [16:0], change in y, s,0.16 */
int x_offsetr; /* [1:0], subpixel offset in x, 0.2 */
int x_offsetg; /* [1:0], subpixel offset in x, 0.2 */
int x_offsetb; /* [1:0], subpixel offset in x, 0.2 */
int x_offseta; /* [1:0], subpixel offset in x, 0.2 */
int x_offsetz; /* [1:0], subpixel offset in x, 0.2 */
int y_offsetr; /* [1:0], subpixel offset in y, 0.2 */
int y_offsetg; /* [1:0], subpixel offset in y, 0.2 */
int y_offsetb; /* [1:0], subpixel offset in y, 0.2 */
int y_offseta; /* [1:0], subpixel offset in y, 0.2 */
int y_offsetz; /* [1:0], subpixel offset in y, 0.2 */
int ncyc_r; /* */
int ncyc_g; /* */
int ncyc_b; /* */
int ncyc_a; /* */
int ncyc_z; /* */
int ncyc_s; /* */
int ncyc_t; /* */
int ncyc_w; /* */
int left_r; /* */
int left_g; /* */
int left_b; /* */
int left_a; /* */
int left_z; /* */
int left_s; /* */
int left_t; /* */
int left_w; /* */
/* O U T P U T S i g n a l s, must be int */
int st_cc_r; /* [7:0], stepped color */
int st_cc_g; /* [7:0], stepped color */
int st_cc_b; /* [7:0], stepped color */
int st_cc_a; /* [7:0], stepped color */
int st_bl_z; /* [17:0], clamped, stepped Depth */
int st_tc_s; /* [15:0], s,10.5 stepped texture coords. */
int st_tc_t; /* [15:0], s,10.5 stepped texture coords. */
int st_tc_w; /* [15:0], s,.15 stepped texture coords. */
/* New dy stepped signals for LOD fix */
int st_tc_s_dy; /* [15:0], s,10.5 stepped texture coords. + dy */
int st_tc_t_dy; /* [15:0], s,10.5 stepped texture coords. + dy */
int st_tc_w_dy; /* [15:0], s,.15 stepped texture coords. + dy */
unsigned comp_new_s: 1; /* select between normal and dy signal */
unsigned comp_new_t: 1; /* select between normal and dy signal */
unsigned comp_new_w: 1; /* select between normal and dy signal */
/* I n t e r m e d i a t e S i g n a l s */
unsigned tc_load_d1: 1; /* delay tc_load signal */
unsigned comp_new_r: 1; /* stall signal */
unsigned comp_new_g: 1; /* stall signal */
unsigned comp_new_b: 1; /* stall signal */
unsigned comp_new_a: 1; /* stall signal */
unsigned comp_new_z: 1; /* stall signal */
unsigned comp_new_ps: 1; /* used for upper half */
unsigned comp_new_pt: 1; /* used for upper half */
unsigned comp_new_pw: 1; /* used for upper half */
unsigned accumr: 21; /* accumulator for red, 10.11 */
unsigned accumg: 21; /* accumulator for grn, 10.11 */
unsigned accumb: 21; /* accumulator for blu, 10.11 */
unsigned accuma: 21; /* accumulator for alp, 10.11 */
unsigned accums: 27; /* accumulator for s, s,10.16 */
unsigned accumt: 27; /* accumulator for t, s,10.16 */
unsigned accumw: 27; /* accumulator for w, s,.26 */
unsigned accumz: 32; /* accumulator for z, s,15.16 */
} st_t;
/*
* Prototypes
*/
void st(st_t **pp0, st_t **pp1);
void st_init(st_t *p0, st_t *p1);
#endif /* ST_STEPPERS_INCLD */