ewatt.v
3.98 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
/**************************************************************************
* *
* 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: ewatt.v,v 1.2 2002/11/22 00:34:20 rws Exp $
/////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: ewatt
// description: Outputs the initial attribute for a span
//
//
// designer: Mike M. Cai 5/10/94
//
/////////////////////////////////////////////////////////////////////////
module ewatt(ew_ep_d,
cs_ew_data,
dxr, dxg, dxb, dxa, dxz, dxs, dxt, dxw, // dxl,
dyr, dyg, dyb, dya, dyz, dys, dyt, dyw, // dyl,
x_frac, ld_x_frac,
wa_addr, wen_a, wde_addr, wen_de, ra_addr, rb_addr,
add32b, add_clear, ld_a,
shuffle, noshuffle,
seldy, // seldx is same as seldy
ew_stall_attr, left, sign_dxdy,
cycle_type, load_cmd,
clk, start_gclk);
output [21:0] ew_ep_d;
input [31:0] cs_ew_data;
input [22:0] dxr, dxg, dxb, dxa, dxz, dxs, dxt, dxw, // dxl,
dyr, dyg, dyb, dya, dyz, dys, dyt, dyw; // dyl;
input [7:0] x_frac;
input ld_x_frac;
input [3:0] wa_addr, wde_addr;
input [3:0] ra_addr, rb_addr; // a-port for att, b-port for da/de
input wen_a, wen_de;
input add32b, add_clear, ld_a,
shuffle, noshuffle;
input ew_stall_attr, left,
sign_dxdy;
input [3:0] seldy; // seldx;
input [1:0] cycle_type;
input load_cmd;
input clk, start_gclk;
// RF outputs
wire [31:0] ra_data, rb_data;
// ewattadder outputs
wire [31:0] wa_data;
// ewshuffle outputs
wire [22:0] shuffleatt, shuffledade;
// ewattseldxdy outputs
wire [22:0] dx_curr, dy_curr;
// ewattoffset outputs
wire [21:0] ew_ep_d;
ewrf32b18w regfile ( .wa_data(wa_data), .wa_addr(wa_addr), .wen_a(wen_a),
.wde_data(cs_ew_data), .wde_addr(wde_addr), .wen_de(wen_de),
.ra_addr(ra_addr), .rb_addr(rb_addr),
.ra_data(ra_data), .rb_data(rb_data),
.ew_stall_attr(ew_stall_attr),
.clk(clk), .start_gclk(start_gclk)
);
ewattadder addit ( .wa_data(wa_data),
.in_att(ra_data), .in_dade(rb_data),
.cs_ew_data(cs_ew_data),
.add32b(add32b), .add_clear(add_clear),
.ld_a(ld_a),
.ew_stall_attr(ew_stall_attr), .clk(clk), .start_gclk(start_gclk));
ewshuffle shuffleit(.att_out(shuffleatt), .dade_out(shuffledade),
.att_in(ra_data), .dade_in(rb_data),
.shuffle(shuffle), .noshuffle(noshuffle),
.clk(clk), .start_gclk(start_gclk));
ewattseldxdy seldxdy( .dx_att(dx_curr), .dy_att(dy_curr),
.dxr(dxr), .dxg(dxg), .dxb(dxb), .dxa(dxa), .dxz(dxz),
.dxs(dxs), .dxt(dxt), .dxw(dxw), // .dxl(dxl),
.dyr(dyr), .dyg(dyg), .dyb(dyb), .dya(dya), .dyz(dyz),
.dys(dys), .dyt(dyt), .dyw(dyw), // .dyl(dyl),
.seldy(seldy));
ewattoffseti offset( .att_d_out(ew_ep_d), .att_in(shuffleatt),
.de(shuffledade), .dx(dx_curr), .dy(dy_curr),
.x_frac(x_frac), .ld_x_frac(ld_x_frac),
.sign_dxdy(sign_dxdy),
.left(left),
.cycle_type(cycle_type), .load_cmd(load_cmd),
.clk(clk), .start_gclk(start_gclk)
);
endmodule // ewatt