SURF  1.0
DeviceDna.vhd
Go to the documentation of this file.
1 -------------------------------------------------------------------------------
2 -- File : DeviceDna.vhd
3 -- Company : SLAC National Accelerator Laboratory
4 -- Created : 2015-06-17
5 -- Last update: 2016-12-01
6 -------------------------------------------------------------------------------
7 -- Description: Wrapper for the 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 -------------------------------------------------------------------------------
17 
18 library ieee;
19 use ieee.std_logic_1164.all;
20 
21 use work.StdRtlPkg.all;
22 use work.TextUtilPkg.all;
23 
24 --! @see entity
25  --! @ingroup xilinx_general
26 entity DeviceDna is
27  generic (
28  TPD_G : time := 1 ns;
29  XIL_DEVICE_G : string := "7SERIES"; -- Either "7SERIES" or "ULTRASCALE"
30  USE_SLOWCLK_G : boolean := false;
31  BUFR_CLK_DIV_G : positive := 8;
32  RST_POLARITY_G : sl := '1';
33  SIM_DNA_VALUE_G : slv := X"000000000000000000000000");
34  port (
35  clk : in sl;
36  rst : in sl;
37  slowClk : in sl := '0';
38  dnaValue : out slv(127 downto 0);
39  dnaValid : out sl);
40 end DeviceDna;
41 
42 architecture rtl of DeviceDna is
43 
44  component DeviceDna7Series is
45  generic (
46  TPD_G : time;
47  USE_SLOWCLK_G : boolean;
48  BUFR_CLK_DIV_G : string;
50  SIM_DNA_VALUE_G : bit_vector);
51  port (
52  clk : in sl;
53  rst : in sl;
54  slowClk : in sl := '0';
55  dnaValue : out slv(55 downto 0);
56  dnaValid : out sl);
57  end component DeviceDna7Series;
58 
59  component DeviceDnaUltraScale is
60  generic (
61  TPD_G : time;
62  USE_SLOWCLK_G : boolean;
63  BUFR_CLK_DIV_G : natural;
66  port (
67  clk : in sl;
68  rst : in sl;
69  slowClk : in sl := '0';
70  dnaValue : out slv(95 downto 0);
71  dnaValid : out sl);
72  end component DeviceDnaUltraScale;
73 
74 begin
75 
76  GEN_7SERIES : if (XIL_DEVICE_G = "7SERIES") generate
77  DeviceDna7Series_Inst : DeviceDna7Series
78  generic map (
79  TPD_G => TPD_G,
81  BUFR_CLK_DIV_G => str(BUFR_CLK_DIV_G, 10),
83  SIM_DNA_VALUE_G => to_bitvector(SIM_DNA_VALUE_G))
84  port map (
85  clk => clk,
86  rst => rst,
87  slowClk => slowClk,
88  dnaValue => dnaValue(55 downto 0),
89  dnaValid => dnaValid);
90  dnaValue(127 downto 56) <= (others=>'0');
91  end generate;
92 
93  GEN_ULTRA_SCALE : if (XIL_DEVICE_G = "ULTRASCALE") generate
94  DeviceDnaUltraScale_Inst : DeviceDnaUltraScale
95  generic map (
96  TPD_G => TPD_G,
101  port map (
102  clk => clk,
103  rst => rst,
104  slowClk => slowClk,
105  dnaValue => dnaValue(95 downto 0),
106  dnaValid => dnaValid);
107  dnaValue(127 downto 96) <= (others=>'0');
108  end generate;
109 
110 end rtl;
USE_SLOWCLK_Gboolean := false
BUFR_CLK_DIV_Gstring := "8"
std_logic sl
Definition: StdRtlPkg.vhd:28
out dnaValidsl
Definition: DeviceDna.vhd:39
SIM_DNA_VALUE_Gslv := X"000000000000000000000000"
Definition: DeviceDna.vhd:33
in clksl
Definition: DeviceDna.vhd:35
out dnaValueslv( 95 downto 0)
SIM_DNA_VALUE_Gbit_vector := X"000000000000000"
in slowClksl := '0'
Definition: DeviceDna.vhd:37
USE_SLOWCLK_Gboolean := false
out dnaValueslv( 55 downto 0)
out dnaValueslv( 127 downto 0)
Definition: DeviceDna.vhd:38
BUFR_CLK_DIV_Gpositive := 8
Definition: DeviceDna.vhd:31
USE_SLOWCLK_Gboolean := false
Definition: DeviceDna.vhd:30
SIM_DNA_VALUE_Gslv := X"000000000000000000000000"
RST_POLARITY_Gsl := '1'
Definition: DeviceDna.vhd:32
TPD_Gtime := 1 ns
Definition: DeviceDna.vhd:28
XIL_DEVICE_Gstring := "7SERIES"
Definition: DeviceDna.vhd:29
in rstsl
Definition: DeviceDna.vhd:36
std_logic_vector slv
Definition: StdRtlPkg.vhd:29