ewattseldxdy.v
2.45 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
/**************************************************************************
* *
* 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: ewattseldxdy.v,v 1.1 2002/05/21 23:55:43 berndt Exp $
/////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: ewattseldxdy
// description: selects the correct da/dx and da/dy at appropriate time.
//
//
// designer: Mike M. Cai 6/20/94
//
/////////////////////////////////////////////////////////////////////////
module ewattseldxdy( dx_att, dy_att,
dxr, dxg, dxb, dxa, dxz, dxs, dxt, dxw, // dxl,
dyr, dyg, dyb, dya, dyz, dys, dyt, dyw, // dyl,
seldy);
output [22:0] dx_att, dy_att;
input [22:0] dxr, dxg, dxb, dxa, dxz, dxs, dxt, dxw, // dxl,
dyr, dyg, dyb, dya, dyz, dys, dyt, dyw; // dyl;
input [3:0] seldy; // msb selects dyz
reg [22:0] dx_att, dy_att;
always @(seldy or dxr or dxg or dxb or dxa or dxz or dxs or dxt or dxw /*or dxl*/)
case (seldy)
4'h0: dx_att = dxw;
// 4'h1: dx_att = dxl;
4'h1: dx_att = 23'h0;
4'h2: dx_att = dxs;
4'h3: dx_att = dxt;
4'h4: dx_att = dxr;
4'h5: dx_att = dxg;
4'h6: dx_att = dxb;
4'h7: dx_att = dxa;
4'h8: dx_att = dxz;
default: dx_att = dxz;
endcase
always @(seldy or dyr or dyg or dyb or dya or dyz or dys or dyt or dyw /*or dyl*/)
case (seldy)
4'h0: dy_att = dyw;
// 4'h1: dy_att = dyl;
4'h1: dy_att = 23'h0;
4'h2: dy_att = dys;
4'h3: dy_att = dyt;
4'h4: dy_att = dyr;
4'h5: dy_att = dyg;
4'h6: dy_att = dyb;
4'h7: dy_att = dya;
4'h8: dy_att = dyz;
default: dy_att = dyz;
endcase
endmodule // ewattseldxdy