CMX
CMX firmware code in-line documentation
 All Classes Namespaces Files Functions Variables
CMX_Memory_spy_inhibit.vhd
Go to the documentation of this file.
1 ----------------------------------------------------------------------------------
18 ----------------------------------------------------------------------------------
19 library IEEE;
20 use IEEE.STD_LOGIC_1164.ALL;
21 
22 
23 library work;
24 use work.CMXpackage.all;
26 
27 
28 -- Uncomment the following library declaration if using
29 -- arithmetic functions with Signed or Unsigned values
30 use IEEE.NUMERIC_STD.ALL;
31 
32 -- Uncomment the following library declaration if instantiating
33 -- any Xilinx primitives in this code.
34 --library UNISIM;
35 --use UNISIM.VComponents.all;
36 
38  port (
39  spy_write_inhibit : out std_logic;
40  buf_clk40 : in std_logic;
41  --VME control:
42  ncs : in std_logic;
43  rd_nwr : in std_logic;
44  ds : in std_logic;
45  addr_vme : in std_logic_vector (15 downto 0);
46  data_vme_in : in std_logic_vector (15 downto 0);
47  data_vme_out : out std_logic_vector (15 downto 0);
48  bus_drive : out std_logic
49  );
50 end CMX_Memory_spy_inhibit;
51 
52 architecture Behavioral of CMX_Memory_spy_inhibit is
53 
54 
55  component vme_local_switch is
56  port (
57  data_vme_up : out std_logic_vector (15 downto 0);
58  data_vme_from_below : in arr_16;
59  bus_drive_up : out std_logic;
60  bus_drive_from_below : in std_logic_vector);
61  end component vme_local_switch;
62 
63  component vme_inreg_notri is
64  generic (
65  ia_vme : integer;
66  width : integer);
67  port (
68  clk : in std_logic;
69  ncs : in std_logic;
70  rd_nwr : in std_logic;
71  ds : in std_logic;
72  addr_vme : in std_logic_vector (15 downto 0);
73  data_vme_in : in std_logic_vector (15 downto 0);
74  data_vme_out : out std_logic_vector (15 downto 0);
75  bus_drive : out std_logic;
76  data_from_vme : out std_logic_vector (width-1 downto 0);
77  data_to_vme : in std_logic_vector (width-1 downto 0);
78  read_detect : out std_logic;
79  write_detect : out std_logic);
80  end component vme_inreg_notri;
81 
82 
83  signal data_from_vme_REG_RW_SPY_MEM_WRITE_INHIBIT: std_logic_vector(15 downto 0);
84  signal data_to_vme_REG_RW_SPY_MEM_WRITE_INHIBIT: std_logic_vector(15 downto 0);
85 
87 
88 
89 
90 begin
91 
93  generic map (
94  ia_vme => ADDR_REG_RW_SPY_MEM_WRITE_INHIBIT ,
95  width => 16)
96  port map (
97  clk => buf_clk40 ,
98  ncs => ncs,
99  rd_nwr => rd_nwr,
100  ds => ds,
101  addr_vme => addr_vme,
104  bus_drive => bus_drive,
107  read_detect => open,
109  );
110 
111 
112  process(buf_clk40)
113  begin
114  if rising_edge(buf_clk40) then
117  spy_write_inhibit<='1';
118  else
119  spy_write_inhibit<='0';
120  end if;
121  end if;
122  end if;
123  end process;
124 
126 
127 
128 end Behavioral;
129 
out read_detectstd_logic
std_logic_vector (15 downto 0) data_to_vme_REG_RW_SPY_MEM_WRITE_INHIBIT
out data_vme_outstd_logic_vector (15 downto 0)
std_logic_vector (15 downto 0) data_from_vme_REG_RW_SPY_MEM_WRITE_INHIBIT
out data_vme_outstd_logic_vector (15 downto 0)
in data_vme_from_belowarr_16
--! inputs from local registers and from
out data_from_vmestd_logic_vector (width - 1 downto 0)
out write_detectstd_logic
in addr_vmestd_logic_vector (15 downto 0)
vme_inreg_notri vme_inreg_reg_rw_bcid_reset_valvme_inreg_reg_rw_bcid_reset_val
out data_vme_upstd_logic_vector (15 downto 0)
--! connect this to
out bus_drive_upstd_logic
or of all bus drive requests from below
in data_vme_instd_logic_vector (15 downto 0)
in addr_vmestd_logic_vector (15 downto 0)
in data_to_vmestd_logic_vector (width - 1 downto 0)
out bus_drivestd_logic
test registers
in data_vme_instd_logic_vector (15 downto 0)
in bus_drive_from_belowstd_logic_vector