1 -------------------------------------------------------------------------------     2 -- File       : JesdSyncFsmTxTest.vhd      3 -- Company    : SLAC National Accelerator Laboratory     4 -- Created    : 2015-04-14     5 -- Last update: 2015-04-14     6 -------------------------------------------------------------------------------     7 -- Description: Synchronizer for simple TX Finite state machine     8 --              Finite state machine for sub-class 1 deterministic latency     9 --              lane synchronization.    10 -------------------------------------------------------------------------------    11 -- This file is part of 'SLAC Firmware Standard Library'.    12 -- It is subject to the license terms in the LICENSE.txt file found in the     13 -- top-level directory of this distribution and at:     14 --    https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.     15 -- No part of 'SLAC Firmware Standard Library', including this file,     16 -- may be copied, modified, propagated, or distributed except according to     17 -- the terms contained in the LICENSE.txt file.    18 -------------------------------------------------------------------------------    21 use ieee.std_logic_1164.
all;
    22 use ieee.std_logic_arith.
all;
    23 use ieee.std_logic_unsigned.
all;
    29  --! @ingroup protocols_jesd204b    41       -- JESD subclass selection: '0' or '1'(default)         44       -- Local multi frame clock    47       -- Synchronization request    52       -- Synchronization process is complete start sending data     57 end JesdSyncFsmTxTest;
    68    type RegType is record    69       -- Synchronous FSM control outputs    72       cnt         : slv(7 downto 0);
    78    constant REG_INIT_C : RegType := (    81       cnt          =>  (others => '0'),    87    signal r   : RegType := REG_INIT_C;
    96       -- Latch the current value   101          ----------------------------------------------------------------------   105             v.cnt       := (others => '0');
   109             -- Next state condition               113          ----------------------------------------------------------------------   117             v.cnt       := (others => '0');
   121             -- Next state condition   135          ----------------------------------------------------------------------   139             v.cnt       := (others => '0');
   143             -- Next state condition               145          ----------------------------------------------------------------------   149             v.cnt       := r.cnt+GT_WORD_SIZE_C;
 -- two or four data bytes sent in parallel   153             -- Next state condition               157          ----------------------------------------------------------------------         161             v.cnt       := (others => '0');
   165             -- Next state condition               167       ----------------------------------------------------------------------   175       -- Register the variable for next clock cycle   180    seq : 
process (
clk) 
is   182       if rising_edge(clk) then   183          r <= rin after TPD_G;
   191 ---------------------------------------------- 
positive  := 4 GT_WORD_SIZE_C
 
out testCntr_oslv( 7 downto  0)