1 ------------------------------------------------------------------------------- 2 -- File : XauiGthUltraScale.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2015-04-08 5 -- Last update: 2016-09-29 6 ------------------------------------------------------------------------------- 7 -- Description: 10 GigE XAUI 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;
31 --! @ingroup ethernet_XauiCore_gthUltraScale 35 -- XAUI Configurations 38 -- AXI-Lite Configurations 41 -- AXI Streaming Configurations 44 -- Local Configurations 45 localMac :
in slv(
47 downto 0) := MAC_ADDR_INIT_C;
46 -- Streaming DMA Interface 53 -- Slave AXI-Lite Interface 65 -- Transceiver Debug Interface 72 refClk : in sl;
-- 125MHz, 156.25MHz, or 312.5MHz 77 end XauiGthUltraScale;
120 -- Ethernet Interface 126 -- XGMII PHY Interface 137 U_XauiGthUltraScaleCore :
entity work.XauiGthUltraScale125MHz10GigECore
141 reset => status.areset,
143 clk156_lock => status.clkLock,
151 xaui_tx_l0_p =>
gtTxP(0),
152 xaui_tx_l0_n =>
gtTxN(0),
153 xaui_tx_l1_p =>
gtTxP(1),
154 xaui_tx_l1_n =>
gtTxN(1),
155 xaui_tx_l2_p =>
gtTxP(2),
156 xaui_tx_l2_n =>
gtTxN(2),
157 xaui_tx_l3_p =>
gtTxP(3),
158 xaui_tx_l3_n =>
gtTxN(3),
159 xaui_rx_l0_p =>
gtRxP(0),
160 xaui_rx_l0_n =>
gtRxN(0),
161 xaui_rx_l1_p =>
gtRxP(1),
162 xaui_rx_l1_n =>
gtRxN(1),
163 xaui_rx_l2_p =>
gtRxP(2),
164 xaui_rx_l2_n =>
gtRxN(2),
165 xaui_rx_l3_p =>
gtRxP(3),
166 xaui_rx_l3_n =>
gtRxN(3),
168 gt0_drpaddr =>
(others => '0'
),
170 gt0_drpdi => X"0000",
174 gt1_drpaddr =>
(others => '0'
),
176 gt1_drpdi => X"0000",
180 gt2_drpaddr =>
(others => '0'
),
182 gt2_drpdi => X"0000",
186 gt3_drpaddr =>
(others => '0'
),
188 gt3_drpdi => X"0000",
192 -- TX Reset and Initialisation 193 gt_txpmareset => B"0000",
194 gt_txpcsreset => B"0000",
195 gt_txresetdone =>
open,
196 -- RX Reset and Initialisation 197 gt_rxpmareset => B"0000",
198 gt_rxpcsreset => B"0000",
199 gt_rxpmaresetdone =>
open,
200 gt_rxresetdone =>
open,
202 gt_rxbufstatus =>
open,
203 gt_txphaligndone =>
open,
204 gt_txphinitdone =>
open,
205 gt_txdlysresetdone =>
open,
207 -- Signal Integrity adn Functionality 209 gt_eyescantrigger => B"0000",
210 gt_eyescanreset => B"0000",
211 gt_eyescandataerror =>
open,
214 gt_loopback => X"000",
218 -- RX Decision Feedback Equalizer (DFE) 219 gt_rxlpmen => B"1111",
220 gt_rxdfelpmreset => B"0000",
225 gt_txinhibit => "
0000",
227 gt_rxprbscntreset => B"0000",
228 gt_rxprbserr =>
open,
229 gt_rxprbssel => X"0000",
230 gt_txprbssel => X"0000",
231 gt_txprbsforceerr => B"0000",
232 gt_rxcdrhold => B"0000",
233 gt_dmonitorout =>
open,
234 gt_pcsrsvdin =>
(others => '0'
),
235 -- Configuration and Status 236 gt_rxdisperr =>
open,
237 gt_rxnotintable =>
open,
238 gt_rxcommadet =>
open,
239 signal_detect =>
(others => '1'
),
240 debug => status.debugVector,
241 configuration_vector => config.configVector,
242 status_vector => status.statusVector
);
245 U_XauiGthUltraScaleCore :
entity work.XauiGthUltraScale156p25MHz10GigECore
249 reset => status.areset,
251 clk156_lock => status.clkLock,
259 xaui_tx_l0_p =>
gtTxP(0),
260 xaui_tx_l0_n =>
gtTxN(0),
261 xaui_tx_l1_p =>
gtTxP(1),
262 xaui_tx_l1_n =>
gtTxN(1),
263 xaui_tx_l2_p =>
gtTxP(2),
264 xaui_tx_l2_n =>
gtTxN(2),
265 xaui_tx_l3_p =>
gtTxP(3),
266 xaui_tx_l3_n =>
gtTxN(3),
267 xaui_rx_l0_p =>
gtRxP(0),
268 xaui_rx_l0_n =>
gtRxN(0),
269 xaui_rx_l1_p =>
gtRxP(1),
270 xaui_rx_l1_n =>
gtRxN(1),
271 xaui_rx_l2_p =>
gtRxP(2),
272 xaui_rx_l2_n =>
gtRxN(2),
273 xaui_rx_l3_p =>
gtRxP(3),
274 xaui_rx_l3_n =>
gtRxN(3),
276 gt0_drpaddr =>
(others => '0'
),
278 gt0_drpdi => X"0000",
282 gt1_drpaddr =>
(others => '0'
),
284 gt1_drpdi => X"0000",
288 gt2_drpaddr =>
(others => '0'
),
290 gt2_drpdi => X"0000",
294 gt3_drpaddr =>
(others => '0'
),
296 gt3_drpdi => X"0000",
300 -- TX Reset and Initialisation 301 gt_txpmareset => B"0000",
302 gt_txpcsreset => B"0000",
303 gt_txresetdone =>
open,
304 -- RX Reset and Initialisation 305 gt_rxpmareset => B"0000",
306 gt_rxpcsreset => B"0000",
307 gt_rxpmaresetdone =>
open,
308 gt_rxresetdone =>
open,
310 gt_rxbufstatus =>
open,
311 gt_txphaligndone =>
open,
312 gt_txphinitdone =>
open,
313 gt_txdlysresetdone =>
open,
315 -- Signal Integrity adn Functionality 317 gt_eyescantrigger => B"0000",
318 gt_eyescanreset => B"0000",
319 gt_eyescandataerror =>
open,
322 gt_loopback => X"000",
326 -- RX Decision Feedback Equalizer (DFE) 327 gt_rxlpmen => B"1111",
328 gt_rxdfelpmreset => B"0000",
333 gt_txinhibit => "
0000",
335 gt_rxprbscntreset => B"0000",
336 gt_rxprbserr =>
open,
337 gt_rxprbssel => X"0000",
338 gt_txprbssel => X"0000",
339 gt_txprbsforceerr => B"0000",
340 gt_rxcdrhold => B"0000",
341 gt_dmonitorout =>
open,
342 gt_pcsrsvdin =>
(others => '0'
),
343 -- Configuration and Status 344 gt_rxdisperr =>
open,
345 gt_rxnotintable =>
open,
346 gt_rxcommadet =>
open,
347 signal_detect =>
(others => '1'
),
348 debug => status.debugVector,
349 configuration_vector => config.configVector,
350 status_vector => status.statusVector
);
353 U_XauiGthUltraScaleCore :
entity work.XauiGthUltraScale312p5MHz10GigECore
357 reset => status.areset,
359 clk156_lock => status.clkLock,
367 xaui_tx_l0_p =>
gtTxP(0),
368 xaui_tx_l0_n =>
gtTxN(0),
369 xaui_tx_l1_p =>
gtTxP(1),
370 xaui_tx_l1_n =>
gtTxN(1),
371 xaui_tx_l2_p =>
gtTxP(2),
372 xaui_tx_l2_n =>
gtTxN(2),
373 xaui_tx_l3_p =>
gtTxP(3),
374 xaui_tx_l3_n =>
gtTxN(3),
375 xaui_rx_l0_p =>
gtRxP(0),
376 xaui_rx_l0_n =>
gtRxN(0),
377 xaui_rx_l1_p =>
gtRxP(1),
378 xaui_rx_l1_n =>
gtRxN(1),
379 xaui_rx_l2_p =>
gtRxP(2),
380 xaui_rx_l2_n =>
gtRxN(2),
381 xaui_rx_l3_p =>
gtRxP(3),
382 xaui_rx_l3_n =>
gtRxN(3),
384 gt0_drpaddr =>
(others => '0'
),
386 gt0_drpdi => X"0000",
390 gt1_drpaddr =>
(others => '0'
),
392 gt1_drpdi => X"0000",
396 gt2_drpaddr =>
(others => '0'
),
398 gt2_drpdi => X"0000",
402 gt3_drpaddr =>
(others => '0'
),
404 gt3_drpdi => X"0000",
408 -- TX Reset and Initialisation 409 gt_txpmareset => B"0000",
410 gt_txpcsreset => B"0000",
411 gt_txresetdone =>
open,
412 -- RX Reset and Initialisation 413 gt_rxpmareset => B"0000",
414 gt_rxpcsreset => B"0000",
415 gt_rxpmaresetdone =>
open,
416 gt_rxresetdone =>
open,
418 gt_rxbufstatus =>
open,
419 gt_txphaligndone =>
open,
420 gt_txphinitdone =>
open,
421 gt_txdlysresetdone =>
open,
423 -- Signal Integrity adn Functionality 425 gt_eyescantrigger => B"0000",
426 gt_eyescanreset => B"0000",
427 gt_eyescandataerror =>
open,
430 gt_loopback => X"000",
434 -- RX Decision Feedback Equalizer (DFE) 435 gt_rxlpmen => B"1111",
436 gt_rxdfelpmreset => B"0000",
441 gt_txinhibit => "
0000",
443 gt_rxprbscntreset => B"0000",
444 gt_rxprbserr =>
open,
445 gt_rxprbssel => X"0000",
446 gt_txprbssel => X"0000",
447 gt_txprbsforceerr => B"0000",
448 gt_rxcdrhold => B"0000",
449 gt_dmonitorout =>
open,
450 gt_pcsrsvdin =>
(others => '0'
),
451 -- Configuration and Status 452 gt_rxdisperr =>
open,
453 gt_rxnotintable =>
open,
454 gt_rxcommadet =>
open,
455 signal_detect =>
(others => '1'
),
456 debug => status.debugVector,
457 configuration_vector => config.configVector,
458 status_vector => status.statusVector
);
467 U_XauiGthUltraScaleCore :
entity work.XauiGthUltraScale125MHz20GigECore
471 reset => status.areset,
473 clk156_lock => status.clkLock,
481 xaui_tx_l0_p =>
gtTxP(0),
482 xaui_tx_l0_n =>
gtTxN(0),
483 xaui_tx_l1_p =>
gtTxP(1),
484 xaui_tx_l1_n =>
gtTxN(1),
485 xaui_tx_l2_p =>
gtTxP(2),
486 xaui_tx_l2_n =>
gtTxN(2),
487 xaui_tx_l3_p =>
gtTxP(3),
488 xaui_tx_l3_n =>
gtTxN(3),
489 xaui_rx_l0_p =>
gtRxP(0),
490 xaui_rx_l0_n =>
gtRxN(0),
491 xaui_rx_l1_p =>
gtRxP(1),
492 xaui_rx_l1_n =>
gtRxN(1),
493 xaui_rx_l2_p =>
gtRxP(2),
494 xaui_rx_l2_n =>
gtRxN(2),
495 xaui_rx_l3_p =>
gtRxP(3),
496 xaui_rx_l3_n =>
gtRxN(3),
498 gt0_drpaddr =>
(others => '0'
),
500 gt0_drpdi => X"0000",
504 gt1_drpaddr =>
(others => '0'
),
506 gt1_drpdi => X"0000",
510 gt2_drpaddr =>
(others => '0'
),
512 gt2_drpdi => X"0000",
516 gt3_drpaddr =>
(others => '0'
),
518 gt3_drpdi => X"0000",
522 -- TX Reset and Initialisation 523 gt_txpmareset => B"0000",
524 gt_txpcsreset => B"0000",
525 gt_txresetdone =>
open,
526 -- RX Reset and Initialisation 527 gt_rxpmareset => B"0000",
528 gt_rxpcsreset => B"0000",
529 gt_rxpmaresetdone =>
open,
530 gt_rxresetdone =>
open,
532 gt_rxbufstatus =>
open,
533 gt_txphaligndone =>
open,
534 gt_txphinitdone =>
open,
535 gt_txdlysresetdone =>
open,
537 -- Signal Integrity adn Functionality 539 gt_eyescantrigger => B"0000",
540 gt_eyescanreset => B"0000",
541 gt_eyescandataerror =>
open,
544 gt_loopback => X"000",
548 -- RX Decision Feedback Equalizer (DFE) 549 gt_rxlpmen => B"1111",
550 gt_rxdfelpmreset => B"0000",
555 gt_txinhibit => "
0000",
557 gt_rxprbscntreset => B"0000",
558 gt_rxprbserr =>
open,
559 gt_rxprbssel => X"0000",
560 gt_txprbssel => X"0000",
561 gt_txprbsforceerr => B"0000",
562 gt_rxcdrhold => B"0000",
563 gt_dmonitorout =>
open,
564 gt_pcsrsvdin =>
(others => '0'
),
565 -- Configuration and Status 566 gt_rxdisperr =>
open,
567 gt_rxnotintable =>
open,
568 gt_rxcommadet =>
open,
569 signal_detect =>
(others => '1'
),
570 debug => status.debugVector,
571 configuration_vector => config.configVector,
572 status_vector => status.statusVector
);
575 U_XauiGthUltraScaleCore :
entity work.XauiGthUltraScale156p25MHz20GigECore
579 reset => status.areset,
581 clk156_lock => status.clkLock,
589 xaui_tx_l0_p =>
gtTxP(0),
590 xaui_tx_l0_n =>
gtTxN(0),
591 xaui_tx_l1_p =>
gtTxP(1),
592 xaui_tx_l1_n =>
gtTxN(1),
593 xaui_tx_l2_p =>
gtTxP(2),
594 xaui_tx_l2_n =>
gtTxN(2),
595 xaui_tx_l3_p =>
gtTxP(3),
596 xaui_tx_l3_n =>
gtTxN(3),
597 xaui_rx_l0_p =>
gtRxP(0),
598 xaui_rx_l0_n =>
gtRxN(0),
599 xaui_rx_l1_p =>
gtRxP(1),
600 xaui_rx_l1_n =>
gtRxN(1),
601 xaui_rx_l2_p =>
gtRxP(2),
602 xaui_rx_l2_n =>
gtRxN(2),
603 xaui_rx_l3_p =>
gtRxP(3),
604 xaui_rx_l3_n =>
gtRxN(3),
606 gt0_drpaddr =>
(others => '0'
),
608 gt0_drpdi => X"0000",
612 gt1_drpaddr =>
(others => '0'
),
614 gt1_drpdi => X"0000",
618 gt2_drpaddr =>
(others => '0'
),
620 gt2_drpdi => X"0000",
624 gt3_drpaddr =>
(others => '0'
),
626 gt3_drpdi => X"0000",
630 -- TX Reset and Initialisation 631 gt_txpmareset => B"0000",
632 gt_txpcsreset => B"0000",
633 gt_txresetdone =>
open,
634 -- RX Reset and Initialisation 635 gt_rxpmareset => B"0000",
636 gt_rxpcsreset => B"0000",
637 gt_rxpmaresetdone =>
open,
638 gt_rxresetdone =>
open,
640 gt_rxbufstatus =>
open,
641 gt_txphaligndone =>
open,
642 gt_txphinitdone =>
open,
643 gt_txdlysresetdone =>
open,
645 -- Signal Integrity adn Functionality 647 gt_eyescantrigger => B"0000",
648 gt_eyescanreset => B"0000",
649 gt_eyescandataerror =>
open,
652 gt_loopback => X"000",
656 -- RX Decision Feedback Equalizer (DFE) 657 gt_rxlpmen => B"1111",
658 gt_rxdfelpmreset => B"0000",
663 gt_txinhibit => "
0000",
665 gt_rxprbscntreset => B"0000",
666 gt_rxprbserr =>
open,
667 gt_rxprbssel => X"0000",
668 gt_txprbssel => X"0000",
669 gt_txprbsforceerr => B"0000",
670 gt_rxcdrhold => B"0000",
671 gt_dmonitorout =>
open,
672 gt_pcsrsvdin =>
(others => '0'
),
673 -- Configuration and Status 674 gt_rxdisperr =>
open,
675 gt_rxnotintable =>
open,
676 gt_rxcommadet =>
open,
677 signal_detect =>
(others => '1'
),
678 debug => status.debugVector,
679 configuration_vector => config.configVector,
680 status_vector => status.statusVector
);
683 U_XauiGthUltraScaleCore :
entity work.XauiGthUltraScale312p5MHz20GigECore
687 reset => status.areset,
689 clk156_lock => status.clkLock,
697 xaui_tx_l0_p =>
gtTxP(0),
698 xaui_tx_l0_n =>
gtTxN(0),
699 xaui_tx_l1_p =>
gtTxP(1),
700 xaui_tx_l1_n =>
gtTxN(1),
701 xaui_tx_l2_p =>
gtTxP(2),
702 xaui_tx_l2_n =>
gtTxN(2),
703 xaui_tx_l3_p =>
gtTxP(3),
704 xaui_tx_l3_n =>
gtTxN(3),
705 xaui_rx_l0_p =>
gtRxP(0),
706 xaui_rx_l0_n =>
gtRxN(0),
707 xaui_rx_l1_p =>
gtRxP(1),
708 xaui_rx_l1_n =>
gtRxN(1),
709 xaui_rx_l2_p =>
gtRxP(2),
710 xaui_rx_l2_n =>
gtRxN(2),
711 xaui_rx_l3_p =>
gtRxP(3),
712 xaui_rx_l3_n =>
gtRxN(3),
714 gt0_drpaddr =>
(others => '0'
),
716 gt0_drpdi => X"0000",
720 gt1_drpaddr =>
(others => '0'
),
722 gt1_drpdi => X"0000",
726 gt2_drpaddr =>
(others => '0'
),
728 gt2_drpdi => X"0000",
732 gt3_drpaddr =>
(others => '0'
),
734 gt3_drpdi => X"0000",
738 -- TX Reset and Initialisation 739 gt_txpmareset => B"0000",
740 gt_txpcsreset => B"0000",
741 gt_txresetdone =>
open,
742 -- RX Reset and Initialisation 743 gt_rxpmareset => B"0000",
744 gt_rxpcsreset => B"0000",
745 gt_rxpmaresetdone =>
open,
746 gt_rxresetdone =>
open,
748 gt_rxbufstatus =>
open,
749 gt_txphaligndone =>
open,
750 gt_txphinitdone =>
open,
751 gt_txdlysresetdone =>
open,
753 -- Signal Integrity adn Functionality 755 gt_eyescantrigger => B"0000",
756 gt_eyescanreset => B"0000",
757 gt_eyescandataerror =>
open,
760 gt_loopback => X"000",
764 -- RX Decision Feedback Equalizer (DFE) 765 gt_rxlpmen => B"1111",
766 gt_rxdfelpmreset => B"0000",
771 gt_txinhibit => "
0000",
773 gt_rxprbscntreset => B"0000",
774 gt_rxprbserr =>
open,
775 gt_rxprbssel => X"0000",
776 gt_txprbssel => X"0000",
777 gt_txprbsforceerr => B"0000",
778 gt_rxcdrhold => B"0000",
779 gt_dmonitorout =>
open,
780 gt_pcsrsvdin =>
(others => '0'
),
781 -- Configuration and Status 782 gt_rxdisperr =>
open,
783 gt_rxnotintable =>
open,
784 gt_rxcommadet =>
open,
785 signal_detect =>
(others => '1'
),
786 debug => status.debugVector,
787 configuration_vector => config.configVector,
788 status_vector => status.statusVector
);
794 -------------------------- 795 -- 10GBASE-R's Reset Logic 796 -------------------------- 799 RstSync_Inst :
entity work.
RstSync 810 -------------------------------- 811 -- Configuration/Status Register 812 -------------------------------- 813 U_XauiReg :
entity work.
XauiReg 819 -- Local Configurations 821 -- AXI-Lite Register Interface 828 -- Configuration and Status Interface out axiLiteReadSlaveAxiLiteReadSlaveType
in gtTxPostCursorslv( 19 downto 0) :=( others => '0')
out gtTxNslv( 3 downto 0)
AxiStreamSlaveType macTxAxisSlave
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
out xgmiiTxdslv( 63 downto 0)
in dmaIbSlaveAxiStreamSlaveType
in gtTxPolarityslv( 3 downto 0) := x"0"
out axiLiteWriteSlaveAxiLiteWriteSlaveType
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
in xgmiiRxcslv( 7 downto 0) :=( others => '0')
in ibMacPrimMasterAxiStreamMasterType
REF_CLK_FREQ_Greal := 156.25E+6
out xgmiiTxcslv( 7 downto 0)
in axiLiteReadMasterAxiLiteReadMasterType := AXI_LITE_READ_MASTER_INIT_C
out gtTxPslv( 3 downto 0)
AXI_ERROR_RESP_Gslv( 1 downto 0) := AXI_RESP_SLVERR_C
AxiStreamMasterType macRxAxisMaster
EN_AXI_REG_Gboolean := false
in obMacPrimSlaveAxiStreamSlaveType
in axiReadMasterAxiLiteReadMasterType
out axiReadSlaveAxiLiteReadSlaveType
in axiLiteWriteMasterAxiLiteWriteMasterType := AXI_LITE_WRITE_MASTER_INIT_C
slv( 1 downto 0) := "10" AXI_RESP_SLVERR_C
RELEASE_DELAY_Ginteger range 3 to positive'high:= 3
AxiStreamCtrlType macRxAxisCtrl
out obMacPrimMasterAxiStreamMasterType
in gtRxPolarityslv( 3 downto 0) := x"0"
in xgmiiRxdslv( 63 downto 0) :=( others => '0')
in gtTxDiffCtrlslv( 15 downto 0) := x"CCCC"
out dmaObSlaveAxiStreamSlaveType
out dmaIbMasterAxiStreamMasterType
slv( 5 downto 0) debugVector
out ibMacPrimSlaveAxiStreamSlaveType
PRIM_CONFIG_GAxiStreamConfigType := EMAC_AXIS_CONFIG_C
in localMacslv( 47 downto 0) := MAC_ADDR_INIT_C
in gtTxPreCursorslv( 19 downto 0) :=( others => '0')
EN_AXI_REG_Gboolean := false
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
AxiStreamMasterType macTxAxisMaster
in axiWriteMasterAxiLiteWriteMasterType
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 dmaObMasterAxiStreamMasterType
in ethConfigEthMacConfigType
AXIS_CONFIG_GAxiStreamConfigType := AXI_STREAM_CONFIG_INIT_C
out ethStatusEthMacStatusType
XAUI_20GIGE_Gboolean := false
out axiWriteSlaveAxiLiteWriteSlaveType