CMX
CMX firmware code in-line documentation
 All Classes Namespaces Files Functions Variables
input_latch_rtl.vhd
Go to the documentation of this file.
1 
5 
6 LIBRARY ieee;
7 USE ieee.std_logic_1164.all;
8 USE ieee.numeric_std.all;
9 
10 
11 ENTITY input_latch IS
12  PORT(
13  n_ds0_int : IN std_logic; -- n_ds0_int => VMEDS_L
14  n_write : IN std_logic;
15  vme_address : IN std_logic_vector (23 DOWNTO 1);
16  address_ltchd : OUT std_logic_vector (23 DOWNTO 1);
17  n_write_ltchd : OUT std_logic
18  );
19 END input_latch ;
20 
21 --------------------------------------------------------------------------------
22 architecture rtl of input_latch is
23 --------------------------------------------------------------------------------
24 -- ... to Latch VME inputs because some VME masters
25 -- remove them before the cycle is over.
26 --
27 -- IPB 2005.
28 -- WTF : latches generate synthesis warnings: add an else clause to infer
29 -- FFs instead.
30 
31  signal address_ltchd_sig: std_logic_vector(23 downto 1);
32  signal n_write_ltchd_sig: std_logic;
33 
34 --------------------------------------------------------------------------------
35 begin
36 
39 
41  begin
42  if (n_ds0_int = '1') then -- n_ds0_int => VMEDS_L
43  address_ltchd_sig <= vme_address; -- latch at n_ds0_int = '0'
44  n_write_ltchd_sig <= n_write; -- latch at n_ds0_int = '0'
45  else
48  end if;
49  end process;
50 
51 end architecture rtl;
std_logic_vector (23 downto 1) address_ltchd_sig
in n_writestd_logic
std_logic n_write_ltchd_sig
in vme_addressstd_logic_vector (23 downto 1)
in n_ds0_intstd_logic
latchprocn_ds0_int,vme_address,n_write,address_ltchd_sig,n_write_ltchd_sig
out n_write_ltchdstd_logic
out address_ltchdstd_logic_vector (23 downto 1)