1 ------------------------------------------------------------------------------- 2 -- File : JesdTxLane.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2015-04-14 5 -- Last update: 2015-04-24 6 ------------------------------------------------------------------------------- 7 -- Description: JesdTx transmit single lane module 8 -- Transmitter for JESD204b standard. 9 -- Supports sub-class 1 deterministic latency. 10 -- Supports sub-class 0 non deterministic latency 12 -- - Synchronization FSM 13 -- - Comma transmission 14 -- - ILA Sequence generation 15 -- - Control character generation: 16 -- - A(K28.3) - x"7C" - End of multi-frame 17 -- - F(K28.7) - x"FC" - Inserted at the end of the frame 18 -- Status register encoding: 19 -- bit 0: GT Reset done 20 -- bit 1: Transmuting valid data 21 -- bit 2: Transmitting ILA sequence 22 -- bit 3: Synchronization input status 23 -- bit 4: TX module enabled status 24 -- bit 5: SysRef detected (active only when the lane is enabled) 26 -- Note: sampleData_i should be big endian and not byte swapped 27 -- First sample in time: sampleData_i(31 downto 16) 28 -- Second sample in time: sampleData_i(15 downto 0) 29 ------------------------------------------------------------------------------- 30 -- This file is part of 'SLAC Firmware Standard Library'. 31 -- It is subject to the license terms in the LICENSE.txt file found in the 32 -- top-level directory of this distribution and at: 33 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 34 -- No part of 'SLAC Firmware Standard Library', including this file, 35 -- may be copied, modified, propagated, or distributed except according to 36 -- the terms contained in the LICENSE.txt file. 37 ------------------------------------------------------------------------------- 40 use ieee.std_logic_1164.
all;
41 use ieee.std_logic_arith.
all;
42 use ieee.std_logic_unsigned.
all;
48 --! @ingroup protocols_jesd204b 62 -- JESD subclass selection: '0' or '1'(default) 71 -- Local multi frame clock 74 -- Synchronization request input 77 -- GT is ready to transmit data after reset 80 -- SYSREF for subclass 1 fixed latency 83 -- Status of the transmitter 89 -- Data and character output and GT signals 98 -- Control signals from FSM 99 signal s_dataValid : sl;
101 signal s_refDetected: sl;
111 signal s_data_sel : slv(1 downto 0);
115 -- Synchronization FSM 134 ---------------------------------------------------- 135 -- Comma character generation 137 s_commaDataMux(I*8+7 downto I*8) <= K_CHAR_C;
138 s_commaKMux(I) <= '1';
139 end generate COMMA_GEN;
141 ---------------------------------------------------- 142 -- Initial Synchronization Data Sequence (ILAS) 156 ---------------------------------------------------- 157 -- Sample data with added synchronization characters TODO 174 ---------------------------------------------------- 175 -- Output multiplexers 176 s_data_sel <= s_dataValid & s_ila;
178 with s_data_sel select 181 s_sampleKMux when "10", 182 s_commaKMux when others;
184 with s_data_sel select 186 s_ilaDataMux when "01", 187 s_sampleDataMux when "10", 188 s_commaDataMux when others;
192 --------------------------------------------
out ilasK_oslv( GT_WORD_SIZE_C- 1 downto 0)
slv( GT_WORD_SIZE_C- 1 downto 0) dataK
positive := 6 TX_STAT_WIDTH_C
NUM_ILAS_MF_Gpositive := 4
in sampleData_islv( GT_WORD_SIZE_C* 8- 1 downto 0)
out status_oslv( TX_STAT_WIDTH_C- 1 downto 0)
slv( 7 downto 0) := x"BC" K_CHAR_C
positive := 4 GT_WORD_SIZE_C
out sampleData_oslv( GT_WORD_SIZE_C* 8- 1 downto 0)
in sampleData_islv(( GT_WORD_SIZE_C* 8)- 1 downto 0)
out r_jesdGtTxjesdGtTxLaneType
out sampleK_oslv( GT_WORD_SIZE_C- 1 downto 0)
out ilasData_oslv( GT_WORD_SIZE_C* 8- 1 downto 0)
slv(( GT_WORD_SIZE_C* 8)- 1 downto 0) data