1 ------------------------------------------------------------------------------- 2 -- File : Pgp2bTxSched.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2009-05-27 5 -- Last update: 2017-03-28 6 ------------------------------------------------------------------------------- 8 -- Transmit scheduler 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 47 -- Cell Transmit Interface 56 -- VC Data Valid Signals 62 -- VC Flow Control Signals 72 -- Define architecture 114 -- State transition logic 125 -- Force state to select state when link goes down 143 -- Scheduler state machine 148 -- Held in reset due to non-link 153 nextVc <= (others => '0');
156 -- IDLE, wait for ack receiver to be ready 187 -- Non-interleave mode and current is in frame 194 -- Else use new arb winner if valid 203 -- Transmit Cell Data 217 -- Wait between cells 225 -- Wait between cells 233 -- Wait between cells 246 nextVc <= (others => '0');
251 -- Gate valid signals based upon flow control 257 -- Current owner has valid asserted 265 -- Arbitrate for the next VC value based upon current VC value and status of valid inputs 299 -- Lock in the status of the last cell transmitted 306 -- Link is down or flush requested, reset status 311 -- Update state of VC, track if VC is currently in frame or not 325 -- Detect frame transmit timeout, enabled only in VC non interleave mode
out schTxDataVcslv( 1 downto 0)
slv( 2 downto 0) := "100" ST_GAP_A_C
slv( 3 downto 0) vcTimeout
slv( 23 downto 0) vcTimerD
slv( 2 downto 0) := "011" ST_CELL_C
slv( 2 downto 0) := "001" ST_RST_C
slv( 2 downto 0) := "110" ST_GAP_C_C
slv( 2 downto 0) := "101" ST_GAP_B_C
slv( 2 downto 0) := "010" ST_ARB_C
slv( 2 downto 0) curState
slv( 2 downto 0) nxtState
NUM_VC_EN_Ginteger range 1 to 4:= 4
slv( 23 downto 0) vcTimerC
VC_INTERLEAVE_Ginteger := 1
slv( 23 downto 0) vcTimerA
slv( 3 downto 0) vcInFrame
slv( 3 downto 0) gateTxValid
slv( 23 downto 0) vcTimerB