1 ------------------------------------------------------------------------------- 2 -- File : Pgp2bTxCell.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2009-05-27 5 -- Last update: 2017-03-28 6 ------------------------------------------------------------------------------- 8 -- Cell Transmit interface module for the Pretty Good Protocol core. 9 ------------------------------------------------------------------------------- 10 -- This file is part of 'SLAC Firmware Standard Library'. 11 -- It is subject to the license terms in the LICENSE.txt file found in the 12 -- top-level directory of this distribution and at: 13 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 14 -- No part of 'SLAC Firmware Standard Library', including this file, 15 -- may be copied, modified, propagated, or distributed except according to 16 -- the terms contained in the LICENSE.txt file. 17 ------------------------------------------------------------------------------- 20 use ieee.std_logic_1164.
all;
21 use ieee.std_logic_arith.
all;
22 use ieee.std_logic_unsigned.
all;
27 --! @ingroup protocols_pgp_pgp2b_core 36 -- System clock, reset & control 44 -- Phy Transmit Interface 52 -- Transmit Scheduler Interface 61 -- Frame Transmit Interface, VC 0 72 -- Frame Transmit Interface, VC 1 83 -- Frame Transmit Interface, VC 2 94 -- Frame Transmit Interface, VC 3 105 -- Transmit CRC Interface 109 crcTxOut : in slv(31 downto 0) -- Transmit calculated CRC value 115 -- Define architecture 162 -- Transmit Data Marker 229 -- Choose data for SOF & EOF Positions 232 -- SOF, vc number and serial number 235 socWord(i*16+7 downto i*16) <= (others=>'0');
237 -- EOF, buffer status 240 eocWord(i*16+7 downto i*16) <= (others=>'0');
244 -- Simple state machine to control transmission of data frames 279 -- Outgoing ready signal 303 -- Register timeout request 331 -- Overflow Latch Until Send 367 -- Async state control 389 -- Cell transmit request 411 -- Send first charactor of cell, assert ready 433 -- Move on to normal data 445 -- Timeout frame, force EOFE 452 -- Valid is de-asserted 458 -- One or two CRC words? 491 -- Keep sending cell data 512 -- One or two CRC words? 567 -- Delay chain to allow CRC data to catch up. 606 -- Output to CRC engine 612 -- CRC Data, Single lane, split into two 16-bit values 620 -- CRC Data, Multi lane, send one 32-bit value 626 crcWordB(31 downto 0) <= (others=>'0');
slv( 2 downto 0) nxtTypeLast
slv( 5 downto 0) vc0Serial
slv( TX_LANE_CNT_G* 16- 1 downto 0) eocWord
slv( TX_LANE_CNT_G* 16- 1 downto 0) nxtData
in vc3FrameTxDataslv( TX_LANE_CNT_G* 16- 1 downto 0)
slv( 2 downto 0) := "110" ST_CRCB_C
slv( TX_LANE_CNT_G* 16- 1 downto 0) dly2Data
slv( 2 downto 0) := "110" TX_CRCA_C
slv( 2 downto 0) curState
slv( 2 downto 0) nxtState
out crcTxInslv( TX_LANE_CNT_G* 16- 1 downto 0)
slv( 5 downto 0) vc3Serial
slv( 2 downto 0) curTypeLast
slv( 2 downto 0) := "101" TX_EOFE_C
slv( 5 downto 0) vc2Serial
slv( TX_LANE_CNT_G* 16- 1 downto 0) crcWordB
in vc1FrameTxDataslv( TX_LANE_CNT_G* 16- 1 downto 0)
slv( 2 downto 0) := "001" ST_IDLE_C
slv( 2 downto 0) := "000" TX_DATA_C
in vc2FrameTxDataslv( TX_LANE_CNT_G* 16- 1 downto 0)
slv( 2 downto 0) := "101" ST_CRCA_C
in schTxDataVcslv( 1 downto 0)
slv( 2 downto 0) dly0Type
out cellTxDataslv( TX_LANE_CNT_G* 16- 1 downto 0)
slv( TX_LANE_CNT_G* 16- 1 downto 0) crcWordA
slv( 2 downto 0) := "100" TX_EOF_C
slv( 5 downto 0) muxSerial
PAYLOAD_CNT_TOP_Ginteger := 7
slv( 3 downto 0) intOverflow
slv( 2 downto 0) := "010" ST_EMPTY_C
slv( 5 downto 0) vc1Serial
slv( TX_LANE_CNT_G* 16- 1 downto 0) dly3Data
slv( 2 downto 0) := "111" TX_CRCB_C
slv( 2 downto 0) := "100" ST_DATA_C
slv( TX_LANE_CNT_G* 16- 1 downto 0) muxFrameTxData
slv( 2 downto 0) := "011" ST_SOC_C
slv( 2 downto 0) dly2Type
slv( TX_LANE_CNT_G* 16- 1 downto 0) socWord
slv( 2 downto 0) := "010" TX_SOF_C
slv( PAYLOAD_CNT_TOP_G downto 0) cellCnt
slv( 2 downto 0) := "011" TX_EOC_C
slv( 2 downto 0) := "111" ST_EOC_C
slv( TX_LANE_CNT_G* 16- 1 downto 0) dly0Data
slv( TX_LANE_CNT_G* 16- 1 downto 0) dly1Data
TX_LANE_CNT_Ginteger range 1 to 2:= 1
slv( 2 downto 0) dly1Type
in vc0FrameTxDataslv( TX_LANE_CNT_G* 16- 1 downto 0)
slv( 2 downto 0) dly3Type
slv( 2 downto 0) dly4Type
in crcTxOutslv( 31 downto 0)
slv( TX_LANE_CNT_G* 16- 1 downto 0) dly4Data
slv( 2 downto 0) := "001" TX_SOC_C