top_level.vsyn
5.48 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
161
`timescale 10ps / 10ps //1unit = 0.01ns
module top_level();
wire gclk;
wire st_span;
wire ncyc;
wire key_en;
wire texture_edge_mode;
wire cvg_times_alpha;
wire alpha_cvg_select;
wire [3:0] cc_x_sel_0_r;
wire [3:0] cc_y_sel_0_r;
wire [4:0] cc_a_sel_0_r;
wire [2:0] cc_c_sel_0_r;
wire [2:0] cc_x_sel_0_a;
wire [2:0] cc_y_sel_0_a;
wire [2:0] cc_a_sel_0_a;
wire [2:0] cc_c_sel_0_a;
wire [3:0] cc_x_sel_1_r;
wire [3:0] cc_y_sel_1_r;
wire [4:0] cc_a_sel_1_r;
wire [2:0] cc_c_sel_1_r;
wire [2:0] cc_x_sel_1_a;
wire [2:0] cc_y_sel_1_a;
wire [2:0] cc_a_sel_1_a;
wire [2:0] cc_c_sel_1_a;
wire [7:0] st_r;
wire [7:0] st_g;
wire [7:0] st_b;
wire [7:0] st_a;
wire [8:0] tf_r;
wire [8:0] tf_g;
wire [8:0] tf_b;
wire [8:0] tf_a;
wire [8:0] tf_lod_frac;
wire tf_lge1;
wire [8:0] prim_lod_frac;
wire [7:0] prim_r;
wire [7:0] prim_g;
wire [7:0] prim_b;
wire [7:0] prim_a;
wire [7:0] env_r;
wire [7:0] env_g;
wire [7:0] env_b;
wire [7:0] env_a;
wire [7:0] center_r;
wire [7:0] center_g;
wire [7:0] center_b;
wire [7:0] scale_r;
wire [7:0] scale_g;
wire [7:0] scale_b;
wire [11:0] width_r;
wire [11:0] width_g;
wire [11:0] width_b;
wire [8:0] k4_coeff;
wire [8:0] k5_coeff;
wire [8:0] noise;
wire [3:0] cvg;
wire dither_en;
wire [16:0] cc_r;
wire [16:0] cc_g;
wire [16:0] cc_b;
wire [8:0] cc_a;
wire [7:0] shade_a;
wire [7:0] pixel_r;
wire [7:0] pixel_g;
wire [7:0] pixel_b;
wire [8:0] pixel_a;
wire [3:0] pixel_cvg;
// instance driver
driver driver(.st_span(st_span), .ncyc(ncyc), .key_en(key_en),
.texture_edge_mode(texture_edge_mode),
.cvg_times_alpha(cvg_times_alpha),
.alpha_cvg_select(alpha_cvg_select),
.cc_x_sel_0_r(cc_x_sel_0_r), .cc_y_sel_0_r(cc_y_sel_0_r),
.cc_a_sel_0_r(cc_a_sel_0_r), .cc_c_sel_0_r(cc_c_sel_0_r),
.cc_x_sel_0_a(cc_x_sel_0_a), .cc_y_sel_0_a(cc_y_sel_0_a),
.cc_a_sel_0_a(cc_a_sel_0_a), .cc_c_sel_0_a(cc_c_sel_0_a),
.cc_x_sel_1_r(cc_x_sel_1_r), .cc_y_sel_1_r(cc_y_sel_1_r),
.cc_a_sel_1_r(cc_a_sel_1_r), .cc_c_sel_1_r(cc_c_sel_1_r),
.cc_x_sel_1_a(cc_x_sel_1_a), .cc_y_sel_1_a(cc_y_sel_1_a),
.cc_a_sel_1_a(cc_a_sel_1_a), .cc_c_sel_1_a(cc_c_sel_1_a),
.st_r(st_r), .st_g(st_g), .st_b(st_b), .st_a(st_a),
.tf_r(tf_r), .tf_g(tf_g), .tf_b(tf_b), .tf_a(tf_a),
.tf_lod_frac(tf_lod_frac), .tf_lge1(tf_lge1),
.prim_lod_frac(prim_lod_frac),
.prim_r(prim_r), .prim_g(prim_g),
.prim_b(prim_b), .prim_a(prim_a),
.env_r(env_r), .env_g(env_g), .env_b(env_b), .env_a(env_a),
.center_r(center_r), .center_g(center_g), .center_b(center_b),
.scale_r(scale_r), .scale_g(scale_g), .scale_b(scale_b),
.width_r(width_r), .width_g(width_g), .width_b(width_b),
.k4_coeff(k4_coeff), .k5_coeff(k5_coeff), .noise(noise),
.cvg(cvg), .dither_en(dither_en), .shade_a(shade_a),
.cc_r({cc.\cc_r[16] , cc.\cc_r[15] , cc.\cc_r[14] ,
cc.\cc_r[13] , cc.\cc_r[12] , cc.\cc_r[11] ,
cc.\cc_r[10] , cc.\cc_r[9] , cc.\cc_r[8] , cc.\cc_r[7] ,
cc.\cc_r[6] , cc.\cc_r[5] , cc.\cc_r[4] , cc.\cc_r[3] ,
cc.\cc_r[2] , cc.\cc_r[1] , cc.\cc_r[0] }),
.cc_g({cc.\cc_g[16] , cc.\cc_g[15] , cc.\cc_g[14] ,
cc.\cc_g[13] , cc.\cc_g[12] , cc.\cc_g[11] ,
cc.\cc_g[10] , cc.\cc_g[9] , cc.\cc_g[8] , cc.\cc_g[7] ,
cc.\cc_g[6] , cc.\cc_g[5] , cc.\cc_g[4] , cc.\cc_g[3] ,
cc.\cc_g[2] , cc.\cc_g[1] , cc.\cc_g[0] }),
.cc_b({cc.\cc_b[16] , cc.\cc_b[15] , cc.\cc_b[14] ,
cc.\cc_b[13] , cc.\cc_b[12] , cc.\cc_b[11] ,
cc.\cc_b[10] , cc.\cc_b[9] , cc.\cc_b[8] , cc.\cc_b[7] ,
cc.\cc_b[6] , cc.\cc_b[5] , cc.\cc_b[4] , cc.\cc_b[3] ,
cc.\cc_b[2] , cc.\cc_b[1] , cc.\cc_b[0] }),
.cc_a({cc.\cc_a[8] , cc.\cc_a[7] , cc.\cc_a[6] , cc.\cc_a[5] ,
cc.\cc_a[4] , cc.\cc_a[3] , cc.\cc_a[2] , cc.\cc_a[1] ,
cc.\cc_a[0] }),
.pixel_r(pixel_r), .pixel_g(pixel_g),
.pixel_b(pixel_b), .pixel_a(pixel_a),
.pixel_cvg(pixel_cvg), .gclk(gclk));
// instance cc unit
cc cc(.gclk(gclk), .st_span(st_span), .ncyc(ncyc), .key_en(key_en),
.texture_edge_mode(texture_edge_mode),
.cvg_times_alpha(cvg_times_alpha),
.alpha_cvg_select(alpha_cvg_select),
.cc_x_sel_0_r(cc_x_sel_0_r), .cc_y_sel_0_r(cc_y_sel_0_r),
.cc_a_sel_0_r(cc_a_sel_0_r), .cc_c_sel_0_r(cc_c_sel_0_r),
.cc_x_sel_0_a(cc_x_sel_0_a), .cc_y_sel_0_a(cc_y_sel_0_a),
.cc_a_sel_0_a(cc_a_sel_0_a), .cc_c_sel_0_a(cc_c_sel_0_a),
.cc_x_sel_1_r(cc_x_sel_1_r), .cc_y_sel_1_r(cc_y_sel_1_r),
.cc_a_sel_1_r(cc_a_sel_1_r), .cc_c_sel_1_r(cc_c_sel_1_r),
.cc_x_sel_1_a(cc_x_sel_1_a), .cc_y_sel_1_a(cc_y_sel_1_a),
.cc_a_sel_1_a(cc_a_sel_1_a), .cc_c_sel_1_a(cc_c_sel_1_a),
.st_r(st_r), .st_g(st_g), .st_b(st_b), .st_a(st_a),
.tf_r(tf_r), .tf_g(tf_g), .tf_b(tf_b), .tf_a(tf_a),
.tf_lod_frac(tf_lod_frac), .tf_lge1(tf_lge1),
.prim_lod_frac(prim_lod_frac),
.prim_r(prim_r), .prim_g(prim_g),
.prim_b(prim_b), .prim_a(prim_a),
.env_r(env_r), .env_g(env_g), .env_b(env_b), .env_a(env_a),
.center_r(center_r), .center_g(center_g), .center_b(center_b),
.scale_r(scale_r), .scale_g(scale_g), .scale_b(scale_b),
.width_r(width_r), .width_g(width_g), .width_b(width_b),
.k4_coeff(k4_coeff), .k5_coeff(k5_coeff), .noise(noise),
.cvg(cvg), .dither_en(dither_en), .shade_a(shade_a),
.pixel_r(pixel_r), .pixel_g(pixel_g),
.pixel_b(pixel_b), .pixel_a(pixel_a),
.pixel_cvg(pixel_cvg));
// kill simulation when tabular file read
always @(driver.EndVectors)
$finish;
// create dump file with optional argument
initial
begin
if ($test$plusargs("dump"))
$dumpvars;
end
endmodule // top_level