1 |
2 |
tsahidanie |
//-----------------------------------------------------------------------------
|
2 |
|
|
// Title : Rxaui top
|
3 |
|
|
// Project : SIP
|
4 |
|
|
//-----------------------------------------------------------------------------
|
5 |
|
|
// File : sip_rxaui_top.v
|
6 |
|
|
// Author : Lior Valency
|
7 |
|
|
// Created : 17/02/2008
|
8 |
|
|
// Last modified : 17/02/2008
|
9 |
|
|
//-----------------------------------------------------------------------------
|
10 |
|
|
// Description : This block implement rxaui.
|
11 |
|
|
// The purpose of this block is interleave 2 lanes to one serdes,
|
12 |
|
|
// this block work in 2 clock dominas.
|
13 |
|
|
//-----------------------------------------------------------------------------
|
14 |
|
|
// Copyright (c) 2007 Marvell International Ltd.
|
15 |
|
|
//
|
16 |
|
|
// THIS CODE CONTAINS CONFIDENTIAL INFORMATION OF MARVELL SEMICONDUCTOR, INC.
|
17 |
|
|
// NO RIGHTS ARE GRANTED HEREIN UNDER ANY PATENT, MASK WORK RIGHT OR COPYRIGHT
|
18 |
|
|
// OF MARVELL OR ANY THIRD PARTY. MARVELL RESERVES THE RIGHT AT ITS SOLE
|
19 |
|
|
// DISCRETION TO REQUEST THAT THIS CODE BE IMMEDIATELY RETURNED TO MARVELL.
|
20 |
|
|
// THIS CODE IS PROVIDED "AS IS". MARVELL MAKES NO WARRANTIES, EXPRESS,
|
21 |
|
|
// IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE.
|
22 |
|
|
//
|
23 |
|
|
//------------------------------------------------------------------------------
|
24 |
|
|
// Modification history :
|
25 |
|
|
// 12/12/2007 : created
|
26 |
|
|
//-----------------------------------------------------------------------------
|
27 |
|
|
`timescale 10ps / 10ps
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
module sip_rxaui_top(/*AUTOARG*/
|
31 |
|
|
// Outputs
|
32 |
|
|
txclk_out, rxaui_tx_data, lock, rxdata_serdes0, rxdata_serdes1,
|
33 |
|
|
rx_clk0, rx_clk1, rxaui_status,
|
34 |
|
|
// Inputs
|
35 |
|
|
reset_in_, media_interface_mode, scan_mode_, serdes_mode,
|
36 |
|
|
txclk_in0, txclk_in1, txdata_serdes0, txdata_serdes1, s_tx_clk,
|
37 |
|
|
lane0_sync_ok, lane1_sync_ok, rxaui_rx_data, s_sigdet, s_rx_clk
|
38 |
|
|
);
|
39 |
|
|
|
40 |
|
|
`include "sip_rxaui_params.inc"
|
41 |
|
|
|
42 |
|
|
/* AUTO_CONSTANT (1'b0 or 1'b1 or 10'd0)*/
|
43 |
|
|
|
44 |
|
|
///////////////
|
45 |
|
|
// INTERFACE //
|
46 |
|
|
///////////////
|
47 |
|
|
|
48 |
|
|
// General
|
49 |
|
|
input reset_in_;
|
50 |
|
|
input media_interface_mode;
|
51 |
|
|
input scan_mode_;
|
52 |
|
|
input serdes_mode;
|
53 |
|
|
|
54 |
|
|
// Tx Interface
|
55 |
|
|
// XPCS
|
56 |
|
|
input txclk_in0;
|
57 |
|
|
input txclk_in1;
|
58 |
|
|
input [19:0] txdata_serdes0;
|
59 |
|
|
input [19:0] txdata_serdes1;
|
60 |
|
|
output txclk_out;
|
61 |
|
|
|
62 |
|
|
// Serdes
|
63 |
|
|
input s_tx_clk;
|
64 |
|
|
output [19:0] rxaui_tx_data;
|
65 |
|
|
|
66 |
|
|
// Rx Interface
|
67 |
|
|
// XPCS
|
68 |
|
|
input lane0_sync_ok;
|
69 |
|
|
input lane1_sync_ok;
|
70 |
|
|
output lock;
|
71 |
|
|
output [19:0] rxdata_serdes0;
|
72 |
|
|
output [19:0] rxdata_serdes1;
|
73 |
|
|
output rx_clk0;
|
74 |
|
|
output rx_clk1;
|
75 |
|
|
|
76 |
|
|
// Serdes
|
77 |
|
|
input [19:0] rxaui_rx_data;
|
78 |
|
|
input s_sigdet;
|
79 |
|
|
input s_rx_clk;
|
80 |
|
|
|
81 |
|
|
// Status
|
82 |
|
|
output [8:0] rxaui_status;
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
/*AUTOOUTPUT*/
|
86 |
|
|
// Beginning of automatic outputs (from unused autoinst outputs)
|
87 |
|
|
// End of automatics
|
88 |
|
|
/*AUTOINPUT*/
|
89 |
|
|
// Beginning of automatic inputs (from unused autoinst inputs)
|
90 |
|
|
// End of automatics
|
91 |
|
|
/*AUTOWIRE*/
|
92 |
|
|
// Beginning of automatic wires (for undeclared instantiated-module outputs)
|
93 |
|
|
// End of automatics
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
////////////////////
|
98 |
|
|
// INTERNAL WIRES //
|
99 |
|
|
////////////////////
|
100 |
|
|
wire serdes_rx_clk_div2;
|
101 |
|
|
wire serdes_rx_clk_div2_reset_;
|
102 |
|
|
wire serdes_rx_clk_reset_;
|
103 |
|
|
wire serdes_tx_clk_reset_;
|
104 |
|
|
wire serdes_txclk_in0_reset_;
|
105 |
|
|
wire serdes_txclk_in1_reset_;
|
106 |
|
|
|
107 |
|
|
/*sip_rxaui_rx_top AUTO_TEMPLATE(
|
108 |
|
|
.serdes_rx_clk_reset({~serdes_rx_clk_reset_}),
|
109 |
|
|
.serdes_rx_data (rxaui_rx_data[SERDES_DATA_W-1:0]),
|
110 |
|
|
.serdes_rx_clk (s_rx_clk),
|
111 |
|
|
)*/
|
112 |
|
|
sip_rxaui_rx_top
|
113 |
|
|
sip_rxaui_rx_top(/*AUTOINST*/
|
114 |
|
|
// Outputs
|
115 |
|
|
.lock (lock),
|
116 |
|
|
.rxdata_serdes0 (rxdata_serdes0[SERDES_DATA_W-1:0]),
|
117 |
|
|
.rxdata_serdes1 (rxdata_serdes1[SERDES_DATA_W-1:0]),
|
118 |
|
|
.rxaui_status (rxaui_status[STATUS_REG_W-1:0]),
|
119 |
|
|
// Inputs
|
120 |
|
|
.serdes_rx_clk (s_rx_clk), // Templated
|
121 |
|
|
.serdes_rx_clk_div2(serdes_rx_clk_div2),
|
122 |
|
|
.serdes_rx_clk_reset_(serdes_rx_clk_reset_),
|
123 |
|
|
.serdes_rx_clk_reset({~serdes_rx_clk_reset_}), // Templated
|
124 |
|
|
.serdes_rx_clk_div2_reset_(serdes_rx_clk_div2_reset_),
|
125 |
|
|
.rx_clk0 (rx_clk0),
|
126 |
|
|
.rx_clk1 (rx_clk1),
|
127 |
|
|
.media_interface_mode(media_interface_mode),
|
128 |
|
|
.serdes_mode (serdes_mode),
|
129 |
|
|
.lane0_sync_ok (lane0_sync_ok),
|
130 |
|
|
.lane1_sync_ok (lane1_sync_ok),
|
131 |
|
|
.s_sigdet (s_sigdet),
|
132 |
|
|
.serdes_rx_data (rxaui_rx_data[SERDES_DATA_W-1:0])); // Templated
|
133 |
|
|
|
134 |
|
|
/*sip_rxaui_tx_top AUTO_TEMPLATE(
|
135 |
|
|
.serdes_tx_clk (s_tx_clk),
|
136 |
|
|
)*/
|
137 |
|
|
sip_rxaui_tx_top
|
138 |
|
|
sip_rxaui_tx_top(/*AUTOINST*/
|
139 |
|
|
// Outputs
|
140 |
|
|
.rxaui_tx_data (rxaui_tx_data[SERDES_DATA_W-1:0]),
|
141 |
|
|
// Inputs
|
142 |
|
|
.serdes_tx_clk (s_tx_clk), // Templated
|
143 |
|
|
.serdes_txclk_in0_reset_(serdes_txclk_in0_reset_),
|
144 |
|
|
.serdes_txclk_in1_reset_(serdes_txclk_in1_reset_),
|
145 |
|
|
.serdes_tx_clk_reset_(serdes_tx_clk_reset_),
|
146 |
|
|
.media_interface_mode(media_interface_mode),
|
147 |
|
|
.serdes_mode (serdes_mode),
|
148 |
|
|
.txclk_in0 (txclk_in0),
|
149 |
|
|
.txdata_serdes0 (txdata_serdes0[SERDES_DATA_W-1:0]),
|
150 |
|
|
.txclk_in1 (txclk_in1),
|
151 |
|
|
.txdata_serdes1 (txdata_serdes1[SERDES_DATA_W-1:0]));
|
152 |
|
|
|
153 |
|
|
/*sip_rxaui_clk_reset AUTO_TEMPLATE(
|
154 |
|
|
.reset_ (reset_in_),
|
155 |
|
|
.serdes_tx_clk (s_tx_clk),
|
156 |
|
|
.serdes_rx_clk (s_rx_clk),
|
157 |
|
|
)*/
|
158 |
|
|
sip_rxaui_clk_reset
|
159 |
|
|
sip_rxaui_clk_reset(/*AUTOINST*/
|
160 |
|
|
// Outputs
|
161 |
|
|
.serdes_rx_clk_div2 (serdes_rx_clk_div2),
|
162 |
|
|
.rx_clk0 (rx_clk0),
|
163 |
|
|
.rx_clk1 (rx_clk1),
|
164 |
|
|
.serdes_rx_clk_reset_ (serdes_rx_clk_reset_),
|
165 |
|
|
.serdes_rx_clk_div2_reset_(serdes_rx_clk_div2_reset_),
|
166 |
|
|
.txclk_out (txclk_out),
|
167 |
|
|
.serdes_txclk_in0_reset_(serdes_txclk_in0_reset_),
|
168 |
|
|
.serdes_txclk_in1_reset_(serdes_txclk_in1_reset_),
|
169 |
|
|
.serdes_tx_clk_reset_ (serdes_tx_clk_reset_),
|
170 |
|
|
// Inputs
|
171 |
|
|
.scan_mode_ (scan_mode_),
|
172 |
|
|
.reset_ (reset_in_), // Templated
|
173 |
|
|
.media_interface_mode (media_interface_mode),
|
174 |
|
|
.serdes_mode (serdes_mode),
|
175 |
|
|
.serdes_rx_clk (s_rx_clk), // Templated
|
176 |
|
|
.serdes_tx_clk (s_tx_clk), // Templated
|
177 |
|
|
.txclk_in0 (txclk_in0),
|
178 |
|
|
.txclk_in1 (txclk_in1));
|
179 |
|
|
|
180 |
|
|
endmodule // sip_rxaui_top
|
181 |
|
|
|
182 |
|
|
// Local Variables:
|
183 |
|
|
// verilog-library-directories:( "." "../RxPath/" "../TxPath/" "../ClockReset/" "/proj1/galileo101/tomcat/MODELS/current/Model_link/")
|
184 |
|
|
// End:
|
185 |
|
|
|