1 ------------------------------------------------------------------------------- 2 -- File : TenGigEthGthUltraScale.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2015-04-08 5 -- Last update: 2017-06-22 6 ------------------------------------------------------------------------------- 7 -- Description: 10GBASE-R Ethernet for GTH Ultra Scale 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 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
28 --! @ingroup ethernet_TenGigEthCore_gthUltraScale 33 -- AXI-Lite Configurations 36 -- AXI Streaming Configurations 39 -- Local Configurations 40 localMac :
in slv(
47 downto 0) := MAC_ADDR_INIT_C;
41 -- Streaming DMA Interface 48 -- Slave AXI-Lite Interface 65 -- Transceiver Debug Interface 81 end TenGigEthGthUltraScale;
85 component TenGigEthGthUltraScale156p25MHzCore
97 sim_speedup_control :
in ;
101 qpll0outrefclk :
in ;
103 reset_tx_bufg_gt :
out ;
104 reset_counter_done :
in ;
105 gt_eyescanreset :
in ;
106 gt_eyescantrigger :
in ;
108 gt_txprbsforceerr :
in ;
111 gt_rxrate :
in (
2 downto 0);
112 gt_txoutclksel :
in (
2 downto 0);
116 gt_rxdfelpmreset :
in ;
117 gt_txprecursor :
in (
4 downto 0);
118 gt_txpostcursor :
in (
4 downto 0);
119 gt_txdiffctrl :
in (
3 downto 0);
121 gt_pcsrsvdin :
in (
15 downto 0);
122 gt_eyescandataerror :
out ;
123 gt_txbufstatus :
out (
1 downto 0);
124 gt_txresetdone :
out ;
125 gt_rxpmaresetdone :
out ;
126 gt_rxresetdone :
out ;
127 gt_rxbufstatus :
out (
2 downto 0);
129 gt_dmonitorout :
out (
16 downto 0);
130 xgmii_txd :
in (
63 downto 0);
131 xgmii_txc :
in (
7 downto 0);
132 xgmii_rxd :
out (
63 downto 0);
133 xgmii_rxc :
out (
7 downto 0);
138 configuration_vector :
in (
535 downto 0);
139 status_vector :
out (
447 downto 0);
140 core_status :
out (
7 downto 0);
147 core_to_gt_drpen :
out ;
148 core_to_gt_drpwe :
out ;
149 core_to_gt_drpaddr :
out (
15 downto 0);
150 core_to_gt_drpdi :
out (
15 downto 0);
151 core_to_gt_drprdy :
in ;
152 core_to_gt_drpdo :
in (
15 downto 0);
155 gt_drpaddr :
in (
15 downto 0);
156 gt_drpdi :
in (
15 downto 0);
158 gt_drpdo :
out (
15 downto 0);
159 pma_pmd_type :
in (
2 downto 0);
164 component TenGigEthGthUltraScale312p5MHzCore
173 areset_coreclk :
in ;
176 sim_speedup_control :
in ;
180 qpll0outrefclk :
in ;
182 reset_tx_bufg_gt :
out ;
183 reset_counter_done :
in ;
184 gt_eyescanreset :
in ;
185 gt_eyescantrigger :
in ;
187 gt_txprbsforceerr :
in ;
190 gt_rxrate :
in (
2 downto 0);
191 gt_txoutclksel :
in (
2 downto 0);
195 gt_rxdfelpmreset :
in ;
196 gt_txprecursor :
in (
4 downto 0);
197 gt_txpostcursor :
in (
4 downto 0);
198 gt_txdiffctrl :
in (
3 downto 0);
200 gt_pcsrsvdin :
in (
15 downto 0);
201 gt_eyescandataerror :
out ;
202 gt_txbufstatus :
out (
1 downto 0);
203 gt_txresetdone :
out ;
204 gt_rxpmaresetdone :
out ;
205 gt_rxresetdone :
out ;
206 gt_rxbufstatus :
out (
2 downto 0);
208 gt_dmonitorout :
out (
16 downto 0);
209 xgmii_txd :
in (
63 downto 0);
210 xgmii_txc :
in (
7 downto 0);
211 xgmii_rxd :
out (
63 downto 0);
212 xgmii_rxc :
out (
7 downto 0);
217 configuration_vector :
in (
535 downto 0);
218 status_vector :
out (
447 downto 0);
219 core_status :
out (
7 downto 0);
226 core_to_gt_drpen :
out ;
227 core_to_gt_drpwe :
out ;
228 core_to_gt_drpaddr :
out (
15 downto 0);
229 core_to_gt_drpdi :
out (
15 downto 0);
230 core_to_gt_drprdy :
in ;
231 core_to_gt_drpdo :
in (
15 downto 0);
234 gt_drpaddr :
in (
15 downto 0);
235 gt_drpdi :
in (
15 downto 0);
237 gt_drpdo :
out (
15 downto 0);
238 pma_pmd_type :
in (
2 downto 0);
324 dataOut
(0) => status.sigDet,
325 dataOut
(1) => status.txFault,
326 dataOut
(2) => status.txUsrRdy
);
344 -- Ethernet Interface 350 -- XGMII PHY Interface 360 U_TenGigEthGthUltraScaleCore : TenGigEthGthUltraScale156p25MHzCore
365 txusrclk => txusrclk,
366 txusrclk2 => txusrclk2,
370 rxrecclk_out =>
open,
372 gttxreset => status.gtTxRst,
373 gtrxreset => status.gtRxRst,
375 reset_counter_done => status.rstCntDone,
376 -- Quad PLL Interface 377 qpll0lock => status.qplllock,
391 -- Configuration and Status 392 sim_speedup_control => '0',
394 status_vector =>
open,
395 core_status => status.core_status,
396 tx_resetdone => status.txRstdone,
397 rx_resetdone => status.rxRstdone,
398 signal_detect => status.sigDet,
399 tx_fault => status.txFault,
400 tx_disable => status.txDisable,
401 pma_pmd_type => config.pma_pmd_type,
403 -- Note: If no arbitration is required on the GT DRP ports 404 -- then connect REQ to GNT and connect other signals i <= o; 407 core_to_gt_drpen =>
drpEn,
408 core_to_gt_drpwe =>
drpWe,
410 core_to_gt_drpdi =>
drpDi,
417 core_to_gt_drprdy =>
drpRdy,
418 core_to_gt_drpdo =>
drpDo,
419 -- Transceiver Debug Interface 421 gt_txpmareset => '0',
422 gt_rxpmareset => '0',
423 gt_txresetdone =>
open,
424 gt_rxresetdone =>
open,
425 gt_rxpmaresetdone =>
open,
426 gt_txbufstatus =>
open,
427 gt_rxbufstatus =>
open,
428 gt_rxrate =>
(others => '0'
),
429 gt_eyescantrigger => '0',
430 gt_eyescanreset => '0',
431 gt_eyescandataerror =>
open,
434 gt_rxdfelpmreset => '0',
435 gt_txprbsforceerr => '0',
436 gt_rxprbserr =>
open,
438 gt_dmonitorout =>
open,
443 gt_pcsrsvdin =>
(others => '0'
),
444 gt_txoutclksel => "
101"
);
447 U_TenGigEthGthUltraScaleCore : TenGigEthGthUltraScale312p5MHzCore
452 txusrclk => txusrclk,
453 txusrclk2 => txusrclk2,
457 rxrecclk_out =>
open,
459 gttxreset => status.gtTxRst,
460 gtrxreset => status.gtRxRst,
462 reset_counter_done => status.rstCntDone,
463 -- Quad PLL Interface 464 qpll0lock => status.qplllock,
478 -- Configuration and Status 479 sim_speedup_control => '0',
481 status_vector =>
open,
482 core_status => status.core_status,
483 tx_resetdone => status.txRstdone,
484 rx_resetdone => status.rxRstdone,
485 signal_detect => status.sigDet,
486 tx_fault => status.txFault,
487 tx_disable => status.txDisable,
488 pma_pmd_type => config.pma_pmd_type,
490 -- Note: If no arbitration is required on the GT DRP ports 491 -- then connect REQ to GNT and connect other signals i <= o; 494 core_to_gt_drpen =>
drpEn,
495 core_to_gt_drpwe =>
drpWe,
497 core_to_gt_drpdi =>
drpDi,
504 core_to_gt_drprdy =>
drpRdy,
505 core_to_gt_drpdo =>
drpDo,
506 -- Transceiver Debug Interface 508 gt_txpmareset => '0',
509 gt_rxpmareset => '0',
510 gt_txresetdone =>
open,
511 gt_rxresetdone =>
open,
512 gt_rxpmaresetdone =>
open,
513 gt_txbufstatus =>
open,
514 gt_rxbufstatus =>
open,
515 gt_rxrate =>
(others => '0'
),
516 gt_eyescantrigger => '0',
517 gt_eyescanreset => '0',
518 gt_eyescandataerror =>
open,
521 gt_rxdfelpmreset => '0',
522 gt_txprbsforceerr => '0',
523 gt_rxprbserr =>
open,
525 gt_dmonitorout =>
open,
530 gt_pcsrsvdin =>
(others => '0'
),
531 gt_txoutclksel => "
101"
);
534 ------------------------------------- 535 -- 10GBASE-R's Reset Module 536 ------------------------------------- 556 ------------------------------- 557 -- Configuration Vector Mapping 558 ------------------------------- 559 configurationVector(
0) <= config.pma_loopback;
560 configurationVector(
15) <= config.pma_reset;
561 configurationVector(
110) <= config.pcs_loopback;
562 configurationVector(
111) <= config.pcs_reset;
563 configurationVector(
399 downto 384) <= x"4C4B"; -- timer_ctrl =
0x4C4B (
default)
565 ---------------------- 566 -- Core Status Mapping 567 ---------------------- 570 -------------------------------- 571 -- Configuration/Status Register 572 -------------------------------- 579 -- Local Configurations 584 -- AXI-Lite Register Interface 589 -- Configuration and Status Interface
in axiReadMasterAxiLiteReadMasterType
EN_AXI_REG_Gboolean := false
in dmaObMasterAxiStreamMasterType
out xgmiiTxdslv( 63 downto 0)
out dmaObSlaveAxiStreamSlaveType
AxiStreamMasterType macRxAxisMaster
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
in xgmiiRxcslv( 7 downto 0) :=( others => '0')
REF_CLK_FREQ_Greal := 156.25E+6
out mAxiReadMasterAxiLiteReadMasterType
in ibMacPrimMasterAxiStreamMasterType
out axiReadSlaveAxiLiteReadSlaveType
slv( 7 downto 0) core_status
out xgmiiTxcslv( 7 downto 0)
in mAxiWriteSlaveAxiLiteWriteSlaveType
out axiLiteReadSlaveAxiLiteReadSlaveType
AxiLiteReadSlaveType mAxiReadSlave
in obMacPrimSlaveAxiStreamSlaveType
out sAxiWriteSlaveAxiLiteWriteSlaveType
out axiLiteWriteSlaveAxiLiteWriteSlaveType
AxiStreamSlaveType macTxAxisSlave
in axiLiteReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
slv( 15 downto 0) drpAddr
in sAxiReadMasterAxiLiteReadMasterType
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
in sAxiWriteMasterAxiLiteWriteMasterType
out obMacPrimMasterAxiStreamMasterType
in gtTxPreCursorslv( 4 downto 0) := "00000"
in xgmiiRxdslv( 63 downto 0) :=( others => '0')
slv( 535 downto 0) :=( others => '0') configurationVector
out axiWriteSlaveAxiLiteWriteSlaveType
out ibMacPrimSlaveAxiStreamSlaveType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
in dmaIbSlaveAxiStreamSlaveType
out sAxiReadSlaveAxiLiteReadSlaveType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
PRIM_CONFIG_GAxiStreamConfigType := EMAC_AXIS_CONFIG_C
in axiWriteMasterAxiLiteWriteMasterType
PHY_TYPE_Gstring := "XGMII"
AxiLiteReadMasterType :=(araddr =>( others => '0'),arprot =>( others => '0'),arvalid => '0',rready => '1') AXI_LITE_READ_MASTER_INIT_C
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
out configTenGigEthConfig
AxiStreamMasterType macTxAxisMaster
in axiLiteWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
in localMacslv( 47 downto 0) := MAC_ADDR_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
in mAxiReadSlaveAxiLiteReadSlaveType
AxiLiteWriteSlaveType mAxiWriteSlave
out dmaIbMasterAxiStreamMasterType
EN_AXI_REG_Gboolean := false
AxiLiteReadMasterType mAxiReadMaster
in ethConfigEthMacConfigType
out ethStatusEthMacStatusType
in gtTxPostCursorslv( 4 downto 0) := "00000"
AxiStreamCtrlType macRxAxisCtrl
out mAxiWriteMasterAxiLiteWriteMasterType
AxiLiteWriteMasterType mAxiWriteMaster
in gtTxDiffCtrlslv( 3 downto 0) := "1110"