--Time tool files files.  Need to be modified to enable time stamping.

 

--TimeToolKCU1500.vhd

--TimeToolCore.vhd

--TimingCore.vhd

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

--These files below have the "EVR code" we want to adapt and apply to the TimeTool files above.

 

--EvrCardG2.vhd

--EvrCardG2gCore.vhd

--EvrCardG2GMux.vhd

 

--these files above can be found in these github links

--https://github.com/slaclab/lcls-timing-core/blob/release-lcls2/LCLS-II/core/rtl/TimingGthWrapper.vhd

--https://github.com/slaclab/lcls-timing-core/blob/release-lcls2/LCLS-II/core/rtl/TimingCore.vhd

 

--And he suggested that we use this example high-level design to see how to reuse the above:

 

--https://github.com/slaclab/evr-card-g2

 

 

 

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

---tracking down parts of the evr time stamping to copy into time tool vhd code

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

 

 TimingCore_1: entity work.TimingCore

     generic map (

       TPD_G             => TPD_G,

       TPGEN_G           => false,

       USE_TPGMINI_G     => false,

       AXIL_RINGB_G      => true,

       ASYNC_G           => false,

       AXIL_BASE_ADDR_G  => AXI_CROSSBAR_MASTERS_CONFIG_C(CORE_INDEX_C).baseAddr,

       AXIL_ERROR_RESP_G => AXI_RESP_DECERR_C)

     port map (

-- kwarg

passed value

       gtTxUsrClk      => txPhyClk, --g2gmux 396

       gtTxUsrRst      => txPhyRst, --g2gmux 397

       gtRxRecClk      => evrClk, --g2gmux 388

       gtRxData        => rxData, --g2gmux 394

       gtRxDataK       => rxDataK, --g2gmux 395

       gtRxDispErr     => rxDspErr, --g2gmux 392

       gtRxDecErr      => rxDecErr, --g2gmux 393

       gtRxControl     => rxControl, --output

       gtRxStatus      => rxStatus, --g2gmux 389 (inverse on line 428)

       appTimingClk    => evrClk, --g2gmux 388

       appTimingRst    => evrRst, --g2gmux 389

       appTimingBus    => appTimingBus,  --g2gmux 396

       exptBus         => exptBus, --output

       timingPhy       => open, --output

       timingClkSel    => evrModeSel, --g2gmux 377

       axilClk         => axiClk, --g2gmux 375

       axilRst         => axiRst, --g2gmux 376

       axilReadMaster  => mAxiReadMasters (CORE_INDEX_C),

--

       axilReadSlave   => mAxiReadSlaves  (CORE_INDEX_C),

--output

       axilWriteMaster => mAxiWriteMasters(CORE_INDEX_C),

       axilWriteSlave  => mAxiWriteSlaves (CORE_INDEX_C));

--output

 

 

 

 

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

 

architecture mapping of EvrCardG2Core is

 

   -- Constants

   constant BAR_SIZE_C : positive := 1;

   constant DMA_SIZE_C : positive := 1;

   constant AXI_CLK_FREQ_C : real := 125.0e6;

   

   -- AXI-Lite Signals

   signal axiLiteWriteMaster : AxiLiteWriteMasterArray(BAR_SIZE_C-1 downto 0);

   signal axiLiteWriteSlave  : AxiLiteWriteSlaveArray (BAR_SIZE_C-1 downto 0);

   signal axiLiteReadMaster  : AxiLiteReadMasterArray (BAR_SIZE_C-1 downto 0);

   signal axiLiteReadSlave   : AxiLiteReadSlaveArray  (BAR_SIZE_C-1 downto 0);

 

   constant NUM_AXI_MASTERS_C : natural := 7;

 

   constant VERSION_INDEX_C  : natural := 0;

   constant BOOT_MEM_INDEX_C : natural := 1;

   constant XADC_INDEX_C     : natural := 2;

   constant XBAR_INDEX_C     : natural := 3;

   constant LED_INDEX_C      : natural := 4;

   constant TPR_INDEX_C      : natural := 5;

   constant CORE_INDEX_C     : natural := 6;

 

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

---------------------------------------------------------------------------------

 

 

 

     EvrCardG2Gtx_Inst : entity work.EvrCardG2GMux

       generic map (

         TPD_G         => TPD_G )

       port map (

-- kwarg

passed value

         axiClk     => axiClk, --already have in timetoolkcu. don't know from where

         axiRst     => axiRst, --already have in timetoolkcu. don't know from where

         evrSel     => evrModeSel, --g2gmux 377

         -- EVR Ports

         evrRefClkP => evrRefClkP, --physical pin?

         evrRefClkN => evrRefClkN, --physical pin?

         evrRxP     => evrRxP, --physical pin?

         evrRxN     => evrRxN, --physical pin?

         evrTxP     => evrTxP, --output

         evrTxN     => evrTxN, --output

         -- EVR Interface

         rxReset    => rxControl.reset,

         rxPolarity => rxControl.polarity,

         evrClk     => evrClk, --output

         evrRst     => evrRst, --output

         rxLinkUp   => rxLinkUp, --output

         rxError    => rxError , --output

         rxDspErr   => rxDspErr, --output

         rxDecErr   => rxDecErr, --output

         rxData     => rxData  , --output

         rxDataK    => rxDataK , --output

         evrTxClk   => txPhyClk, --output

         evrTxRst   => txPhyRst, --output

         txInhibit  => '0', 

         txData     => txData  , --input from originates in DaqControlTx_1 in evrcardg2gcore.vhd line 476.

         txDataK    => txDataK ); --input from originates in DaqControlTx_1 in evrcardg2gcore.vhd line 477.

  • No labels