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

Back to eFEX documentation
ipbus_decode_efex_cntrl_mgt.vhd
1 -- Address decode logic for ipbus fabric
2 --
3 -- This file has been AUTOGENERATED from the address table - do not hand edit
4 --
5 -- We assume the synthesis tool is clever enough to recognise exclusive conditions
6 -- in the if statement.
7 --
8 -- Dave Newbold, February 2011
9 
10 library IEEE;
11 use IEEE.STD_LOGIC_1164.all;
12 use ieee.numeric_std.all;
13 
15 
16  constant IPBUS_SEL_WIDTH: positive := 2;
17  subtype ipbus_sel_t is std_logic_vector(IPBUS_SEL_WIDTH - 1 downto 0);
18  function ipbus_sel_efex_cntrl_mgt(addr : in std_logic_vector(31 downto 0)) return ipbus_sel_t;
19 
20 -- START automatically generated VHDL the Wed Aug 5 19:00:38 2020
21  constant N_SLV_MGT_114: integer := 0;
22  constant N_SLV_MGT_115: integer := 1;
23  constant N_SLV_MGT_116: integer := 2;
24  constant N_SLAVES: integer := 3;
25 -- END automatically generated VHDL
26 
27 
29 
31 
32  function ipbus_sel_efex_cntrl_mgt(addr : in std_logic_vector(31 downto 0)) return ipbus_sel_t is
33  variable sel: ipbus_sel_t;
34  begin
35 
36 -- START automatically generated VHDL the Wed Aug 5 19:00:38 2020
37  if std_match(addr, "----------------------00--------") then
38  sel := ipbus_sel_t(to_unsigned(N_SLV_MGT_114, IPBUS_SEL_WIDTH)); -- mgt_114 / base 0x00000000 / mask 0x00000300
39  elsif std_match(addr, "----------------------01--------") then
40  sel := ipbus_sel_t(to_unsigned(N_SLV_MGT_115, IPBUS_SEL_WIDTH)); -- mgt_115 / base 0x00000100 / mask 0x00000300
41  elsif std_match(addr, "----------------------10--------") then
42  sel := ipbus_sel_t(to_unsigned(N_SLV_MGT_116, IPBUS_SEL_WIDTH)); -- mgt_116 / base 0x00000200 / mask 0x00000300
43 -- END automatically generated VHDL
44 
45  else
46  sel := ipbus_sel_t(to_unsigned(N_SLAVES, IPBUS_SEL_WIDTH));
47  end if;
48 
49  return sel;
50 
51  end function ipbus_sel_efex_cntrl_mgt;
52 
54