1 ------------------------------------------------------------------------------- 2 -- File : GtpTxPhaseAligner.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2012-11-12 5 -- Last update: 2012-12-06 6 ------------------------------------------------------------------------------- 7 -- Description: GTH7 TX phase aligner 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
23 --! @ingroup xilinx_Virtex5_gtp 37 end entity GtpTxPhaseAligner;
41 type StateType is (PHASE_ALIGN_S, SET_PHASE_S, ALIGNED_S);
43 type RegType is record 45 counter : (13 downto 0);
50 signal r, rin : RegType;
57 r.state <= PHASE_ALIGN_S after TPD_G;
58 r.counter <= (others => '0') after TPD_G;
79 v.counter := r.counter + 1;
80 if (r.counter(9) = '1') then -- Count reached 512 81 v.counter := (others => '0');
82 v.state := SET_PHASE_S;
88 v.counter := r.counter + 1;
89 if (r.counter(13) = '1') then -- Count reached 16384 107 end architecture rtl;
out gtpTxEnPmaPhaseAlignstd_logic
out gtpTxPmaSetPhasestd_logic
in gtpPllLockDetectstd_logic
out gtpTxAlignedstd_logic