top_level.v
7.97 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
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: top_level
// description: Top Level Driver
//
// designer: Rob Moore
// date: 9/7/94
//
////////////////////////////////////////////////////////////////////////
`timescale 100ps / 100ps //1unit = 0.01ns
module top_level();
wire gclk;
wire reset;
wire cs_st_prim;
wire cs_st_attr;
wire [5:0] cs_cmd;
wire [63:0] cs_ew_d;
wire [31:0] ew_dxr; // s15.16 (single buffer)
wire [31:0] ew_dxg; // s15.16 (single buffer)
wire [31:0] ew_dxb; // s15.16 (single buffer)
wire [31:0] ew_dxa; // s15.16 (single buffer)
wire [31:0] ew_dxz; // s15.16 (single buffer)
wire [31:0] ew_dxs; // s15.16 (single buffer)
wire [31:0] ew_dxt; // s15.16 (single buffer)
wire [31:0] ew_dxw; // s15.16 (single buffer)
wire [31:0] ew_dxl; // s15.16 (single buffer)
wire [31:0] ew_dyr; // s15.16 (single buffer)
wire [31:0] ew_dyg; // s15.16 (single buffer)
wire [31:0] ew_dyb; // s15.16 (single buffer)
wire [31:0] ew_dya; // s15.16 (single buffer)
wire [31:0] ew_dyz; // s15.16 (single buffer)
wire [31:0] ew_dys; // s15.16 (single buffer)
wire [31:0] ew_dyt; // s15.16 (single buffer)
wire [31:0] ew_dyw; // s15.16 (single buffer)
wire [31:0] ew_dyl; // s15.16 (single buffer)
wire [21:0] st_dxr; // s10.11 (triple buffer)
wire [21:0] st_dxg; // s10.11 (triple buffer)
wire [21:0] st_dxb; // s10.11 (triple buffer)
wire [21:0] st_dxa; // s10.11 (triple buffer)
wire [31:0] st_dxz; // s15.16 (triple buffer)
wire [31:0] st_dxs; // s15.16 (double buffer)
wire [31:0] st_dxt; // s15.16 (double buffer)
wire [31:0] st_dxw; // s15.16 (double buffer)
wire [31:0] st_dxl; // s15.16 (double buffer)
wire [12:0] st_dyr; // s10.2 (double buffer)
wire [12:0] st_dyg; // s10.2 (double buffer)
wire [12:0] st_dyb; // s10.2 (double buffer)
wire [12:0] st_dya; // s10.2 (double buffer)
wire [21:0] st_dyz; // s15.6 (double buffer)
wire [55:0] color_image; // 3f 55:51, 43:32, 25:0 (unsynced)
wire [55:0] z_image; // 3e 25:0 (unsynced)
wire [55:0] tex_image; // 3d 55:51, 43:32, 25:0 (unsynced)
wire [55:0] combine_mode; // 3c 55:0 (unsynced)
wire [55:0] env_color; // 3b 31:0 (unsynced)
wire [55:0] prim_color; // 3a 47:40, 39:0 (triple buffer)
wire [55:0] blend_color; // 39 31:0 (unsynced)
wire [55:0] fog_color; // 38 31:0 (unsynced)
wire [55:0] fill_color; // 37 31:0 (unsynced)
wire [55:0] other_modes; // 2f 53:0 (unsynced)
wire [55:0] prim_depth; // 2e 31:16, 15:0 (triple buffer)
wire [55:0] scissor; // 2d 55:32, 25:0 (single buffer)
wire [55:0] convert; // 2c 53:0 (unsynced)
wire [55:0] key_r; // 2b 27:0 (unsynced)
wire [55:0] key_gb; // 2a 55:0 (unsynced)
wire rel_sync_tile; // 28 (counter)
wire rel_sync_pipe; // 27 (counter)
wire load; // tile(34),block(33),tlut(30) (triple buffer)
wire shift_coord; // load_block(33),tlut(34) (triple buffer)
wire [2:0] level; // primitives (36,24,25,0f-08) (triple buffer)
wire [2:0] tile; // primitives (36,24,25,0f-08) (triple buffer)
wire ew_major_left; // primitives (36,24,25,0f-08) (pipe)
wire ew_minor_left; // primitives (36,24,25,0f-08) (pipe)
wire ew_offset_left; // primitives (36,24,25,0f-08) (pipe)
wire cv_left; // primitives (36,24,25,0f-08) (pipe)
wire st_r_left; // primitives (36,24,25,0f-08) (pipe)
wire st_g_left; // primitives (36,24,25,0f-08) (pipe)
wire st_b_left; // primitives (36,24,25,0f-08) (pipe)
wire st_a_left; // primitives (36,24,25,0f-08) (pipe)
wire st_z_left; // primitives (36,24,25,0f-08) (pipe)
wire st_s_left; // primitives (36,24,25,0f-08) (pipe)
wire st_t_left; // primitives (36,24,25,0f-08) (pipe)
wire st_w_left; // primitives (36,24,25,0f-08) (pipe)
wire st_l_left; // primitives (36,24,25,0f-08) (pipe)
// instance driver
driver driver (.gclk(gclk), .reset(reset), .cs_st_prim(cs_st_prim), .cs_st_attr(cs_st_attr),
.cs_cmd(cs_cmd), .cs_ew_d(cs_ew_d),
.ew_dxr(ew_dxr), .ew_dxg(ew_dxg), .ew_dxb(ew_dxb), .ew_dxa(ew_dxa), .ew_dxz(ew_dxz),
.ew_dxs(ew_dxs), .ew_dxt(ew_dxt), .ew_dxw(ew_dxw), .ew_dxl(ew_dxl),
.ew_dyr(ew_dyr), .ew_dyg(ew_dyg), .ew_dyb(ew_dyb), .ew_dya(ew_dya), .ew_dyz(ew_dyz),
.ew_dys(ew_dys), .ew_dyt(ew_dyt), .ew_dyw(ew_dyw), .ew_dyl(ew_dyl),
.st_dxr(st_dxr), .st_dxg(st_dxg), .st_dxb(st_dxb), .st_dxa(st_dxa), .st_dxz(st_dxz),
.st_dxs(st_dxs), .st_dxt(st_dxt), .st_dxw(st_dxw), .st_dxl(st_dxl),
.st_dyr(st_dyr), .st_dyg(st_dyg), .st_dyb(st_dyb), .st_dya(st_dya), .st_dyz(st_dyz),
.color_image(color_image), .z_image(z_image), .tex_image(tex_image),
.combine_mode(combine_mode),
.env_color(env_color), .prim_color(prim_color), .blend_color(blend_color),
.fog_color(fog_color), .fill_color(fill_color),
.other_modes(other_modes), .prim_depth(prim_depth), .scissor(scissor),
.convert(convert), .key_r(key_r), .key_gb(key_gb),
.rel_sync_tile(rel_sync_tile), .rel_sync_pipe(rel_sync_pipe),
.load(load), .shift_coord(shift_coord), .level(level), .tile(tile),
.ew_major_left(ew_major_left), .ew_minor_left(ew_minor_left),
.ew_offset_left(ew_offset_left), .cv_left(cv_left),
.st_r_left(st_r_left), .st_g_left(st_g_left), .st_b_left(st_b_left),
.st_a_left(st_a_left), .st_z_left(st_z_left),
.st_s_left(st_s_left), .st_t_left(st_t_left), .st_w_left(st_w_left),
.st_l_left(st_l_left));
// instance AT unit
at at (.gclk(gclk), .reset(reset), .cs_st_prim(cs_st_prim), .cs_st_attr(cs_st_attr),
.cs_cmd(cs_cmd), .cs_ew_d(cs_ew_d),
.ew_dxr(ew_dxr), .ew_dxg(ew_dxg), .ew_dxb(ew_dxb), .ew_dxa(ew_dxa), .ew_dxz(ew_dxz),
.ew_dxs(ew_dxs), .ew_dxt(ew_dxt), .ew_dxw(ew_dxw), .ew_dxl(ew_dxl),
.ew_dyr(ew_dyr), .ew_dyg(ew_dyg), .ew_dyb(ew_dyb), .ew_dya(ew_dya), .ew_dyz(ew_dyz),
.ew_dys(ew_dys), .ew_dyt(ew_dyt), .ew_dyw(ew_dyw), .ew_dyl(ew_dyl),
.st_dxr(st_dxr), .st_dxg(st_dxg), .st_dxb(st_dxb), .st_dxa(st_dxa), .st_dxz(st_dxz),
.st_dxs(st_dxs), .st_dxt(st_dxt), .st_dxw(st_dxw), .st_dxl(st_dxl),
.st_dyr(st_dyr), .st_dyg(st_dyg), .st_dyb(st_dyb), .st_dya(st_dya), .st_dyz(st_dyz),
.color_image(color_image), .z_image(z_image), .tex_image(tex_image),
.combine_mode(combine_mode),
.env_color(env_color), .prim_color(prim_color), .blend_color(blend_color),
.fog_color(fog_color), .fill_color(fill_color),
.other_modes(other_modes), .prim_depth(prim_depth), .scissor(scissor),
.convert(convert), .key_r(key_r), .key_gb(key_gb),
.rel_sync_tile(rel_sync_tile), .rel_sync_pipe(rel_sync_pipe),
.load(load), .shift_coord(shift_coord), .level(level), .tile(tile),
.ew_major_left(ew_major_left), .ew_minor_left(ew_minor_left),
.ew_offset_left(ew_offset_left), .cv_left(cv_left),
.st_r_left(st_r_left), .st_g_left(st_g_left), .st_b_left(st_b_left),
.st_a_left(st_a_left), .st_z_left(st_z_left),
.st_s_left(st_s_left), .st_t_left(st_t_left), .st_w_left(st_w_left),
.st_l_left(st_l_left));
// kill simulation when tabular file read
always @(driver.EndVectors)
$finish;
// dump file
initial
begin
$dumpvars;
end
endmodule // top_level