eFEX firmware  1.7.3
ATLAS l1-calo - electron and tau feature extraction firmware for eFEX boards

Back to eFEX documentation
lib_registers.vhd
Go to the documentation of this file.
1 
5 library IEEE;
6 use IEEE.STD_LOGIC_1164.all;
7 use ieee.numeric_std.all;
8 library ipbus_lib;
9 use ipbus_lib.ipbus.all;
10 use ipbus_lib.ipbus_reg_types.all;
11 library infrastructure_lib;
12 use infrastructure_lib.ipbus_decode_efex_lib_version.all;
13 
15 entity lib_registers is
16 
17  port(
18  ipb_clk : in std_logic;
19  ipb_rst : in std_logic;
20  ipb_in : in ipb_wbus;
21  ipb_out : out ipb_rbus;
22  constraints_gitsha : in std_logic_vector(31 downto 0);
23  constraints_version : in std_logic_vector(31 downto 0);
24  hog_gitsha : in std_logic_vector(31 downto 0);
25  hog_version : in std_logic_vector(31 downto 0);
26  top_version : in std_logic_vector(31 downto 0);
27  top_gitsha : in std_logic_vector(31 downto 0);
28  infra_version : in std_logic_vector(31 downto 0);
29  infra_gitsha : in std_logic_vector(31 downto 0);
30  algo_version : in std_logic_vector(31 downto 0);
31  algo_gitsha : in std_logic_vector(31 downto 0);
32  readout_version : in std_logic_vector(31 downto 0);
33  readout_gitsha : in std_logic_vector(31 downto 0);
34  ipbus_gitsha : in std_logic_vector(31 downto 0)
35  );
36 
37 
38 end lib_registers;
39 
41 architecture Behavioral of lib_registers is
42 
43  signal sel : integer;
44  signal ack : std_logic;
45  signal ipbw : ipb_wbus_array(N_SLAVES-1 downto 0);
46  signal ipbr, ipbr_d : ipb_rbus_array(N_SLAVES-1 downto 0);
47 
48 begin
49 
50 
51  fabric_lib_version : entity ipbus_lib.ipbus_fabric_sel
52  generic map(NSLV => N_SLAVES, --defined in ipbus_decode_efex_libVersion
53  SEL_WIDTH => ipbus_sel_width)
54  port map(
55  ipb_in => ipb_in,
56  ipb_out => ipb_out,
57  sel => ipbus_sel_efex_lib_version (ipb_in.ipb_addr),
58  ipb_to_slaves => ipbw,
59  ipb_from_slaves => ipbr
60  );
61 
62  constraints : entity ipbus_lib.ipbus_ctrlreg_v
63  generic map (
64  N_CTRL => 0,
65  N_STAT => 2)
66  port map (
67  clk => ipb_clk,
68  reset => ipb_rst,
69  ipbus_in => ipbw(N_SLV_CONSTRAINTS),
70  ipbus_out => ipbr(N_SLV_CONSTRAINTS),
71  d => (1 => constraints_gitsha, 0 => constraints_version),
72  q => open,
73  stb => open);
74 
75  hog : entity ipbus_lib.ipbus_ctrlreg_v
76  generic map (
77  N_CTRL => 0,
78  N_STAT => 2)
79  port map (
80  clk => ipb_clk,
81  reset => ipb_rst,
82  ipbus_in => ipbw(N_SLV_HOG),
83  ipbus_out => ipbr(N_SLV_HOG),
84  d => (1 => hog_gitsha, 0 => hog_version),
85  q => open,
86  stb => open);
87 
88  top_directory : entity ipbus_lib.ipbus_ctrlreg_v
89  generic map (
90  N_CTRL => 0,
91  N_STAT => 2)
92  port map (
93  clk => ipb_clk,
94  reset => ipb_rst,
95  ipbus_in => ipbw(N_SLV_TOP),
96  ipbus_out => ipbr(N_SLV_TOP),
97  d => (1 => top_gitsha, 0 => top_version),
98  q => open,
99  stb => open);
100 
101  infra_lib : entity ipbus_lib.ipbus_ctrlreg_v
102  generic map (
103  N_CTRL => 0,
104  N_STAT => 2)
105  port map (
106  clk => ipb_clk,
107  reset => ipb_rst,
108  ipbus_in => ipbw(N_SLV_INFRASTRUCTURE),
109  ipbus_out => ipbr(N_SLV_INFRASTRUCTURE),
110  d => (1 => infra_gitsha, 0 => infra_version),
111  q => open,
112  stb => open);
113 
114  algo_lib : entity ipbus_lib.ipbus_ctrlreg_v
115  generic map (
116  N_CTRL => 0,
117  N_STAT => 2)
118  port map (
119  clk => ipb_clk,
120  reset => ipb_rst,
121  ipbus_in => ipbw(N_SLV_ALGORITHM),
122  ipbus_out => ipbr(N_SLV_ALGORITHM),
123  d => (1 => algo_gitsha, 0 => algo_version),
124  q => open,
125  stb => open);
126 
127  readout_lib : entity ipbus_lib.ipbus_ctrlreg_v
128  generic map (
129  N_CTRL => 0,
130  N_STAT => 2)
131  port map (
132  clk => ipb_clk,
133  reset => ipb_rst,
134  ipbus_in => ipbw(N_SLV_READOUT),
135  ipbus_out => ipbr(N_SLV_READOUT),
136  d => (1 => readout_gitsha, 0 => readout_version),
137  q => open,
138  stb => open);
139 
140  ipbus_a : entity ipbus_lib.ipbus_ctrlreg_v
141  generic map (
142  N_CTRL => 0,
143  N_STAT => 1)
144  port map (
145  clk => ipb_clk,
146  reset => ipb_rst,
147  ipbus_in => ipbw(N_SLV_IPBUS),
148  ipbus_out => ipbr(N_SLV_IPBUS),
149  d => (0 => ipbus_gitsha),
150  q => open,
151  stb => open);
152 
153 end Behavioral;
Version of the various firmware libraries.
Version of the various firmware libraries.