1 ------------------------------------------------------------------------------- 2 -- File : DeviceDnaUltraScale.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2015-06-17 5 -- Last update: 2016-04-13 6 ------------------------------------------------------------------------------- 7 -- Description: Wrapper for the UltraScale DNA_PORT 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;
20 use ieee.std_logic_arith.
all;
21 use ieee.std_logic_unsigned.
all;
29 --! @ingroup xilinx_UltraScale_general 43 end DeviceDnaUltraScale;
47 constant DNA_SHIFT_LENGTH_C : := 96;
49 type StateType is (READ_S, SHIFT_S, DONE_S);
51 type RegType is record 53 bitCount : range 0 to DNA_SHIFT_LENGTH_C-1;
60 constant REG_INIT_C : RegType := ( 68 signal r : RegType := REG_INIT_C;
78 locClk <= slowClk
when(USE_SLOWCLK_G)
else divClk;
80 BUFGCE_DIV_Inst : BUFGCE_DIV
89 RstSync_Inst :
entity work.
RstSync 98 comb :
process (dnaDout, locRst, r)
is 101 -- Latch the current value 104 -- Reset the strobing signals 110 ---------------------------------------------------------------------- 112 -- Check the read strobe status 113 if r.dnaRead = '0' then 114 -- Strobe the read of the DNA port 119 ---------------------------------------------------------------------- 121 -- Shift the data out 123 -- Check the shift strobe status 124 if r.dnaShift = '1' then 127 -- Increment the counter 128 v.bitCount := r.bitCount + 1;
129 -- Check the counter value 130 if (r.bitCount = DNA_SHIFT_LENGTH_C-1) then 135 ---------------------------------------------------------------------- 139 ---------------------------------------------------------------------- 147 -- Register the variable for next clock cycle 152 sync :
process (locClk)
is 154 if (falling_edge(locClk)) then 155 r <= rin after TPD_G;
159 DNA_PORT_I : DNA_PORTE2
BUFR_CLK_DIV_Gnatural := 8
in dataInslv( WIDTH_G- 1 downto 0)
out dnaValueslv( 95 downto 0)
USE_SLOWCLK_Gboolean := false
out dataOutslv( WIDTH_G- 1 downto 0)
SIM_DNA_VALUE_Gslv := X"000000000000000000000000"