ewras.v
4.76 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
/**************************************************************************
* *
* Copyright (C) 1994, Silicon Graphi, 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: ewras.v,v 1.2 2002/11/22 00:34:20 rws Exp $
/////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: ewras
// description: Edge-walker rasterizer
//
//
// designer: Mike M. Cai 10/27/94
//
/////////////////////////////////////////////////////////////////////////
module ewras ( // outputs
ew_cv_d,
x_major, x_minor, x_sc_major,
x_sc_max, x_sc_min,
x_frac,
allxlmin, allxgemax,
equal_ym, end_prim_y,
allx_invalid,
yh,
y_cur_lsb,
y_dither,
// inputs
cs_ew_d,
switch_xl,
ld_xmh, ld_dxmdy, ld_dxldy, ld_dxhdy,
scbox_xmax, scbox_xmin,
scbox_ymax, scbox_ymin,
sel_xval,
ld_xmajor, clear_allxgemax, clear_xminor,
left_xminor,
ew_stall_x,
ld_y, count_y, shift_xval,
load_cmd_scissor, flush,
left_xmajor, cmp_cross_valid,
sc_field,
reset_l,
clk, start_gclk);
output [12:0] ew_cv_d;
output [11:0] x_major, x_minor, x_sc_major;
output [11:0] x_sc_max, x_sc_min;
output [7:0] x_frac;
output allxlmin, allxgemax;
output equal_ym, end_prim_y;
output allx_invalid;
output [11:0] yh;
output y_cur_lsb;
output [1:0] y_dither;
input [63:0] cs_ew_d;
input switch_xl;
input ld_xmh, ld_dxmdy, ld_dxldy, ld_dxhdy;
input [11:0] scbox_xmax, scbox_xmin,
scbox_ymax, scbox_ymin;
input sel_xval;
input ld_xmajor, clear_allxgemax, clear_xminor;
input left_xminor;
input ew_stall_x;
input ld_y, count_y, shift_xval;
input load_cmd_scissor, flush;
input left_xmajor, cmp_cross_valid;
input sc_field;
input reset_l, clk, start_gclk;
// ewx outputs
wire [19:0] x_unsc;
wire x_sticky;
// ewscx
wire [12:0] ew_cv_d;
wire [11:0] x_major, x_minor, x_sc_major;
wire [11:0] x_sc_max, x_sc_min;
wire [7:0] x_frac;
wire allxlmin, allxgemax;
// ewscy
wire equal_ym;
wire end_prim_y, allx_invalid , y_invalid;
wire [3:0] xval;
wire [11:0] yh;
wire y_cur_lsb;
wire edge_cross;
wire [1:0] y_dither;
ewx computex( // outputs
.x(x_unsc), .x_sticky(x_sticky), .edge_cross(edge_cross),
//inputs
.cs_ew_d(cs_ew_d), .switch_xl(switch_xl),
.ld_xmh(ld_xmh), .ld_dxmdy(ld_dxmdy),
.ld_dxldy(ld_dxldy), .ld_dxhdy(ld_dxhdy),
.left_xmajor(left_xmajor), .cmp_cross_valid(cmp_cross_valid),
.clk(clk), .start_gclk(start_gclk));
ewscx scissorx( // outputs
.x_sc(ew_cv_d),
.x_major(x_major), .x_frac(x_frac),
.x_minor(x_minor), .x_sc_major(x_sc_major),
.x_sc_max(x_sc_max), .x_sc_min(x_sc_min),
.allxlmin(allxlmin), .allxgemax(allxgemax),
// inputs
.x_unsc(x_unsc), .x_sticky(x_sticky),
.xval(xval), .sel_xval(sel_xval),
.scbox_xmax(scbox_xmax), .scbox_xmin(scbox_xmin),
.ld_xmajor(ld_xmajor),
.clear_allxgemax(clear_allxgemax),
.clear_xminor(clear_xminor),
.y_invalid(y_invalid),
.load_cmd(load_cmd_scissor), .left(left_xminor),
.ew_stall_x(ew_stall_x), .reset_l(reset_l), .clk(clk), .start_gclk(start_gclk) );
ewscy scissory( // outputs
.equal_ym(equal_ym),
.end_prim_y(end_prim_y),
.xval(xval), .allx_invalid(allx_invalid),
.y_invalid(y_invalid),
.yh_2ms(yh), .y_cur_lsb(y_cur_lsb),
.y_dither(y_dither),
// inputs
.cs_ew_d(cs_ew_d),
.ld_y(ld_y),
.scbox_ymax(scbox_ymax), .scbox_ymin(scbox_ymin),
.count_y(count_y), .shift_xval(shift_xval),
.load_cmd(load_cmd_scissor), .flush(flush),
.edge_cross(edge_cross), .sel_xval(sel_xval),
.sc_field(sc_field), .clk(clk), .start_gclk(start_gclk));
endmodule // ewras