1 |
9 |
jefflieu |
// -------------------------------------------------------------------------
|
2 |
|
|
// -------------------------------------------------------------------------
|
3 |
|
|
//
|
4 |
|
|
// Revision Control Information
|
5 |
|
|
//
|
6 |
|
|
// $RCSfile: altera_tse_gxb_gige_inst.v,v $
|
7 |
|
|
// $Source: /ipbu/cvs/sio/projects/TriSpeedEthernet/src/RTL/Top_level_modules/altera_tse_gxb_gige_phyip_inst.v,v $
|
8 |
|
|
//
|
9 |
|
|
// $Revision: #23 $
|
10 |
|
|
// $Date: 2010/09/05 $
|
11 |
|
|
// Check in by : $Author: sxsaw $
|
12 |
|
|
// Author : Siew Kong NG
|
13 |
|
|
//
|
14 |
|
|
// Project : Triple Speed Ethernet - 1000 BASE-X PCS
|
15 |
|
|
//
|
16 |
|
|
// Description :
|
17 |
|
|
//
|
18 |
|
|
// Instantiation for Alt2gxb, Alt4gxb
|
19 |
|
|
|
20 |
|
|
//
|
21 |
|
|
// ALTERA Confidential and Proprietary
|
22 |
|
|
// Copyright 2007 (c) Altera Corporation
|
23 |
|
|
// All rights reserved
|
24 |
|
|
//
|
25 |
|
|
// -------------------------------------------------------------------------
|
26 |
|
|
// -------------------------------------------------------------------------
|
27 |
|
|
|
28 |
|
|
//Legal Notice: (C)2007 Altera Corporation. All rights reserved. Your
|
29 |
|
|
//use of Altera Corporation's design tools, logic functions and other
|
30 |
|
|
//software and tools, and its AMPP partner logic functions, and any
|
31 |
|
|
//output files any of the foregoing (including device programming or
|
32 |
|
|
//simulation files), and any associated documentation or information are
|
33 |
|
|
//expressly subject to the terms and conditions of the Altera Program
|
34 |
|
|
//License Subscription Agreement or other applicable license agreement,
|
35 |
|
|
//including, without limitation, that your use is for the sole purpose
|
36 |
|
|
//of programming logic devices manufactured by Altera and sold by Altera
|
37 |
|
|
//or its authorized distributors. Please refer to the applicable
|
38 |
|
|
//agreement for further details.
|
39 |
|
|
|
40 |
|
|
module altera_tse_gxb_gige_phyip_inst (
|
41 |
20 |
jefflieu |
phy_mgmt_clk,
|
42 |
|
|
phy_mgmt_clk_reset,
|
43 |
|
|
phy_mgmt_address,
|
44 |
|
|
phy_mgmt_read,
|
45 |
|
|
phy_mgmt_readdata,
|
46 |
|
|
phy_mgmt_waitrequest,
|
47 |
|
|
phy_mgmt_write,
|
48 |
|
|
phy_mgmt_writedata,
|
49 |
|
|
tx_ready,
|
50 |
|
|
rx_ready,
|
51 |
|
|
pll_ref_clk,
|
52 |
|
|
pll_locked,
|
53 |
|
|
tx_serial_data,
|
54 |
|
|
rx_serial_data,
|
55 |
|
|
rx_runningdisp,
|
56 |
|
|
rx_disperr,
|
57 |
|
|
rx_errdetect,
|
58 |
|
|
rx_patterndetect,
|
59 |
|
|
rx_syncstatus,
|
60 |
|
|
tx_clkout,
|
61 |
|
|
rx_clkout,
|
62 |
|
|
tx_parallel_data,
|
63 |
|
|
tx_datak,
|
64 |
|
|
rx_parallel_data,
|
65 |
|
|
rx_datak,
|
66 |
|
|
rx_rlv,
|
67 |
|
|
rx_recovclkout,
|
68 |
|
|
rx_rmfifodatadeleted,
|
69 |
|
|
rx_rmfifodatainserted,
|
70 |
|
|
reconfig_togxb,
|
71 |
|
|
reconfig_fromgxb
|
72 |
9 |
jefflieu |
);
|
73 |
|
|
parameter DEVICE_FAMILY = "STRATIXV"; // The device family the the core is targetted for.
|
74 |
|
|
parameter ENABLE_ALT_RECONFIG = 0;
|
75 |
|
|
parameter ENABLE_SGMII = 1; // Use to determine rate match FIFO in ALTGX GIGE mode
|
76 |
20 |
jefflieu |
parameter ENABLE_DET_LATENCY = 0;
|
77 |
9 |
jefflieu |
|
78 |
|
|
input phy_mgmt_clk;
|
79 |
|
|
input phy_mgmt_clk_reset;
|
80 |
|
|
input [8:0]phy_mgmt_address;
|
81 |
|
|
input phy_mgmt_read;
|
82 |
|
|
output [31:0]phy_mgmt_readdata;
|
83 |
|
|
output phy_mgmt_waitrequest;
|
84 |
|
|
input phy_mgmt_write;
|
85 |
|
|
input [31:0]phy_mgmt_writedata;
|
86 |
|
|
output tx_ready;
|
87 |
|
|
output rx_ready;
|
88 |
|
|
input pll_ref_clk;
|
89 |
|
|
output pll_locked;
|
90 |
|
|
output tx_serial_data;
|
91 |
|
|
input rx_serial_data;
|
92 |
|
|
output rx_runningdisp;
|
93 |
|
|
output rx_disperr;
|
94 |
|
|
output rx_errdetect;
|
95 |
|
|
output rx_patterndetect;
|
96 |
|
|
output rx_syncstatus;
|
97 |
|
|
output tx_clkout;
|
98 |
|
|
output rx_clkout;
|
99 |
|
|
input [7:0] tx_parallel_data;
|
100 |
|
|
input tx_datak;
|
101 |
|
|
output [7:0] rx_parallel_data;
|
102 |
|
|
output rx_datak;
|
103 |
|
|
output rx_rlv;
|
104 |
|
|
output rx_recovclkout;
|
105 |
|
|
output rx_rmfifodatadeleted;
|
106 |
|
|
output rx_rmfifodatainserted;
|
107 |
|
|
input [139:0]reconfig_togxb;
|
108 |
|
|
output [91:0]reconfig_fromgxb;
|
109 |
|
|
|
110 |
|
|
wire [91:0] reconfig_fromgxb;
|
111 |
|
|
wire [139:0] wire_reconfig_togxb;
|
112 |
|
|
|
113 |
|
|
(* altera_attribute = "-name MESSAGE_DISABLE 10036" *)
|
114 |
|
|
wire [91:0] wire_reconfig_fromgxb;
|
115 |
|
|
|
116 |
|
|
|
117 |
|
|
generate if (ENABLE_ALT_RECONFIG == 0)
|
118 |
20 |
jefflieu |
begin
|
119 |
|
|
|
120 |
|
|
assign wire_reconfig_togxb = 140'd0;
|
121 |
|
|
assign reconfig_fromgxb = 92'd0;
|
122 |
9 |
jefflieu |
|
123 |
20 |
jefflieu |
end
|
124 |
9 |
jefflieu |
else
|
125 |
20 |
jefflieu |
begin
|
126 |
|
|
|
127 |
|
|
assign wire_reconfig_togxb = reconfig_togxb;
|
128 |
|
|
assign reconfig_fromgxb = wire_reconfig_fromgxb;
|
129 |
9 |
jefflieu |
|
130 |
20 |
jefflieu |
end
|
131 |
9 |
jefflieu |
endgenerate
|
132 |
|
|
|
133 |
20 |
jefflieu |
generate if (ENABLE_SGMII == 0)
|
134 |
|
|
begin
|
135 |
|
|
|
136 |
9 |
jefflieu |
altera_tse_phyip_gxb the_altera_tse_phyip_gxb (
|
137 |
|
|
.phy_mgmt_clk(phy_mgmt_clk), // phy_mgmt_clk.clk
|
138 |
|
|
.phy_mgmt_clk_reset(phy_mgmt_clk_reset), // phy_mgmt_clk_reset.reset
|
139 |
|
|
.phy_mgmt_address(phy_mgmt_address), // phy_mgmt.address
|
140 |
|
|
.phy_mgmt_read(phy_mgmt_read), // .read
|
141 |
|
|
.phy_mgmt_readdata(phy_mgmt_readdata), // .readdata
|
142 |
|
|
.phy_mgmt_waitrequest(phy_mgmt_waitrequest), // .waitrequest
|
143 |
|
|
.phy_mgmt_write(phy_mgmt_write), // .write
|
144 |
|
|
.phy_mgmt_writedata(phy_mgmt_writedata), // .writedata
|
145 |
|
|
.tx_ready(tx_ready), // tx_ready.export
|
146 |
|
|
.rx_ready(rx_ready), // rx_ready.export
|
147 |
|
|
.pll_ref_clk(pll_ref_clk), // pll_ref_clk.clk
|
148 |
|
|
.pll_locked(pll_locked), // pll_locked.export
|
149 |
|
|
.tx_serial_data(tx_serial_data), // tx_serial_data.export
|
150 |
|
|
.rx_serial_data(rx_serial_data), // rx_serial_data.export
|
151 |
|
|
.rx_runningdisp(rx_runningdisp), // rx_runningdisp.export
|
152 |
|
|
.rx_disperr(rx_disperr), // rx_disperr.export
|
153 |
|
|
.rx_errdetect(rx_errdetect), // rx_errdetect.export
|
154 |
|
|
.rx_patterndetect(rx_patterndetect), // rx_patterndetect.export
|
155 |
|
|
.rx_syncstatus(rx_syncstatus), // rx_syncstatus.export
|
156 |
|
|
.tx_clkout(tx_clkout), // tx_clkout.clk
|
157 |
|
|
.tx_parallel_data(tx_parallel_data), // tx_parallel_data.data
|
158 |
|
|
.tx_datak(tx_datak), // tx_datak.data
|
159 |
|
|
.rx_parallel_data(rx_parallel_data), // rx_parallel_data.data
|
160 |
|
|
.rx_datak(rx_datak), // rx_datak.data
|
161 |
|
|
.rx_rlv(rx_rlv),
|
162 |
|
|
.rx_recovered_clk(rx_recovclkout),
|
163 |
|
|
.rx_rmfifodatadeleted(rx_rmfifodatadeleted),
|
164 |
|
|
.rx_rmfifodatainserted(rx_rmfifodatainserted),
|
165 |
|
|
.reconfig_to_xcvr(wire_reconfig_togxb),
|
166 |
|
|
.reconfig_from_xcvr(wire_reconfig_fromgxb)
|
167 |
|
|
);
|
168 |
20 |
jefflieu |
assign rx_clkout = tx_clkout;
|
169 |
9 |
jefflieu |
|
170 |
20 |
jefflieu |
end
|
171 |
|
|
endgenerate
|
172 |
9 |
jefflieu |
|
173 |
20 |
jefflieu |
generate if ((ENABLE_SGMII == 1) && (ENABLE_DET_LATENCY == 0))
|
174 |
|
|
begin
|
175 |
|
|
|
176 |
9 |
jefflieu |
altera_tse_phyip_gxb_wo_rmfifo the_altera_tse_phyip_gxb_wo_rmfifo (
|
177 |
|
|
.phy_mgmt_clk(phy_mgmt_clk), // phy_mgmt_clk.clk
|
178 |
|
|
.phy_mgmt_clk_reset(phy_mgmt_clk_reset), // phy_mgmt_clk_reset.reset
|
179 |
|
|
.phy_mgmt_address(phy_mgmt_address), // phy_mgmt.address
|
180 |
|
|
.phy_mgmt_read(phy_mgmt_read), // .read
|
181 |
|
|
.phy_mgmt_readdata(phy_mgmt_readdata), // .readdata
|
182 |
|
|
.phy_mgmt_waitrequest(phy_mgmt_waitrequest), // .waitrequest
|
183 |
|
|
.phy_mgmt_write(phy_mgmt_write), // .write
|
184 |
|
|
.phy_mgmt_writedata(phy_mgmt_writedata), // .writedata
|
185 |
|
|
.tx_ready(tx_ready), // tx_ready.export
|
186 |
|
|
.rx_ready(rx_ready), // rx_ready.export
|
187 |
|
|
.pll_ref_clk(pll_ref_clk), // pll_ref_clk.clk
|
188 |
|
|
.pll_locked(pll_locked), // pll_locked.export
|
189 |
|
|
.tx_serial_data(tx_serial_data), // tx_serial_data.export
|
190 |
|
|
.rx_serial_data(rx_serial_data), // rx_serial_data.export
|
191 |
|
|
.rx_runningdisp(rx_runningdisp), // rx_runningdisp.export
|
192 |
|
|
.rx_disperr(rx_disperr), // rx_disperr.export
|
193 |
|
|
.rx_errdetect(rx_errdetect), // rx_errdetect.export
|
194 |
|
|
.rx_patterndetect(rx_patterndetect), // rx_patterndetect.export
|
195 |
|
|
.rx_syncstatus(rx_syncstatus), // rx_syncstatus.export
|
196 |
|
|
.tx_clkout(tx_clkout), // tx_clkout.clk
|
197 |
|
|
.rx_clkout(rx_clkout), // rx_clkout.clk
|
198 |
|
|
.tx_parallel_data(tx_parallel_data), // tx_parallel_data.data
|
199 |
|
|
.tx_datak(tx_datak), // tx_datak.data
|
200 |
|
|
.rx_parallel_data(rx_parallel_data), // rx_parallel_data.data
|
201 |
|
|
.rx_datak(rx_datak), // rx_datak.data
|
202 |
|
|
.rx_rlv(rx_rlv),
|
203 |
|
|
.rx_recovered_clk(rx_recovclkout),
|
204 |
|
|
.reconfig_to_xcvr(wire_reconfig_togxb),
|
205 |
|
|
.reconfig_from_xcvr(wire_reconfig_fromgxb)
|
206 |
|
|
);
|
207 |
|
|
|
208 |
|
|
|
209 |
|
|
assign rx_rmfifodatadeleted = 1'b0;
|
210 |
|
|
assign rx_rmfifodatainserted = 1'b0;
|
211 |
|
|
|
212 |
|
|
end
|
213 |
|
|
endgenerate
|
214 |
20 |
jefflieu |
|
215 |
|
|
|
216 |
|
|
|
217 |
|
|
generate if ((ENABLE_SGMII == 1) && (ENABLE_DET_LATENCY == 1))
|
218 |
|
|
begin
|
219 |
|
|
|
220 |
|
|
altera_tse_phyip_det_latency the_altera_tse_phyip_gxb_wo_rmfifo (
|
221 |
|
|
.phy_mgmt_clk(phy_mgmt_clk), // phy_mgmt_clk.clk
|
222 |
|
|
.phy_mgmt_clk_reset(phy_mgmt_clk_reset), // phy_mgmt_clk_reset.reset
|
223 |
|
|
.phy_mgmt_address(phy_mgmt_address), // phy_mgmt.address
|
224 |
|
|
.phy_mgmt_read(phy_mgmt_read), // .read
|
225 |
|
|
.phy_mgmt_readdata(phy_mgmt_readdata), // .readdata
|
226 |
|
|
.phy_mgmt_waitrequest(phy_mgmt_waitrequest), // .waitrequest
|
227 |
|
|
.phy_mgmt_write(phy_mgmt_write), // .write
|
228 |
|
|
.phy_mgmt_writedata(phy_mgmt_writedata), // .writedata
|
229 |
|
|
.tx_ready(tx_ready), // tx_ready.export
|
230 |
|
|
.rx_ready(rx_ready), // rx_ready.export
|
231 |
|
|
.pll_ref_clk(pll_ref_clk), // pll_ref_clk.clk
|
232 |
|
|
.pll_locked(pll_locked), // pll_locked.export
|
233 |
|
|
.tx_serial_data(tx_serial_data), // tx_serial_data.export
|
234 |
|
|
.rx_serial_data(rx_serial_data), // rx_serial_data.export
|
235 |
|
|
.rx_runningdisp(rx_runningdisp), // rx_runningdisp.export
|
236 |
|
|
.rx_disperr(rx_disperr), // rx_disperr.export
|
237 |
|
|
.rx_errdetect(rx_errdetect), // rx_errdetect.export
|
238 |
|
|
.rx_patterndetect(rx_patterndetect), // rx_patterndetect.export
|
239 |
|
|
.rx_syncstatus(rx_syncstatus), // rx_syncstatus.export
|
240 |
|
|
.tx_clkout(tx_clkout), // tx_clkout.clk
|
241 |
|
|
.rx_clkout(rx_clkout), // rx_clkout.clk
|
242 |
|
|
.tx_parallel_data(tx_parallel_data), // tx_parallel_data.data
|
243 |
|
|
.tx_datak(tx_datak), // tx_datak.data
|
244 |
|
|
.rx_parallel_data(rx_parallel_data), // rx_parallel_data.data
|
245 |
|
|
.rx_datak(rx_datak), // rx_datak.data
|
246 |
|
|
.rx_rlv(rx_rlv),
|
247 |
|
|
.reconfig_to_xcvr(wire_reconfig_togxb),
|
248 |
|
|
.reconfig_from_xcvr(wire_reconfig_fromgxb),
|
249 |
|
|
.rx_bitslipboundaryselectout()
|
250 |
|
|
//.rx_recovered_clk(rx_recovclkout),
|
251 |
|
|
);
|
252 |
9 |
jefflieu |
|
253 |
20 |
jefflieu |
|
254 |
|
|
assign rx_rmfifodatadeleted = 1'b0;
|
255 |
|
|
assign rx_rmfifodatainserted = 1'b0;
|
256 |
|
|
assign rx_recovclkout = rx_clkout; // work around since this port is not available in Deterministic Latency PHY IP
|
257 |
|
|
|
258 |
|
|
end
|
259 |
|
|
endgenerate
|
260 |
|
|
|
261 |
9 |
jefflieu |
endmodule
|