ep_tc.v
2.63 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
/**************************************************************************
* *
* 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: ep_tc.v,v 1.2 2002/11/22 00:34:20 rws Exp $
////////////////////////////////////////////////////////////////////////
//
// Project Reality
//
// module: ep_tc
// description: Top level for edge walker pipe.
//
// designer: Phil Gossett
// date: 6/7/95
//
////////////////////////////////////////////////////////////////////////
module ep_tc (clk, start_gclk, tlut_en, tc_load, ew_st_span, ew_d,
st_span_st_w, st_span_st_s, st_span_st_t,
st_span_tc, st_span_10d,
d_w, d_s, d_t, d_3d);
input clk, start_gclk;
input tlut_en;
input tc_load;
input ew_st_span;
input [21:0] ew_d;
output st_span_st_w;
output st_span_st_s;
output st_span_st_t;
output st_span_tc;
output st_span_10d;
output [21:0] d_w;
output [21:0] d_s;
output [21:0] d_t;
output [21:0] d_3d;
reg st_span_1d;
reg st_span_2d;
reg st_span_3d;
reg st_span_4d;
reg st_span_5d;
reg st_span_6d;
reg st_span_7d;
reg st_span_8d;
reg st_span_9d;
reg st_span_10d;
reg [21:0] d_1d;
reg [21:0] d_2d;
reg [21:0] d_3d;
reg tc_load_1d;
always @(posedge clk)
if (start_gclk) begin
st_span_1d <= ew_st_span;
st_span_2d <= st_span_1d;
st_span_3d <= st_span_2d;
st_span_4d <= st_span_3d;
st_span_5d <= st_span_4d;
st_span_6d <= st_span_5d;
st_span_7d <= st_span_6d;
st_span_8d <= st_span_7d;
st_span_9d <= st_span_8d;
st_span_10d <= st_span_9d;
d_1d <= ew_d;
d_2d <= d_1d;
d_3d <= d_2d;
tc_load_1d <= tc_load;
end
assign st_span_st_w = tlut_en ? st_span_5d : st_span_7d;
assign st_span_st_s = (tlut_en & !tc_load_1d) ? st_span_7d : st_span_9d;
assign st_span_st_t = (tlut_en & !tc_load_1d) ? st_span_7d : st_span_9d;
assign st_span_tc = (tlut_en & !tc_load ) ? st_span_6d : st_span_8d;
assign d_w = tlut_en ? d_1d : d_3d;
assign d_s = (tlut_en & !tc_load_1d) ? d_1d : d_3d;
assign d_t = (tlut_en & !tc_load_1d) ? ew_d : d_2d;
endmodule // ep_tc