SURF  1.0
GigEthGthUltraScale.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : GigEthGthUltraScale.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2016-02-07
5 -- Last update: 2017-05-12
6 -------------------------------------------------------------------------------
7 -- Description: 1000BASE-X Ethernet for Gth7
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.EthMacPkg.all;
25 use work.GigEthPkg.all;
26 
27 --! @see entity
28  --! @ingroup ethernet_GigEthCore_gthUltraScale
30  generic (
31  TPD_G : time := 1 ns;
32  -- AXI-Lite Configurations
33  EN_AXI_REG_G : boolean := false;
35  -- AXI Streaming Configurations
37  port (
38  -- Local Configurations
39  localMac : in slv(47 downto 0) := MAC_ADDR_INIT_C;
40  -- Streaming DMA Interface
41  dmaClk : in sl;
42  dmaRst : in sl;
47  -- Slave AXI-Lite Interface
48  axiLiteClk : in sl := '0';
49  axiLiteRst : in sl := '0';
54  -- PHY + MAC signals
55  sysClk62 : in sl;
56  sysClk125 : in sl;
57  sysRst125 : in sl;
58  extRst : in sl;
59  phyReady : out sl;
60  sigDet : in sl := '1';
61  -- MGT Ports
62  gtTxP : out sl;
63  gtTxN : out sl;
64  gtRxP : in sl;
65  gtRxN : in sl);
66 end GigEthGthUltraScale;
67 
68 architecture mapping of GigEthGthUltraScale is
69 
72 
77 
78  signal gmiiTxClk : sl;
79  signal gmiiTxd : slv(7 downto 0);
80  signal gmiiTxEn : sl;
81  signal gmiiTxEr : sl;
82 
83  signal gmiiRxClk : sl;
84  signal gmiiRxd : slv(7 downto 0);
85  signal gmiiRxDv : sl;
86  signal gmiiRxEr : sl;
87 
88  signal areset : sl;
89  signal coreRst : sl;
90 
91 begin
92 
93  ------------------
94  -- Synchronization
95  ------------------
96  U_AxiLiteAsync : entity work.AxiLiteAsync
97  generic map (
98  TPD_G => TPD_G)
99  port map (
100  -- Slave Port
101  sAxiClk => axiLiteClk,
107  -- Master Port
108  mAxiClk => sysClk125,
114 
116 
117  U_PwrUpRst : entity work.PwrUpRst
118  generic map (
119  TPD_G => TPD_G,
120  DURATION_G => 1000)
121  port map (
122  clk => sysClk125,
123  arst => areset,
124  rstOut => coreRst);
125 
126  --------------------
127  -- Ethernet MAC core
128  --------------------
129  U_MAC : entity work.EthMacTop
130  generic map (
131  TPD_G => TPD_G,
132  PHY_TYPE_G => "GMII",
134  port map (
135  -- Primary Interface
136  primClk => dmaClk,
137  primRst => dmaRst,
142  -- Ethernet Interface
143  ethClk => sysClk125,
144  ethRst => sysRst125,
145  ethConfig => config.macConfig,
146  ethStatus => status.macStatus,
147  phyReady => status.phyReady,
148  -- GMII PHY Interface
149  gmiiRxDv => gmiiRxDv,
150  gmiiRxEr => gmiiRxEr,
151  gmiiRxd => gmiiRxd,
152  gmiiTxEn => gmiiTxEn,
153  gmiiTxEr => gmiiTxEr,
154  gmiiTxd => gmiiTxd);
155 
156  ------------------
157  -- 1000BASE-X core
158  ------------------
159  U_GigEthGthUltraScaleCore : entity work.GigEthGthUltraScaleCore
160  port map (
161  -- Clocks and Resets
162  gtrefclk => sysClk125, -- Used as CPLL clock reference
163  independent_clock_bufg => sysClk62, -- Used for the GT free running and DRP clock
164  txoutclk => open,
165  rxoutclk => open,
166  userclk => sysClk62,
167  userclk2 => sysClk125,
168  rxuserclk => sysClk62,
169  rxuserclk2 => sysClk62,
170  reset => coreRst,
171  pma_reset => coreRst,
172  resetdone => open,
173  mmcm_locked => '1',
174  mmcm_reset => open,
175  cplllock => open,
176  -- PHY Interface
177  gmii_txd => gmiiTxd,
178  gmii_tx_en => gmiiTxEn,
179  gmii_tx_er => gmiiTxEr,
180  gmii_rxd => gmiiRxd,
181  gmii_rx_dv => gmiiRxDv,
182  gmii_rx_er => gmiiRxEr,
183  gmii_isolate => open,
184  -- MGT Ports
185  txp => gtTxP,
186  txn => gtTxN,
187  rxp => gtRxP,
188  rxn => gtRxN,
189  -- Configuration and Status
190  configuration_vector => config.coreConfig,
191  status_vector => status.coreStatus,
192  signal_detect => sigDet);
193 
196 
197  --------------------------------
198  -- Configuration/Status Register
199  --------------------------------
200  U_GigEthReg : entity work.GigEthReg
201  generic map (
202  TPD_G => TPD_G,
205  port map (
206  -- Local Configurations
207  localMac => localMac,
208  -- Clocks and resets
209  clk => sysClk125,
210  rst => sysRst125,
211  -- AXI-Lite Register Interface
216  -- Configuration and Status Interface
217  config => config,
218  status => status);
219 
220 end mapping;
EN_AXI_REG_Gboolean := false
Definition: GigEthReg.vhd:32
in statusGigEthStatusType
Definition: GigEthReg.vhd:47
out dmaIbMasterAxiStreamMasterType
out axiReadSlaveAxiLiteReadSlaveType
Definition: GigEthReg.vhd:42
in rstsl
Definition: GigEthReg.vhd:39
out rstOutsl
Definition: PwrUpRst.vhd:39
TPD_Gtime := 1 ns
Definition: PwrUpRst.vhd:30
in primClksl
Definition: EthMacTop.vhd:65
in axiWriteMasterAxiLiteWriteMasterType
Definition: GigEthReg.vhd:43
AxiLiteReadSlaveType mAxiReadSlave
AxiLiteWriteMasterType
Definition: AxiLitePkg.vhd:111
std_logic sl
Definition: StdRtlPkg.vhd:28
AxiLiteWriteSlaveType mAxiWriteSlave
in dmaObMasterAxiStreamMasterType
out mAxiReadMasterAxiLiteReadMasterType
in ibMacPrimMasterAxiStreamMasterType
Definition: EthMacTop.vhd:67
AxiLiteWriteMasterType mAxiWriteMaster
out axiLiteWriteSlaveAxiLiteWriteSlaveType
in mAxiWriteSlaveAxiLiteWriteSlaveType
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
in obMacPrimSlaveAxiStreamSlaveType
Definition: EthMacTop.vhd:70
out gmiiTxEnsl
Definition: EthMacTop.vhd:99
out sAxiWriteSlaveAxiLiteWriteSlaveType
in arstsl :=not IN_POLARITY_G
Definition: PwrUpRst.vhd:37
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
in sAxiReadMasterAxiLiteReadMasterType
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
Definition: AxiLitePkg.vhd:36
in sAxiWriteMasterAxiLiteWriteMasterType
in primRstsl
Definition: EthMacTop.vhd:66
out obMacPrimMasterAxiStreamMasterType
Definition: EthMacTop.vhd:69
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
in ethRstsl
Definition: EthMacTop.vhd:63
GigEthConfigType
Definition: GigEthPkg.vhd:31
out axiLiteReadSlaveAxiLiteReadSlaveType
EN_AXI_REG_Gboolean := false
AxiLiteReadMasterType
Definition: AxiLitePkg.vhd:59
out ibMacPrimSlaveAxiStreamSlaveType
Definition: EthMacTop.vhd:68
in axiLiteReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
Definition: GigEthReg.vhd:36
in ethClksl
Definition: EthMacTop.vhd:62
out configGigEthConfigType
Definition: GigEthReg.vhd:46
in clksl
Definition: PwrUpRst.vhd:38
out sAxiReadSlaveAxiLiteReadSlaveType
slv( 15 downto 0) coreStatus
Definition: GigEthPkg.vhd:44
PRIM_CONFIG_GAxiStreamConfigType := EMAC_AXIS_CONFIG_C
Definition: EthMacTop.vhd:49
GigEthStatusType
Definition: GigEthPkg.vhd:41
out gmiiTxErsl
Definition: EthMacTop.vhd:100
DURATION_Gnatural range 0 to (( 2** 30)- 1):= 156250000
Definition: PwrUpRst.vhd:35
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
Definition: GigEthReg.vhd:33
PHY_TYPE_Gstring := "XGMII"
Definition: EthMacTop.vhd:36
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
Definition: AxiLitePkg.vhd:69
in clksl
Definition: GigEthReg.vhd:38
in gmiiRxDvsl := '0'
Definition: EthMacTop.vhd:96
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 axiReadMasterAxiLiteReadMasterType
Definition: GigEthReg.vhd:41
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
in mAxiReadSlaveAxiLiteReadSlaveType
in mAxiClkRstsl
in gmiiRxdslv( 7 downto 0) :=( others => '0')
Definition: EthMacTop.vhd:98
TPD_Gtime := 1 ns
Definition: EthMacTop.vhd:32
TPD_Gtime := 1 ns
in ethConfigEthMacConfigType
Definition: EthMacTop.vhd:104
in gmiiRxErsl := '0'
Definition: EthMacTop.vhd:97
sl softRst
Definition: GigEthPkg.vhd:32
out ethStatusEthMacStatusType
Definition: EthMacTop.vhd:105
out dmaObSlaveAxiStreamSlaveType
in dmaIbSlaveAxiStreamSlaveType
TPD_Gtime := 1 ns
Definition: GigEthReg.vhd:31
in axiLiteWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
out mAxiWriteMasterAxiLiteWriteMasterType
in sAxiClkRstsl
AxiLiteReadMasterType mAxiReadMaster
std_logic_vector slv
Definition: StdRtlPkg.vhd:29
out gmiiTxdslv( 7 downto 0)
Definition: EthMacTop.vhd:101
in phyReadysl
Definition: EthMacTop.vhd:103
out axiWriteSlaveAxiLiteWriteSlaveType
Definition: GigEthReg.vhd:44