1 ------------------------------------------------------------------------------- 2 -- File : Gtp7CfgPkg.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2014-09-02 5 -- Last update: 2016-11-04 6 ------------------------------------------------------------------------------- 7 -- Description: Provides useful functions for generating GTP7 configurations. 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 ------------------------------------------------------------------------------- 20 use IEEE.STD_LOGIC_1164.
all;
21 use IEEE.STD_LOGIC_UNSIGNED.
all;
22 use IEEE.STD_LOGIC_ARITH.
all;
29 --! @ingroup xilinx_7Series_gtp7 31 ------------------------------------------------------------------------------------------------- 32 -- QPLL Config Types, Constants and Function declarations 33 ------------------------------------------------------------------------------------------------- 55 end package Gtp7CfgPkg;
59 ------------------------------------------------------------------------------------------------- 61 ------------------------------------------------------------------------------------------------- 73 -- Walk through all possible configs and look for one that works 93 -- report "Found GTX config: " & lf & 94 -- "refClkFreq: " & real'image(refClkFreq) & lf & 95 -- "lineRate: " & real'image(lineRate) & lf & 96 -- "QPLL_REFCLK_DIV_G: " & integer'image(ret.QPLL_REFCLK_DIV_G) & lf & 97 -- "QPLL_FBDIV_G: " & integer'image(ret.QPLL_FBDIV_G) & lf & 98 -- "QPLL_FBDIV_45_G: " & integer'image(ret.QPLL_FBDIV_45_G) & lf & 99 -- "OUT_DIV_G: " & integer'image(ret.OUT_DIV_G) & lf 109 assert (found
) report "getGtp7QPllCfg: no feasible configuration found for refClkFreq: " &
110 '
image(refClkFreq
) &
" and lineRate: " & '
image(lineRate
) severity failure;
125 end package body Gtp7CfgPkg;
real := 3.3E9 QPLL_HIGH_C
IntegerArray :=( 1, 2) QPLL_REFCLK_DIV_VALIDS_C
Gtp7QPllCfgType getGtp7QPllCfgrefClkFreq,lineRate,
integer QPLL_REFCLK_DIV_G
IntegerArray :=( 1, 2, 3, 4, 5) QPLL_FBDIV_VALIDS_C
IntegerArray :=( 4, 5) QPLL_FBDIV_45_VALIDS_C
IntegerArray :=( 1, 2, 4, 8) QPLL_OUT_DIV_VALIDS_C
Gtp7QPllCfgType itei,t,e,
array(natural range <> ) of integer IntegerArray