10 USE ieee.std_logic_1164.
all;
13 -- YE: All files are loaded in the library "work"
14 -- LIBRARY cmm_main; -- YE: this is a library, where package "vme_cmm" located
15 -- USE cmm_main.vme_cmm.all; -- YE: package "vme_cmm" moved to the library "work"
16 use work.
CMXpackage.
all;
-- YE: so use package "vme_cmm" from library "work" (cmx_vat.vhd)
45 --------------------------------------------------------------------------------
47 --------------------------------------------------------------------------------
48 -- VME register, all bits are inputs to board (q).
49 -- Variable width q, max 16.
52 signal ren: ;
-- vme read enable
58 signal wen: ;
-- vme write enable
69 -- doesn't have to be held after
80 --component chipscope_icon_c1
82 -- CONTROL0 : inout std_logic_vector(35 downto 0));
85 --component chipscope_ila_inside_inreg
87 -- CONTROL : inout std_logic_vector(35 downto 0);
88 -- CLK : in std_logic;
89 -- DATA : in std_logic_vector(39 downto 0);
90 -- TRIG0 : in std_logic_vector(3 downto 0));
93 --signal CONTROL : std_logic_vector(35 downto 0);
94 --signal DATA_chipscope : std_logic_vector(39 downto 0);
95 --signal TRIG0_chipscope : std_logic_vector(3 downto 0);
97 --------------------------------------------------------------------------------
105 --async mode to drive the bus/let go of the bus as soon as ren is updated
118 -- detect a read enable stable and ds edge after and generate a pulse on read_detect signal
119 -- detect a write enable stable and ds edge and generate a pulse on
120 -- write_detect and update output (data_from_vme)
121 -- signal and update the output
123 begin -- process read_detect_proc
124 if rising_edge(clk) then -- rising clock edge
126 --detect rising edge, make sure signals are stable
135 --there is also a strobe after the read
143 --buffer the ren in a shift register
152 --buffer the wen and ds in shift register
178 gen_read_detect_delay: for i_del in 1 to VME_read_det_delay-1 generate
181 if rising_edge(clk) then
185 end generate gen_read_detect_delay;
191 --chipscope_icon_c1_inst: chipscope_icon_c1
193 -- CONTROL0 => CONTROL);
195 --chipscope_ila_inside_inreg_inst: chipscope_ila_inside_inreg
197 -- CONTROL => CONTROL,
199 -- DATA => DATA_chipscope,
200 -- TRIG0 => TRIG0_chipscope);
203 --TRIG0_chipscope(0)<=ds;
204 --TRIG0_chipscope(1)<=rd_nwr;
205 --TRIG0_chipscope(2)<=ren;
206 --TRIG0_chipscope(3)<=wen;
209 --DATA_chipscope(0)<=ds;
210 --DATA_chipscope(1)<=rd_nwr;
211 --DATA_chipscope(2)<=ren;
212 --DATA_chipscope(3)<=wen;
213 --DATA_chipscope(4)<=read_detect_sig;
214 --DATA_chipscope(5)<=write_detect_sig;
215 --DATA_chipscope(6) <=ds_r;
216 --DATA_chipscope(7) <=ds_rr;
217 --DATA_chipscope(8) <=ds_rrr;
218 --DATA_chipscope(9) <=ds_rrrr;
219 --DATA_chipscope(10)<=ds_rrrrr;
220 --DATA_chipscope(11)<=ds_rrrrrr;
221 --DATA_chipscope(12)<=ren_r;
222 --DATA_chipscope(13)<=ren_rr;
223 --DATA_chipscope(14)<=ren_rrr;
224 --DATA_chipscope(15)<=ren_rrrr;
225 --DATA_chipscope(16)<=ren_rrrrr;
226 --DATA_chipscope(17)<=ren_rrrrrr;
227 --DATA_chipscope(18)<=wen_r;
228 --DATA_chipscope(19)<=wen_rr;
229 --DATA_chipscope(20)<=wen_rrr;
230 --DATA_chipscope(21)<=wen_rrrr;
231 --DATA_chipscope(22)<=wen_rrrrr;
232 --DATA_chipscope(23)<=wen_rrrrrr;
233 --DATA_chipscope(39 downto 24)<=addr_vme;
236 -- vme_w_proc: process (iq, wen, ds)
239 -- if(ds'event and ds = '1') then
240 -- if (wen = '1') then
241 -- iq <= data_vme(width-1 downto 0);
out write_detectstd_logic
inout data_vmestd_logic_vector (15 downto 0)
std_logic_vector (VME_read_det_delay - 1 downto 0) read_detect_delay_line
read_write_detect_procclk
std_logic_vector (15 downto 0) data_vme_r
out data_from_vmestd_logic_vector (width - 1 downto 0)
std_logic_vector (15 downto 0) data_vme_rrrr
in addr_vmestd_logic_vector (15 downto 0)
in data_to_vmestd_logic_vector (width - 1 downto 0)
std_logic_vector (15 downto 0) data_vme_rrr
vme_r_procren,data_to_vme
std_logic_vector (15 downto 0) data_vme_rr
std_logic write_detect_sig
std_logic read_detect_sig