OpenCores
URL https://opencores.org/ocsvn/rxaui_interface_and_xaui_to_rxaui_interface_adapter/rxaui_interface_and_xaui_to_rxaui_interface_adapter/trunk

Subversion Repositories rxaui_interface_and_xaui_to_rxaui_interface_adapter

[/] [rxaui_interface_and_xaui_to_rxaui_interface_adapter/] [RxPath/] [sip_rxaui_rx_glue.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tsahidanie
//-----------------------------------------------------------------------------
2
// Title         : Rxaui Rx Glue Logic
3
// Project       : SIP
4
//-----------------------------------------------------------------------------
5
// File          : sip_rxaui_rx_glue.v
6
// Author        : Lior Valency
7
// Created       : 19/02/2008 
8
// Last modified : 19/02/2008 
9
//-----------------------------------------------------------------------------
10
// Description : This module receive the data from rxaui fifo and from serdes
11
// and muxed between them according to media interface.
12
// It also sample the data receive from fifo in negedge since the data received
13
// from serdes is at negedge clock.         
14
//-----------------------------------------------------------------------------
15
// Copyright (c) 2007  Marvell International Ltd.
16
//
17
// THIS CODE CONTAINS CONFIDENTIAL INFORMATION OF MARVELL SEMICONDUCTOR, INC.
18
// NO RIGHTS ARE GRANTED HEREIN UNDER ANY PATENT, MASK WORK RIGHT OR COPYRIGHT
19
// OF MARVELL OR ANY THIRD PARTY. MARVELL RESERVES THE RIGHT AT ITS SOLE
20
// DISCRETION TO REQUEST THAT THIS CODE BE IMMEDIATELY RETURNED TO MARVELL.
21
// THIS CODE IS PROVIDED "AS IS". MARVELL MAKES NO WARRANTIES, EXPRESS,
22
// IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE.
23
//
24
//------------------------------------------------------------------------------
25
// Modification history :
26
// 12/12/2007  : created
27
//-----------------------------------------------------------------------------
28
`timescale 10ps / 10ps
29
 
30
module sip_rxaui_rx_glue (/*AUTOARG*/
31
   // Outputs
32
   comma_aligned_en, rxdata_serdes0, rxdata_serdes1,
33
   // Inputs
34
   rx_clk0, rx_clk1, media_interface_mode, serdes_mode,
35
   rxdata_rxaui_lane0, rxdata_rxaui_lane1, serdes_rx_data,
36
   lane0_sync_ok, lane1_sync_ok
37
   );
38
 
39
`include "sip_rxaui_params.inc"
40
 
41
   ///////////////
42
   // INTERFACE //
43
   ///////////////
44
 
45
   // General
46
   input                       rx_clk0;
47
   input                       rx_clk1;
48
 
49
   // Configuration
50
   input                       media_interface_mode;
51
   input                       serdes_mode;
52
 
53
   // Fifo interface
54
   input [SERDES_DATA_W-1:0]   rxdata_rxaui_lane0;
55
   input [SERDES_DATA_W-1:0]   rxdata_rxaui_lane1;
56
 
57
   // Comma detect interface
58
   output                      comma_aligned_en;
59
 
60
   // Serdes interface
61
   input [SERDES_DATA_W-1:0]   serdes_rx_data;
62
 
63
   // XPCS interface
64
   input                       lane0_sync_ok;
65
   input                       lane1_sync_ok;
66
   output [SERDES_DATA_W-1:0]  rxdata_serdes0;
67
   output [SERDES_DATA_W-1:0]  rxdata_serdes1;
68
 
69
   ////////////////////////////////
70
   // Internal Registers & Wires //
71
   ////////////////////////////////
72
 
73
   wire [SERDES_DATA_W-1:0]    rxdata_serdes0_d;
74
   reg [SERDES_DATA_W-1:0]     rxdata_serdes0;
75
   reg [SERDES_DATA_W-1:0]     rxdata_serdes1;
76
 
77
   ///////////
78
   // Logic //
79
   ///////////
80
 
81
   // Bypass rxaui logic
82
   assign rxdata_serdes0_d = ((media_interface_mode == UNSET) && (serdes_mode == UNSET)) ?
83
                             serdes_rx_data : rxdata_rxaui_lane0;
84
 
85
   // Only when both lane (xpcs) are synced the comma detect stop
86
   // searching for comma
87
   assign comma_aligned_en = ((lane0_sync_ok == SET) && (lane1_sync_ok == SET)) ? UNSET : SET;
88
 
89
   ////////
90
   // FF //
91
   ////////
92
 
93
   always @(negedge rx_clk0)
94
     begin
95
       rxdata_serdes0     <= #1 rxdata_serdes0_d;
96
     end
97
 
98
   always @(negedge rx_clk1)
99
     begin
100
       rxdata_serdes1     <= #1 rxdata_rxaui_lane1;
101
     end
102
 
103
endmodule // sip_rxaui_rx_glue

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.