intMAN  version 0.2_20130422
ipri_update_dmx.vhd
Go to the documentation of this file.
1 -------------------------------------------------------
2 --! @file
3 --! @brief Interrupt address dmx unit for the intMAN hardware
4 --! @details After it is enabled it activates the interrupt buffer identified by int_addr in order to perform further operation over it such as config update.
5 --! @author Josef Strnadel, Brno University of Technology, Faculty of Information Technology
6 --! @email strnadel@fit.vutbr.cz
7 --! @date 2013-04-17
8 -------------------------------------------------------
9 
10 library IEEE;
11 use IEEE.STD_LOGIC_1164.ALL;
12 use IEEE.NUMERIC_STD.ALL;
13 use work.intMAN_package.all;
14 
15 --
16 --
17 --
18 --! Entity of the interrupt address dmx unit for the intMAN hardware (interface)
19 --
20 entity ipri_update_dmx is
21  port (
22  sel : in std_logic; --! unit enable
23  int_addr : in STD_LOGIC_VECTOR(t_int_width_range); --! selected interrupt address
24  ipri_load_sel : out STD_LOGIC_VECTOR(t_int_range) --! address dmx output with no more than one interrupt selected
25  );
26 end entity ipri_update_dmx;
27 
28 --
29 --
30 --
31 --! Architecture of the interrupt address dmx unit for the intMAN hardware (inner structure)
32 --
33 architecture arch of ipri_update_dmx is
34 begin
35  --! selection signal generation process
36  process(sel, int_addr) is
37  variable idx : integer;
38  variable j : STD_LOGIC_VECTOR(t_int_range);
39  begin
40  idx := TO_INTEGER(UNSIGNED(int_addr));
41  j := (OTHERS => '0');
42  if (sel = '1') then
43  if(idx <= INT_NMAX-1) then -- put '1' into the position determined by int_addr
44  j(idx) := '1';
45  end if;
46  end if;
47  ipri_load_sel <= j;
48  end process;
49 end architecture arch;
© 2013 Josef Strnadel (email, web), Faculty of Information Technology, Brno University of Technology (web)