SURF  1.0
XauiGtx7Wrapper.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : XauiGtx7Wrapper.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2015-04-07
5 -- Last update: 2016-09-29
6 -------------------------------------------------------------------------------
7 -- Description: Gtx7 Wrapper for 10 GigE XAUI
8 -------------------------------------------------------------------------------
9 -- This file is part of 'SLAC Firmware Standard Library'.
10 -- It is subject to the license terms in the LICENSE.txt file found in the
11 -- top-level directory of this distribution and at:
12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
13 -- No part of 'SLAC Firmware Standard Library', including this file,
14 -- may be copied, modified, propagated, or distributed except according to
15 -- the terms contained in the LICENSE.txt file.
16 -------------------------------------------------------------------------------
17 
18 library ieee;
19 use ieee.std_logic_1164.all;
20 
21 use work.StdRtlPkg.all;
22 use work.AxiStreamPkg.all;
23 use work.AxiLitePkg.all;
24 use work.XauiPkg.all;
25 
26 library unisim;
27 use unisim.vcomponents.all;
28 
29 --! @see entity
30  --! @ingroup ethernet_XauiCore_gtx7
31 entity XauiGtx7Wrapper is
32  generic (
33  TPD_G : time := 1 ns;
34  -- QUAD PLL Configurations
35  USE_GTREFCLK_G : boolean := false; -- FALSE: gtClkP/N, TRUE: gtRefClk
36  REFCLK_DIV2_G : boolean := false; -- FALSE: gtClkP/N = 156.25 MHz, TRUE: gtClkP/N = 312.5 MHz
37  -- AXI-Lite Configurations
38  EN_AXI_REG_G : boolean := false;
40  -- AXI Streaming Configurations
42  port (
43  -- Local Configurations
44  localMac : in slv(47 downto 0) := MAC_ADDR_INIT_C;
45  -- Streaming DMA Interface
46  dmaClk : in sl;
47  dmaRst : in sl;
52  -- Slave AXI-Lite Interface
53  axiLiteClk : in sl := '0';
54  axiLiteRst : in sl := '0';
59  -- Misc. Signals
60  extRst : in sl;
61  phyClk : out sl;
62  phyRst : out sl;
63  phyReady : out sl;
64  -- MGT Clock Port (156.25 MHz or 312.5 MHz)
65  gtRefClk : in sl := '0'; -- 156.25 MHz only
66  gtClkP : in sl := '1';
67  gtClkN : in sl := '0';
68  -- MGT Ports
69  gtTxP : out slv(3 downto 0);
70  gtTxN : out slv(3 downto 0);
71  gtRxP : in slv(3 downto 0);
72  gtRxN : in slv(3 downto 0));
73 end XauiGtx7Wrapper;
74 
75 architecture mapping of XauiGtx7Wrapper is
76 
77  signal phyClock : sl;
78  signal refClockDiv2 : sl;
79  signal refClock : sl;
80  signal refClk : sl;
81 
82 begin
83 
84  IBUFDS_GTE2_Inst : IBUFDS_GTE2
85  port map (
86  I => gtClkP,
87  IB => gtClkN,
88  CEB => '0',
89  ODIV2 => refClockDiv2,
90  O => refClock);
91 
93 
94  ----------------------
95  -- 10 GigE XAUI Module
96  ----------------------
97  XauiGtx7_Inst : entity work.XauiGtx7
98  generic map (
99  TPD_G => TPD_G,
100  -- AXI-Lite Configurations
103  -- AXI Streaming Configurations
105  port map (
106  -- Local Configurations
107  localMac => localMac,
108  -- Clocks and resets
109  dmaClk => dmaClk,
110  dmaRst => dmaRst,
115  -- Slave AXI-Lite Interface
122  -- Misc. Signals
123  extRst => extRst,
124  phyClk => phyClk,
125  phyRst => phyRst,
126  phyReady => phyReady,
127  -- MGT Ports
128  gtRefClk => refClk,
129  gtTxP => gtTxP,
130  gtTxN => gtTxN,
131  gtRxP => gtRxP,
132  gtRxN => gtRxN);
133 
134 end mapping;
in axiLiteClksl := '0'
_library_ ieeeieee
out axiLiteWriteSlaveAxiLiteWriteSlaveType
Definition: XauiGtx7.vhd:53
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
Definition: XauiGtx7.vhd:34
in gtRxNslv( 3 downto 0)
out phyClksl
Definition: XauiGtx7.vhd:56
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
out gtTxNslv( 3 downto 0)
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
Definition: XauiGtx7.vhd:36
in axiLiteWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
Definition: XauiGtx7.vhd:52
USE_GTREFCLK_Gboolean := false
in axiLiteReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
Definition: XauiGtx7.vhd:50
in extRstsl
Definition: XauiGtx7.vhd:55
in gtClkNsl := '0'
in axiLiteClksl := '0'
Definition: XauiGtx7.vhd:48
in dmaObMasterAxiStreamMasterType
out axiLiteWriteSlaveAxiLiteWriteSlaveType
in dmaObMasterAxiStreamMasterType
Definition: XauiGtx7.vhd:45
in gtRxPslv( 3 downto 0)
in dmaIbSlaveAxiStreamSlaveType
Definition: XauiGtx7.vhd:44
TPD_Gtime := 1 ns
out dmaObSlaveAxiStreamSlaveType
out gtTxPslv( 3 downto 0)
Definition: XauiGtx7.vhd:61
out axiLiteReadSlaveAxiLiteReadSlaveType
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
Definition: AxiLitePkg.vhd:36
in gtRxPslv( 3 downto 0)
Definition: XauiGtx7.vhd:63
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
out gtTxNslv( 3 downto 0)
Definition: XauiGtx7.vhd:62
EN_AXI_REG_Gboolean := false
in gtRefClksl := '0'
in gtRefClksl
Definition: XauiGtx7.vhd:60
out gtTxPslv( 3 downto 0)
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
in dmaRstsl
Definition: XauiGtx7.vhd:42
in gtClkPsl := '1'
out phyRstsl
Definition: XauiGtx7.vhd:57
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
Definition: AxiLitePkg.vhd:69
AxiStreamConfigType :=(TSTRB_EN_C => false,TDATA_BYTES_C => 16,TDEST_BITS_C => 4,TID_BITS_C => 0,TKEEP_MODE_C => TKEEP_NORMAL_C,TUSER_BITS_C => 4,TUSER_MODE_C => TUSER_NORMAL_C) AXI_STREAM_CONFIG_INIT_C
AxiLiteReadSlaveType
Definition: AxiLitePkg.vhd:85
in axiLiteReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
AxiLiteWriteMasterType :=(awaddr =>( others => '0'),awprot =>( others => '0'),awvalid => '0',wdata =>( others => '0'),wstrb =>( others => '1'),wvalid => '0',bready => '1') AXI_LITE_WRITE_MASTER_INIT_C
Definition: AxiLitePkg.vhd:125
REFCLK_DIV2_Gboolean := false
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
Definition: XauiGtx7.vhd:39
in gtRxNslv( 3 downto 0)
Definition: XauiGtx7.vhd:64
out phyReadysl
Definition: XauiGtx7.vhd:58
in axiLiteRstsl := '0'
out dmaObSlaveAxiStreamSlaveType
Definition: XauiGtx7.vhd:46
in axiLiteWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
out dmaIbMasterAxiStreamMasterType
TPD_Gtime := 1 ns
Definition: XauiGtx7.vhd:31
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
EN_AXI_REG_Gboolean := false
Definition: XauiGtx7.vhd:33
in dmaIbSlaveAxiStreamSlaveType
out axiLiteReadSlaveAxiLiteReadSlaveType
Definition: XauiGtx7.vhd:51
std_logic_vector slv
Definition: StdRtlPkg.vhd:29
out dmaIbMasterAxiStreamMasterType
Definition: XauiGtx7.vhd:43
in axiLiteRstsl := '0'
Definition: XauiGtx7.vhd:49
in dmaClksl
Definition: XauiGtx7.vhd:41