1 |
9 |
jefflieu |
// -------------------------------------------------------------------------
|
2 |
|
|
// -------------------------------------------------------------------------
|
3 |
|
|
//
|
4 |
|
|
// Revision Control Information
|
5 |
|
|
//
|
6 |
|
|
// $RCSfile: altera_tse_mac_pcs_pma_gige.v,v $
|
7 |
|
|
// $Source: /ipbu/cvs/sio/projects/TriSpeedEthernet/src/RTL/Top_level_modules/altera_tse_mac_pcs_pma_gige_phyip.v,v $
|
8 |
|
|
//
|
9 |
|
|
// $Revision: #17 $
|
10 |
|
|
// $Date: 2010/10/07 $
|
11 |
|
|
// Check in by : $Author: aishak $
|
12 |
|
|
// Author : Arul Paniandi
|
13 |
|
|
//
|
14 |
|
|
// Project : Triple Speed Ethernet
|
15 |
|
|
//
|
16 |
|
|
// Description :
|
17 |
|
|
//
|
18 |
|
|
// Top level MAC + PCS + PMA module for Triple Speed Ethernet MAC + PCS + PMA
|
19 |
|
|
|
20 |
|
|
//
|
21 |
|
|
// ALTERA Confidential and Proprietary
|
22 |
|
|
// Copyright 2006 (c) Altera Corporation
|
23 |
|
|
// All rights reserved
|
24 |
|
|
//
|
25 |
|
|
// -------------------------------------------------------------------------
|
26 |
|
|
// -------------------------------------------------------------------------
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
//Legal Notice: (C)2007 Altera Corporation. All rights reserved. Your
|
30 |
|
|
//use of Altera Corporation's design tools, logic functions and other
|
31 |
|
|
//software and tools, and its AMPP partner logic functions, and any
|
32 |
|
|
//output files any of the foregoing (including device programming or
|
33 |
|
|
//simulation files), and any associated documentation or information are
|
34 |
|
|
//expressly subject to the terms and conditions of the Altera Program
|
35 |
|
|
//License Subscription Agreement or other applicable license agreement,
|
36 |
|
|
//including, without limitation, that your use is for the sole purpose
|
37 |
|
|
//of programming logic devices manufactured by Altera and sold by Altera
|
38 |
|
|
//or its authorized distributors. Please refer to the applicable
|
39 |
|
|
//agreement for further details.
|
40 |
|
|
|
41 |
|
|
(*altera_attribute = {"-name SYNCHRONIZER_IDENTIFICATION OFF" } *)
|
42 |
|
|
module altera_tse_mac_pcs_pma_gige_phyip /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"R102,R105,D102,D101,D103\"" */(
|
43 |
|
|
// inputs:
|
44 |
|
|
address,
|
45 |
|
|
clk,
|
46 |
|
|
ff_rx_clk,
|
47 |
|
|
ff_rx_rdy,
|
48 |
|
|
ff_tx_clk,
|
49 |
|
|
ff_tx_crc_fwd,
|
50 |
|
|
ff_tx_data,
|
51 |
|
|
ff_tx_mod,
|
52 |
|
|
ff_tx_eop,
|
53 |
|
|
ff_tx_err,
|
54 |
|
|
ff_tx_sop,
|
55 |
|
|
ff_tx_wren,
|
56 |
|
|
magic_sleep_n,
|
57 |
|
|
mdio_in,
|
58 |
|
|
read,
|
59 |
|
|
reconfig_togxb,
|
60 |
|
|
ref_clk,
|
61 |
|
|
reset,
|
62 |
|
|
rxp,
|
63 |
|
|
write,
|
64 |
|
|
writedata,
|
65 |
|
|
xoff_gen,
|
66 |
|
|
xon_gen,
|
67 |
|
|
|
68 |
|
|
// outputs:
|
69 |
|
|
ff_rx_a_empty,
|
70 |
|
|
ff_rx_a_full,
|
71 |
|
|
ff_rx_data,
|
72 |
|
|
ff_rx_mod,
|
73 |
|
|
ff_rx_dsav,
|
74 |
|
|
ff_rx_dval,
|
75 |
|
|
ff_rx_eop,
|
76 |
|
|
ff_rx_sop,
|
77 |
|
|
ff_tx_a_empty,
|
78 |
|
|
ff_tx_a_full,
|
79 |
|
|
ff_tx_rdy,
|
80 |
|
|
ff_tx_septy,
|
81 |
|
|
led_an,
|
82 |
|
|
led_char_err,
|
83 |
|
|
led_col,
|
84 |
|
|
led_crs,
|
85 |
|
|
led_disp_err,
|
86 |
|
|
led_link,
|
87 |
|
|
magic_wakeup,
|
88 |
|
|
mdc,
|
89 |
|
|
mdio_oen,
|
90 |
|
|
mdio_out,
|
91 |
|
|
readdata,
|
92 |
|
|
reconfig_fromgxb,
|
93 |
|
|
rx_err,
|
94 |
|
|
rx_err_stat,
|
95 |
|
|
rx_frm_type,
|
96 |
|
|
tx_ff_uflow,
|
97 |
|
|
txp,
|
98 |
|
|
rx_recovclkout,
|
99 |
|
|
waitrequest,
|
100 |
|
|
|
101 |
|
|
// phy_mgmt_interface
|
102 |
|
|
phy_mgmt_address,
|
103 |
|
|
phy_mgmt_read,
|
104 |
|
|
phy_mgmt_readdata,
|
105 |
|
|
phy_mgmt_waitrequest,
|
106 |
|
|
phy_mgmt_write,
|
107 |
|
|
phy_mgmt_writedata
|
108 |
|
|
);
|
109 |
|
|
|
110 |
|
|
// Parameters to configure the core for different variations
|
111 |
|
|
// ---------------------------------------------------------
|
112 |
|
|
|
113 |
|
|
parameter ENABLE_ENA = 8; // Enable n-Bit Local Interface
|
114 |
|
|
parameter ENABLE_GMII_LOOPBACK = 1; // GMII_LOOPBACK_ENA : Enable GMII Loopback Logic
|
115 |
|
|
parameter ENABLE_HD_LOGIC = 1; // HD_LOGIC_ENA : Enable Half Duplex Logic
|
116 |
|
|
parameter USE_SYNC_RESET = 1; // Use Synchronized Reset Inputs
|
117 |
|
|
parameter ENABLE_SUP_ADDR = 1; // SUP_ADDR_ENA : Enable Supplemental Addresses
|
118 |
|
|
parameter ENA_HASH = 1; // ENA_HASH Enable Hask Table
|
119 |
|
|
parameter STAT_CNT_ENA = 1; // STAT_CNT_ENA Enable Statistic Counters
|
120 |
|
|
parameter ENABLE_EXTENDED_STAT_REG = 0; // Enable a few extended statistic registers
|
121 |
|
|
parameter EG_FIFO = 256 ; // Egress FIFO Depth
|
122 |
|
|
parameter EG_ADDR = 8 ; // Egress FIFO Depth
|
123 |
|
|
parameter ING_FIFO = 256 ; // Ingress FIFO Depth
|
124 |
|
|
parameter ING_ADDR = 8 ; // Egress FIFO Depth
|
125 |
|
|
parameter RESET_LEVEL = 1'b 1 ; // Reset Active Level
|
126 |
|
|
parameter MDIO_CLK_DIV = 40 ; // Host Clock Division - MDC Generation
|
127 |
|
|
parameter CORE_VERSION = 16'h3; // MorethanIP Core Version
|
128 |
|
|
parameter CUST_VERSION = 1 ; // Customer Core Version
|
129 |
|
|
parameter REDUCED_INTERFACE_ENA = 1; // Enable the RGMII / MII Interface
|
130 |
|
|
parameter ENABLE_MDIO = 1; // Enable the MDIO Interface
|
131 |
|
|
parameter ENABLE_MAGIC_DETECT = 1; // Enable magic packet detection
|
132 |
|
|
parameter ENABLE_MACLITE = 0; // Enable MAC LITE operation
|
133 |
|
|
parameter MACLITE_GIGE = 0; // Enable/Disable Gigabit MAC operation for MAC LITE.
|
134 |
|
|
parameter CRC32DWIDTH = 4'b 1000; // input data width (informal, not for change)
|
135 |
|
|
parameter CRC32GENDELAY = 3'b 110; // when the data from the generator is valid
|
136 |
|
|
parameter CRC32CHECK16BIT = 1'b 0; // 1 compare two times 16 bit of the CRC (adds one pipeline step)
|
137 |
|
|
parameter CRC32S1L2_EXTERN = 1'b0; // false: merge enable
|
138 |
|
|
parameter ENABLE_SHIFT16 = 0; // Enable byte stuffing at packet header
|
139 |
|
|
parameter RAM_TYPE = "AUTO"; // Specify the RAM type
|
140 |
|
|
parameter INSERT_TA = 0; // Option to insert timing adapter for SOPC systems
|
141 |
|
|
parameter PHY_IDENTIFIER = 32'h 00000000;// PHY Identifier
|
142 |
|
|
parameter DEV_VERSION = 16'h 0001 ; // Customer Phy's Core Version
|
143 |
|
|
parameter ENABLE_SGMII = 1; // Enable SGMII logic for synthesis
|
144 |
|
|
parameter ENABLE_MAC_FLOW_CTRL = 1'b1; // Option to enable flow control
|
145 |
|
|
parameter ENABLE_MAC_TXADDR_SET = 1'b1; // Option to enable MAC address insertion onto 'to-be-transmitted' Ethernet frames on MAC TX data path
|
146 |
|
|
parameter ENABLE_MAC_RX_VLAN = 1'b1; // Option to enable VLAN tagged Ethernet frames on MAC RX data path
|
147 |
|
|
parameter ENABLE_MAC_TX_VLAN = 1'b1; // Option to enable VLAN tagged Ethernet frames on MAC TX data path
|
148 |
|
|
parameter EXPORT_PWRDN = 1'b0; // Option to export the Alt2gxb powerdown signal
|
149 |
|
|
parameter DEVICE_FAMILY = "ARRIAGX"; // The device family the the core is targetted for.
|
150 |
|
|
parameter TRANSCEIVER_OPTION = 1'b0; // Option to select transceiver block for MAC PCS PMA Instantiation. Valid Values are 0 and 1: 0 - GXB (GIGE Mode) 1 - LVDS I/O
|
151 |
|
|
parameter ENABLE_ALT_RECONFIG = 0; // Option to have the Alt_Reconfig ports exposed
|
152 |
|
|
parameter STARTING_CHANNEL_NUMBER = 0; // Starting Channel Number for Reconfig block
|
153 |
|
|
parameter SYNCHRONIZER_DEPTH = 3; // Number of synchronizer
|
154 |
|
|
|
155 |
|
|
output ff_rx_a_empty;
|
156 |
|
|
output ff_rx_a_full;
|
157 |
|
|
output [ENABLE_ENA-1:0] ff_rx_data;
|
158 |
|
|
output [1:0] ff_rx_mod;
|
159 |
|
|
output ff_rx_dsav;
|
160 |
|
|
output ff_rx_dval;
|
161 |
|
|
output ff_rx_eop;
|
162 |
|
|
output ff_rx_sop;
|
163 |
|
|
output ff_tx_a_empty;
|
164 |
|
|
output ff_tx_a_full;
|
165 |
|
|
output ff_tx_rdy;
|
166 |
|
|
output ff_tx_septy;
|
167 |
|
|
output led_an;
|
168 |
|
|
output led_char_err;
|
169 |
|
|
output led_col;
|
170 |
|
|
output led_crs;
|
171 |
|
|
output led_disp_err;
|
172 |
|
|
output led_link;
|
173 |
|
|
output magic_wakeup;
|
174 |
|
|
output mdc;
|
175 |
|
|
output mdio_oen;
|
176 |
|
|
output mdio_out;
|
177 |
|
|
output [31: 0] readdata;
|
178 |
|
|
output [91:0] reconfig_fromgxb;
|
179 |
|
|
output [5: 0] rx_err;
|
180 |
|
|
output [17: 0] rx_err_stat;
|
181 |
|
|
output [3: 0] rx_frm_type;
|
182 |
|
|
output tx_ff_uflow;
|
183 |
|
|
output txp;
|
184 |
|
|
output rx_recovclkout;
|
185 |
|
|
output waitrequest;
|
186 |
|
|
|
187 |
|
|
input [7: 0] address;
|
188 |
|
|
input clk;
|
189 |
|
|
input ff_rx_clk;
|
190 |
|
|
input ff_rx_rdy;
|
191 |
|
|
input ff_tx_clk;
|
192 |
|
|
input ff_tx_crc_fwd;
|
193 |
|
|
input [ENABLE_ENA-1:0] ff_tx_data;
|
194 |
|
|
input [1:0] ff_tx_mod;
|
195 |
|
|
input ff_tx_eop;
|
196 |
|
|
input ff_tx_err;
|
197 |
|
|
input ff_tx_sop;
|
198 |
|
|
input ff_tx_wren;
|
199 |
|
|
input magic_sleep_n;
|
200 |
|
|
input mdio_in;
|
201 |
|
|
input read;
|
202 |
|
|
input [139:0] reconfig_togxb;
|
203 |
|
|
input ref_clk;
|
204 |
|
|
input reset;
|
205 |
|
|
input rxp;
|
206 |
|
|
input write;
|
207 |
|
|
input [31:0] writedata;
|
208 |
|
|
input xoff_gen;
|
209 |
|
|
input xon_gen;
|
210 |
|
|
|
211 |
|
|
input [8:0] phy_mgmt_address;
|
212 |
|
|
input phy_mgmt_read;
|
213 |
|
|
output [31:0] phy_mgmt_readdata;
|
214 |
|
|
output phy_mgmt_waitrequest;
|
215 |
|
|
input phy_mgmt_write;
|
216 |
|
|
input [31:0]phy_mgmt_writedata;
|
217 |
|
|
|
218 |
|
|
wire MAC_PCS_reset;
|
219 |
|
|
wire ff_rx_a_empty;
|
220 |
|
|
wire ff_rx_a_full;
|
221 |
|
|
wire [ENABLE_ENA-1:0] ff_rx_data;
|
222 |
|
|
wire [1:0] ff_rx_mod;
|
223 |
|
|
wire ff_rx_dsav;
|
224 |
|
|
wire ff_rx_dval;
|
225 |
|
|
wire ff_rx_eop;
|
226 |
|
|
wire ff_rx_sop;
|
227 |
|
|
wire ff_tx_a_empty;
|
228 |
|
|
wire ff_tx_a_full;
|
229 |
|
|
wire ff_tx_rdy;
|
230 |
|
|
wire ff_tx_septy;
|
231 |
|
|
wire gige_pma_reset;
|
232 |
|
|
wire led_an;
|
233 |
|
|
wire led_char_err;
|
234 |
|
|
wire led_char_err_gx;
|
235 |
|
|
wire led_col;
|
236 |
|
|
wire led_crs;
|
237 |
|
|
wire led_disp_err;
|
238 |
|
|
wire led_link;
|
239 |
|
|
wire link_status;
|
240 |
|
|
wire magic_wakeup;
|
241 |
|
|
wire mdc;
|
242 |
|
|
wire mdio_oen;
|
243 |
|
|
wire mdio_out;
|
244 |
|
|
wire rx_pcs_clk;
|
245 |
|
|
wire tx_pcs_clk;
|
246 |
|
|
wire [7:0] pcs_rx_frame;
|
247 |
|
|
wire pcs_rx_kchar;
|
248 |
|
|
wire pcs_pwrdn_out_sig;
|
249 |
|
|
wire gxb_pwrdn_in_sig;
|
250 |
|
|
wire gxb_cal_blk_clk_sig;
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
wire [31:0] readdata;
|
254 |
|
|
wire rx_char_err_gx;
|
255 |
|
|
wire rx_disp_err;
|
256 |
|
|
wire [5:0] rx_err;
|
257 |
|
|
wire [17:0] rx_err_stat;
|
258 |
|
|
wire [3:0] rx_frm_type;
|
259 |
|
|
wire [7:0] rx_frame;
|
260 |
|
|
wire rx_syncstatus;
|
261 |
|
|
wire rx_kchar;
|
262 |
|
|
wire sd_loopback;
|
263 |
|
|
wire tx_ff_uflow;
|
264 |
|
|
wire [7:0] tx_frame;
|
265 |
|
|
wire tx_kchar;
|
266 |
|
|
wire txp;
|
267 |
|
|
wire rx_recovclkout;
|
268 |
|
|
wire waitrequest;
|
269 |
|
|
|
270 |
|
|
wire rx_runlengthviolation;
|
271 |
|
|
wire rx_patterndetect;
|
272 |
|
|
wire rx_runningdisp;
|
273 |
|
|
wire rx_rmfifodatadeleted;
|
274 |
|
|
wire rx_rmfifodatainserted;
|
275 |
|
|
wire pcs_rx_carrierdetected;
|
276 |
|
|
wire pcs_rx_rmfifodatadeleted;
|
277 |
|
|
wire pcs_rx_rmfifodatainserted;
|
278 |
|
|
|
279 |
|
|
wire [91:0] reconfig_fromgxb;
|
280 |
|
|
|
281 |
|
|
wire reset_ref_clk;
|
282 |
|
|
wire reset_rx_pcs_clk_int;
|
283 |
|
|
|
284 |
|
|
|
285 |
|
|
// Assign the character error and link status to top level leds
|
286 |
|
|
// ------------------------------------------------------------
|
287 |
|
|
assign led_char_err = led_char_err_gx;
|
288 |
|
|
assign led_link = link_status;
|
289 |
|
|
|
290 |
|
|
|
291 |
|
|
|
292 |
|
|
// Instantiation of the MAC_PCS core that connects to a PMA
|
293 |
|
|
// --------------------------------------------------------
|
294 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena altera_tse_mac_pcs_pma_strx_gx_ena_inst
|
295 |
|
|
(
|
296 |
|
|
|
297 |
|
|
.rx_carrierdetected(pcs_rx_carrierdetected),
|
298 |
|
|
.rx_rmfifodatadeleted(pcs_rx_rmfifodatadeleted),
|
299 |
|
|
.rx_rmfifodatainserted(pcs_rx_rmfifodatainserted),
|
300 |
|
|
|
301 |
|
|
.address (address),
|
302 |
|
|
.clk (clk),
|
303 |
|
|
.ff_rx_a_empty (ff_rx_a_empty),
|
304 |
|
|
.ff_rx_a_full (ff_rx_a_full),
|
305 |
|
|
.ff_rx_clk (ff_rx_clk),
|
306 |
|
|
.ff_rx_data (ff_rx_data),
|
307 |
|
|
.ff_rx_mod (ff_rx_mod),
|
308 |
|
|
.ff_rx_dsav (ff_rx_dsav),
|
309 |
|
|
.ff_rx_dval (ff_rx_dval),
|
310 |
|
|
.ff_rx_eop (ff_rx_eop),
|
311 |
|
|
.ff_rx_rdy (ff_rx_rdy),
|
312 |
|
|
.ff_rx_sop (ff_rx_sop),
|
313 |
|
|
.ff_tx_a_empty (ff_tx_a_empty),
|
314 |
|
|
.ff_tx_a_full (ff_tx_a_full),
|
315 |
|
|
.ff_tx_clk (ff_tx_clk),
|
316 |
|
|
.ff_tx_crc_fwd (ff_tx_crc_fwd),
|
317 |
|
|
.ff_tx_data (ff_tx_data),
|
318 |
|
|
.ff_tx_mod (ff_tx_mod),
|
319 |
|
|
.ff_tx_eop (ff_tx_eop),
|
320 |
|
|
.ff_tx_err (ff_tx_err),
|
321 |
|
|
.ff_tx_rdy (ff_tx_rdy),
|
322 |
|
|
.ff_tx_septy (ff_tx_septy),
|
323 |
|
|
.ff_tx_sop (ff_tx_sop),
|
324 |
|
|
.ff_tx_wren (ff_tx_wren),
|
325 |
|
|
.led_an (led_an),
|
326 |
|
|
.led_char_err (led_char_err_gx),
|
327 |
|
|
.led_col (led_col),
|
328 |
|
|
.led_crs (led_crs),
|
329 |
|
|
.led_link (link_status),
|
330 |
|
|
.magic_sleep_n (magic_sleep_n),
|
331 |
|
|
.magic_wakeup (magic_wakeup),
|
332 |
|
|
.mdc (mdc),
|
333 |
|
|
.mdio_in (mdio_in),
|
334 |
|
|
.mdio_oen (mdio_oen),
|
335 |
|
|
.mdio_out (mdio_out),
|
336 |
|
|
.powerdown (pcs_pwrdn_out_sig),
|
337 |
|
|
.read (read),
|
338 |
|
|
.readdata (readdata),
|
339 |
|
|
.reset (reset),
|
340 |
|
|
.rx_clkout (rx_pcs_clk),
|
341 |
|
|
.rx_err (rx_err),
|
342 |
|
|
.rx_err_stat (rx_err_stat),
|
343 |
|
|
.rx_frame (pcs_rx_frame),
|
344 |
|
|
.rx_frm_type (rx_frm_type),
|
345 |
|
|
.rx_kchar (pcs_rx_kchar),
|
346 |
|
|
.sd_loopback (sd_loopback),
|
347 |
|
|
.tx_clkout (tx_pcs_clk),
|
348 |
|
|
.tx_ff_uflow (tx_ff_uflow),
|
349 |
|
|
.tx_frame (tx_frame),
|
350 |
|
|
.tx_kchar (tx_kchar),
|
351 |
|
|
.waitrequest (waitrequest),
|
352 |
|
|
.write (write),
|
353 |
|
|
.writedata (writedata),
|
354 |
|
|
.xoff_gen (xoff_gen),
|
355 |
|
|
.xon_gen (xon_gen)
|
356 |
|
|
);
|
357 |
|
|
|
358 |
|
|
defparam
|
359 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_ENA = ENABLE_ENA,
|
360 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_HD_LOGIC = ENABLE_HD_LOGIC,
|
361 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_GMII_LOOPBACK = ENABLE_GMII_LOOPBACK,
|
362 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.USE_SYNC_RESET = USE_SYNC_RESET,
|
363 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_SUP_ADDR = ENABLE_SUP_ADDR,
|
364 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENA_HASH = ENA_HASH,
|
365 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.STAT_CNT_ENA = STAT_CNT_ENA,
|
366 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_EXTENDED_STAT_REG = ENABLE_EXTENDED_STAT_REG,
|
367 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.EG_FIFO = EG_FIFO,
|
368 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.EG_ADDR = EG_ADDR,
|
369 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ING_FIFO = ING_FIFO,
|
370 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ING_ADDR = ING_ADDR,
|
371 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.RESET_LEVEL = RESET_LEVEL,
|
372 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.MDIO_CLK_DIV = MDIO_CLK_DIV,
|
373 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.CORE_VERSION = CORE_VERSION,
|
374 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.CUST_VERSION = CUST_VERSION,
|
375 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.REDUCED_INTERFACE_ENA = REDUCED_INTERFACE_ENA,
|
376 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MDIO = ENABLE_MDIO,
|
377 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MAGIC_DETECT = ENABLE_MAGIC_DETECT,
|
378 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MACLITE = ENABLE_MACLITE,
|
379 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.MACLITE_GIGE = MACLITE_GIGE,
|
380 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.CRC32S1L2_EXTERN = CRC32S1L2_EXTERN,
|
381 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.CRC32DWIDTH = CRC32DWIDTH,
|
382 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.CRC32CHECK16BIT = CRC32CHECK16BIT,
|
383 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.CRC32GENDELAY = CRC32GENDELAY,
|
384 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_SHIFT16 = ENABLE_SHIFT16,
|
385 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.INSERT_TA = INSERT_TA,
|
386 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.RAM_TYPE = RAM_TYPE,
|
387 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.PHY_IDENTIFIER = PHY_IDENTIFIER,
|
388 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.DEV_VERSION = DEV_VERSION,
|
389 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_SGMII = ENABLE_SGMII,
|
390 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MAC_FLOW_CTRL = ENABLE_MAC_FLOW_CTRL,
|
391 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MAC_TXADDR_SET = ENABLE_MAC_TXADDR_SET,
|
392 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MAC_RX_VLAN = ENABLE_MAC_RX_VLAN,
|
393 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.SYNCHRONIZER_DEPTH = SYNCHRONIZER_DEPTH,
|
394 |
|
|
altera_tse_mac_pcs_pma_strx_gx_ena_inst.ENABLE_MAC_TX_VLAN = ENABLE_MAC_TX_VLAN;
|
395 |
|
|
|
396 |
|
|
|
397 |
|
|
|
398 |
|
|
// Instantiation of the Alt2gxb block as the PMA for Stratix_II_GX and ArriaGX devices
|
399 |
|
|
// -----------------------------------------------------------------------------------
|
400 |
|
|
|
401 |
|
|
altera_tse_reset_synchronizer ch_0_reset_sync_0 (
|
402 |
|
|
.clk(rx_pcs_clk),
|
403 |
|
|
.reset_in(reset),
|
404 |
|
|
.reset_out(reset_rx_pcs_clk_int)
|
405 |
|
|
);
|
406 |
|
|
|
407 |
|
|
// Aligned Rx_sync from gxb
|
408 |
|
|
// -------------------------------
|
409 |
|
|
altera_tse_gxb_aligned_rxsync the_altera_tse_gxb_aligned_rxsync
|
410 |
|
|
(
|
411 |
|
|
.clk(rx_pcs_clk),
|
412 |
|
|
.reset(reset_rx_pcs_clk_int),
|
413 |
|
|
//input (from alt2gxb)
|
414 |
|
|
.alt_dataout(rx_frame),
|
415 |
|
|
.alt_sync(rx_syncstatus),
|
416 |
|
|
.alt_disperr(rx_disp_err),
|
417 |
|
|
.alt_ctrldetect(rx_kchar),
|
418 |
|
|
.alt_errdetect(rx_char_err_gx),
|
419 |
|
|
.alt_rmfifodatadeleted(rx_rmfifodatadeleted),
|
420 |
|
|
.alt_rmfifodatainserted(rx_rmfifodatainserted),
|
421 |
|
|
.alt_runlengthviolation(rx_runlengthviolation),
|
422 |
|
|
.alt_patterndetect(rx_patterndetect),
|
423 |
|
|
.alt_runningdisp(rx_runningdisp),
|
424 |
|
|
|
425 |
|
|
//output (to PCS)
|
426 |
|
|
.altpcs_dataout(pcs_rx_frame),
|
427 |
|
|
.altpcs_sync(link_status),
|
428 |
|
|
.altpcs_disperr(led_disp_err),
|
429 |
|
|
.altpcs_ctrldetect(pcs_rx_kchar),
|
430 |
|
|
.altpcs_errdetect(led_char_err_gx),
|
431 |
|
|
.altpcs_rmfifodatadeleted(pcs_rx_rmfifodatadeleted),
|
432 |
|
|
.altpcs_rmfifodatainserted(pcs_rx_rmfifodatainserted),
|
433 |
|
|
.altpcs_carrierdetect(pcs_rx_carrierdetected)
|
434 |
|
|
) ;
|
435 |
|
|
defparam
|
436 |
|
|
the_altera_tse_gxb_aligned_rxsync.DEVICE_FAMILY = DEVICE_FAMILY;
|
437 |
|
|
|
438 |
|
|
|
439 |
|
|
// Custom PhyIP
|
440 |
|
|
// ------------------------------------------
|
441 |
|
|
altera_tse_gxb_gige_phyip_inst the_altera_tse_gxb_gige_phyip_inst(
|
442 |
|
|
.phy_mgmt_clk(clk), // phy_mgmt_clk.clk
|
443 |
|
|
.phy_mgmt_clk_reset(reset), // phy_mgmt_clk_reset.reset
|
444 |
|
|
.phy_mgmt_address(phy_mgmt_address), // phy_mgmt.address
|
445 |
|
|
.phy_mgmt_read(phy_mgmt_read), // .read
|
446 |
|
|
.phy_mgmt_readdata(phy_mgmt_readdata), // .readdata
|
447 |
|
|
.phy_mgmt_waitrequest(phy_mgmt_waitrequest), // .waitrequest
|
448 |
|
|
.phy_mgmt_write(phy_mgmt_write), // .write
|
449 |
|
|
.phy_mgmt_writedata(phy_mgmt_writedata), // .writedata
|
450 |
|
|
.tx_ready(), // tx_ready.export
|
451 |
|
|
.rx_ready(), // rx_ready.export
|
452 |
|
|
.pll_ref_clk(ref_clk), // pll_ref_clk.clk
|
453 |
|
|
.pll_locked(), // pll_locked.export
|
454 |
|
|
.tx_serial_data(txp), // tx_serial_data.export
|
455 |
|
|
.rx_serial_data(rxp), // rx_serial_data.export
|
456 |
|
|
.rx_runningdisp(rx_runningdisp), // rx_runningdisp.export
|
457 |
|
|
.rx_disperr(rx_disp_err), // rx_disperr.export
|
458 |
|
|
.rx_errdetect(rx_char_err_gx), // rx_errdetect.export
|
459 |
|
|
.rx_patterndetect(rx_patterndetect), // rx_patterndetect.export
|
460 |
|
|
.rx_syncstatus(rx_syncstatus), // rx_syncstatus.export
|
461 |
|
|
.tx_clkout(tx_pcs_clk), // tx_clkout0.clk
|
462 |
|
|
.rx_clkout(rx_pcs_clk), // rx_clkout0.clk
|
463 |
|
|
.tx_parallel_data(tx_frame), // tx_parallel_data0.data
|
464 |
|
|
.tx_datak(tx_kchar), // tx_datak0.data
|
465 |
|
|
.rx_parallel_data(rx_frame), // rx_parallel_data0.data
|
466 |
|
|
.rx_datak(rx_kchar), // rx_datak0.data
|
467 |
|
|
.rx_rlv(rx_runlengthviolation),
|
468 |
|
|
.rx_recovclkout(rx_recovclkout),
|
469 |
|
|
.rx_rmfifodatadeleted(rx_rmfifodatadeleted),
|
470 |
|
|
.rx_rmfifodatainserted(rx_rmfifodatainserted),
|
471 |
|
|
.reconfig_togxb(reconfig_togxb),
|
472 |
|
|
.reconfig_fromgxb(reconfig_fromgxb)
|
473 |
|
|
);
|
474 |
|
|
defparam
|
475 |
|
|
the_altera_tse_gxb_gige_phyip_inst.ENABLE_ALT_RECONFIG = ENABLE_ALT_RECONFIG,
|
476 |
|
|
the_altera_tse_gxb_gige_phyip_inst.DEVICE_FAMILY = DEVICE_FAMILY,
|
477 |
|
|
the_altera_tse_gxb_gige_phyip_inst.ENABLE_SGMII = ENABLE_SGMII;
|
478 |
|
|
|
479 |
|
|
endmodule
|
480 |
|
|
|