top_level.v
7.43 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
162
163
164
165
166
167
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphics, Inc. *
* *
* These coded instructions, statements, and computer programs contain *
* unpublished proprietary information of Silicon Graphics, Inc., and *
* are protected by Federal copyright law. They may not be disclosed *
* to third parties or copied or duplicated in any form, in whole or *
* in part, without the prior written consent of Silicon Graphics, Inc. *
* *
*************************************************************************/
// $Id: top_level.v,v 1.1.1.1 2002/05/02 03:29:06 blythe Exp $
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: top_level
// description: Top Level Driver
//
// designer: Tony DeLaurier
// date: 8/18/94
//
////////////////////////////////////////////////////////////////////////
`timescale 10ps / 10ps //1unit = 0.01ns
module top_level();
wire gclk; // RDP gated clock
wire st_span; // start span
wire ncyc; // 0: 1-cycle mode, 1: 2-cycle mode
// pixel data
wire [15:0] l; // level of detail
wire [15:0] s; // persp. divided texture image coord.
wire [15:0] t; // persp. divided texture image coord.
wire [15:0] w; // inverse normalized depth
// attribute data
wire [4:0] min_level; // minimum lod fraction clamp
wire detail_en; // enable detailed texture
wire sharp_en; // enable sharpened texture
wire lod_en; // use lod in tile indices determination
wire persp_en; // enable perspective correction
wire copy; // copy mode enabled
wire samp_type; // filter enabled
wire tlut_en; // enable texture lookup table
wire tlut_type; // tlut type
// primitive data
wire [2:0] max_level; // number of mipmaps -1 or -2
wire [2:0] prim_tile; // base tile index of primitive
wire load; // load_tile, load_block or load_tlut
wire shift_coord; // treat coord as 12.3 instead of 10.5
// from command interface unit
wire [2:0] tile_adrs; // tile write address
wire [47:0] tile_data; // tile wire data
wire we_tile_size; // write enable for tile size data
wire we_tile_attr; // write enable for tile attribute data
// to color combine unit
wire [8:0] l_frac; // lod fraction for 3rd-axis interpolation
wire lod_ge_one; // lod >= 1
// to / from memspan unit
wire [63:0] copy_load; // bidirectional copy / load bus
wire load_dv; // valid load data on copy_load bus
// to texture filter unit
wire [8:0] red_a; // texel a, red / u channel
wire [8:0] green_a; // texel a, green / v channel
wire [8:0] blue_a; // texel a, blue / y channel
wire [8:0] alpha_a; // texel a, alpha / y channel
wire [8:0] red_b; // texel b, red / u channel
wire [8:0] green_b; // texel b, green / v channel
wire [8:0] blue_b; // texel b, blue / y channel
wire [8:0] alpha_b; // texel b, alpha / y channel
wire [8:0] red_c; // texel c, red / u channel
wire [8:0] green_c; // texel c, green / v channel
wire [8:0] blue_c; // texel c, blue / y channel
wire [8:0] alpha_c; // texel c, alpha / y channel
wire [8:0] red_d; // texel d, red / u channel
wire [8:0] green_d; // texel d, green / v channel
wire [8:0] blue_d; // texel d, blue / y channel
wire [8:0] alpha_d; // texel d, alpha / y channel
wire [7:0] s_frac_rg; // s interp fraction to filter (RG)
wire [7:0] t_frac_rg; // t interp fraction to filter (RG)
wire [7:0] s_frac_ba; // s interp fraction to filter (BA)
wire [7:0] t_frac_ba; // t interp fraction to filter (BA)
// other
wire bist_done; // bist done
wire bist0_fail; // mem test fail flag (active high) (bnk0)
wire bist1_fail; // mem test fail flag (active high) (bnk1)
wire bist2_fail; // mem test fail flag (active high) (bnk2)
wire bist3_fail; // mem test fail flag (active high) (bnk3)
wire bist4_fail; // mem test fail flag (active high) (bnk4)
wire bist5_fail; // mem test fail flag (active high) (bnk5)
wire bist6_fail; // mem test fail flag (active high) (bnk6)
wire bist7_fail; // mem test fail flag (active high) (bnk7)
// instance driver
driver driver(.st_span(st_span), .ncyc(ncyc), .l(l), .s(s), .t(t), .w(w),
.min_level(min_level), .detail_en(detail_en),
.sharp_en(sharp_en), .lod_en(lod_en), .persp_en(persp_en),
.copy(copy), .samp_type(samp_type), .tlut_en(tlut_en),
.tlut_type(tlut_type), .max_level(max_level),
.prim_tile(prim_tile), .load(load), .shift_coord(shift_coord),
.tile_adrs(tile_adrs), .tile_data(tile_data),
.we_tile_size(we_tile_size), .we_tile_attr(we_tile_attr),
.load_dv(load_dv),
.copy_load(copy_load), .gclk(gclk),
.a_three(tex.a_three), .tex_size_1d(tex.tile_tex_size),
.tex_type_1d(tex.tile_tex_type), .copy_1d(tex.tc.copy_1d),
.load_5d(tex.tc.load_5d), .yuv_tex_1d(tex.tc.yuv_tex),
.odd_t(tex.odd_t), .flip(tex.tc.flip), .shift(tex.tc.shift),
.d_adder(tex.tc.d_adder), .c_adder(tex.tc.c_adder),
.b_adder(tex.tc.b_adder), .a({tex.a_twelve, tex.tc.a[11:0]}),
.copy_load_oe(tex.tm.copy_load_oe));
// instance tex unit
tex tex (.gclk(gclk), .reset_l(1'b0), .bist_go(1'b0), .bist_check(1'b0), .iddq(1'b0),
.st_span(st_span), .ncyc(ncyc), .l(l),
.s(s), .t(t), .w(w), .min_level(min_level), .detail_en(detail_en),
.sharp_en(sharp_en), .lod_en(lod_en), .persp_en(persp_en),
.copy(copy), .samp_type(samp_type), .tlut_en(tlut_en),
.tlut_type(tlut_type), .max_level(max_level), .prim_tile(prim_tile),
.load(load), .shift_coord(shift_coord), .tile_adrs(tile_adrs),
.tile_data(tile_data), .we_tile_size(we_tile_size),
.we_tile_attr(we_tile_attr),
.l_frac(l_frac), .lod_ge_one(lod_ge_one),
.s_frac_rg(s_frac_rg), .t_frac_rg(t_frac_rg), .s_frac_ba(s_frac_ba),
.t_frac_ba(t_frac_ba), .red_a(red_a), .green_a(green_a),
.blue_a(blue_a), .alpha_a(alpha_a), .red_b(red_b),
.green_b(green_b), .blue_b(blue_b), .alpha_b(alpha_b),
.red_c(red_c), .green_c(green_c), .blue_c(blue_c),
.alpha_c(alpha_c), .red_d(red_d), .green_d(green_d),
.blue_d(blue_d), .alpha_d(alpha_d), .copy_load(copy_load),
.load_dv(load_dv), .bist_done(bist_done), .bist0_fail(bist0_fail),
.bist1_fail(bist1_fail), .bist2_fail(bist2_fail), .bist3_fail(bist3_fail),
.bist4_fail(bist4_fail), .bist5_fail(bist5_fail), .bist6_fail(bist6_fail),
.bist7_fail(bist7_fail));
// kill simulation when tabular file read
always @(driver.EndVectors)
$finish;
// dump file
initial
begin
$dumpvars;
end
endmodule // top_level