CMX
CMX firmware code in-line documentation
 All Classes Namespaces Files Functions Variables
vme_outreg_rtl_notri_async.vhd
Go to the documentation of this file.
1 
5 
6 
7 
8 LIBRARY ieee ;
9 USE ieee.std_logic_1164.all;
10 USE ieee.numeric_std.all;
11 
12 
13 use work.CMXpackage.all;
14 use work.CMX_VME_defs.all;
15 
17  generic(
18  ia_vme : integer := 0;
19  width : integer := 16
20  );
21  port(
22  ncs : in std_logic;
23  rd_nwr : in std_logic;
24  ds : in std_logic;
25 
26  addr_vme : in std_logic_vector (15 downto 0);
27  data_vme : out std_logic_vector (15 downto 0);
28  bus_drive : out std_logic;
29 
30  data_to_vme : in std_logic_vector (width-1 downto 0)
31  );
32 
33 -- Declarations
34 
35 end vme_outreg_notri_async ;
36 --------------------------------------------------------------------------------
37 ARCHITECTURE rtl OF vme_outreg_notri_async IS
38 --------------------------------------------------------------------------------
39 -- VME register, all bits are inputs to board (q).
40 -- Variable width q, max 16.
41 --
42 
43  signal ren: std_logic; -- vme read enable
44 
45 
46 --------------------------------------------------------------------------------
47 BEGIN
48 
49 
50  ren <= vme_ren (ia_vme, addr_vme, ncs, rd_nwr);
51 
52  data_vme(width-1 downto 0)<=data_to_vme when ren='1' else (others=>'0');
53  gz: if width<16 generate
54  data_vme(15 downto width)<=(others=>'0');
55  end generate gz;
56  bus_drive<=ren;
57 
58 
59 END rtl;
60 
61 
62 
out data_vmestd_logic_vector (15 downto 0)
in addr_vmestd_logic_vector (15 downto 0)
test registers
in data_to_vmestd_logic_vector (width - 1 downto 0)