1 ----------------------------------------------------------------------------------
13 ----------------------------------------------------------------------------------
16 use IEEE.STD_LOGIC_1164.
ALL;
20 use UNISIM.VComponents.
all;
31 --data in ds2 domain, *2 because data is DDR
32 data : out ( numbits_in_RTM_connector*2*num_RTM_cables - 1 downto 0);
41 --inhibit signal for writing to the spy memories
53 end CMX_system_cable_input_module;
84 signal data_DS2 : arr_RTM_sdr;
--output of the DS2 domain
94 --parity error calculated using the forwarded clock
97 --then registered in the ds2 an ds1 system domains
102 -- --parity error calculated from data captured in respective domains
103 -- signal parity_error_c_SYSTEMDS2 : std_logic_vector(num_RTM_cables -1 downto 0);
104 -- signal parity_error_c_SYSTEM : std_logic_vector(num_RTM_cables -1 downto 0);
110 component blk_mem_A8x52_B8x52_2clock
is
114 wea :
IN (
0 DOWNTO 0);
115 addra :
IN (
7 DOWNTO 0);
116 dina :
IN (
51 DOWNTO 0);
117 douta :
OUT (
51 DOWNTO 0);
120 web :
IN (
0 DOWNTO 0);
121 addrb :
IN (
7 DOWNTO 0);
122 dinb :
IN (
51 DOWNTO 0);
123 doutb :
OUT (
51 DOWNTO 0));
126 component blk_mem_A8x52_B8x52_1clock
is
130 wea :
IN (
0 DOWNTO 0);
131 addra :
IN (
7 DOWNTO 0);
132 dina :
IN (
51 DOWNTO 0);
133 douta :
OUT (
51 DOWNTO 0);
136 web :
IN (
0 DOWNTO 0);
137 addrb :
IN (
7 DOWNTO 0);
138 dinb :
IN (
51 DOWNTO 0);
139 doutb :
OUT (
51 DOWNTO 0));
155 --supplied for sw check
162 signal all_null : (numbits_in_RTM_connector*2 - 1 downto 0);
182 addra :
out (
7 DOWNTO 0);
444 ia_vme => ADDR_REG_RW_RTM_INPUT_COUNTER_RESET ,
545 channel_gen: for channel in 0 to num_RTM_cables-1 generate
549 --process to generate a local registers for the inhibit signal
568 --process to locally register the inhibit signal in system domain and yet again;
586 --process to locally register the inhibit signal in the DS2 domain using
587 --the system domain register as input;
620 --PAR_ERROR(channel)<=PAR_ERROR_sig(channel);
641 -- select the control signals based on the value of the mem_select_address_RTM_SPY_SOURCE
648 --this should generate a n-1 multiplexer with douta_RTM_SPY_SOURCE as output
649 --if there are moren than 1 rtm sources; if there is just one rtm source
650 --I expect the 1-1 'mux' will be optimized out.
677 -- select the control signals based on the value of the mem_select_address_RTM_SPY_SYSTEM
684 --this should generate a n-1 multiplexer with douta_RTM_SPY_SYSTEM as output
685 --if there are moren than 1 rtm sources; if there is just one rtm source
686 --I expect the 1-1 'mux' will be optimized out.
712 -- select the control signals based on the value of the mem_select_address_RTM_SPY_SYSTEMDS2
719 --this should generate a n-1 multiplexer with douta_RTM_SPY_SYSTEMDS2 as output
720 --if there are moren than 1 rtm sources; if there is just one rtm source
721 --I expect the 1-1 'mux' will be optimized out.
733 ia_vme => ADDR_REG_RW_RTM_SPY_SOURCE_MEM_START_ADDRESS+2*channel,
763 --a local register (one copy for each of the memories)to ease timing
768 --synchronisation of the start playback signal to the source domain
786 --synchronisation of the start playback signal to the system ds2 domain
844 --create local registers for the master inhibit to aid timing closure
882 --create local registers for the master inhibit to aid timing closure
906 --create local registers for the master inhibit to aid timing closure
953 --WTF 20150209 push the mux before the register
970 --WTF 20150209 push the mux before the register
971 --select the data going out from the DS2 domain -
972 --data_DS2(channel)<=data_sdr_r_SYSTEMDS2(channel) when mode_control_RTM_SPY_SYSTEMDS2/=CONST_DPR_CONTROL_PLAYBACK
974 -- doutb_RTM_SPY_SYSTEMDS2_individual(channel);
1010 --another mux to finally present the data on the output
1011 --either take data from SYSTEM RAM or from DS2 (register or memory)
1012 --no additional registers are implemented between the DS2 and rest of the logic
1013 data(numbits_in_RTM_connector*2*(channel+1)-1 downto numbits_in_RTM_connector*2*channel)
1018 --WTF 20150209 This is incorrect timing:
1019 --parity_error(channel)<=parity_error_r_SYSTEMDS2_rr_SYSTEM(channel);
1022 --parity error counter
1026 ia_vme => ADDR_REG_RO_RTM_PARITY_ERROR_COUNTER+4*channel,
1040 ia_vme => ADDR_REG_RO_RTM_PARITY_ERROR_COUNTER+4*channel+2,
1070 --this will make an error detection register that in turn will be used to
1071 --generate a latch; also an no-error run length counter is made in this process
1090 gen_err_latch_bit_source: for i_bit in 0 to numbits_in_RTM_connector -1 generate
1091 --resettable 'latch' (so not really a latch) that is set if there is an error
1105 end generate gen_err_latch_bit_source;
1126 gen_err_latch_bit_system: for i_bit in 0 to numbits_in_RTM_connector -1 generate
1127 --resettable 'latch' (so not really a latch) that is set if there is an error
1141 end generate gen_err_latch_bit_system;
1162 gen_err_latch_bit_systemds2: for i_bit in 0 to numbits_in_RTM_connector -1 generate
1163 --resettable 'latch' (so not really a latch) that is set if there is an error
1177 end generate gen_err_latch_bit_systemds2;
1180 -- create counter reset registers
1181 --double register to close timing
1197 --double register in the source domain
1213 --double register in the systemds2 domain
1230 --assign latches as data to the registers
1245 ia_vme => ADDR_REG_RO_RTM_SPY_SOURCE_MEM_CHECK_ERROR+
(4*channel
),
1258 ia_vme => ADDR_REG_RO_RTM_SPY_SOURCE_MEM_CHECK_ERROR+
(4*channel
)+2,
1272 ia_vme => ADDR_REG_RO_RTM_SPY_SYSTEM_MEM_CHECK_ERROR+
(4*channel
),
1285 ia_vme => ADDR_REG_RO_RTM_SPY_SYSTEM_MEM_CHECK_ERROR+
(4*channel
)+2,
1299 ia_vme => ADDR_REG_RO_RTM_SPY_SYSTEMDS2_MEM_CHECK_ERROR+
(4*channel
),
1312 ia_vme => ADDR_REG_RO_RTM_SPY_SYSTEMDS2_MEM_CHECK_ERROR+
(4*channel
)+2,
1325 end generate channel_gen;
1328 or_all_parity_error_total:
entity work.
or_all
1335 --port enables - we enable B port when verifying, spying and playing back. Write
1336 --is enabled only when spying
1337 --no playback for the source spy
1363 ia_vme => ADDR_REG_RW_RTM_SPY_SYSTEM_MEM_START_ADDRESS,
1381 ia_vme => ADDR_REG_RW_RTM_SPY_SYSTEMDS2_MEM_START_ADDRESS,
1398 ia_vme => ADDR_REG_RW_RTM_INPUT_CHANNEL_MASK,
ADDR_REG_RW_GENERIC_SPY_MEM_WORDinteger :=0
in addr_vmestd_logic_vector (15 downto 0)
out data_vmestd_logic_vector (15 downto 0)
out data_vme_outstd_logic_vector (15 downto 0)
out stretched_OUTstd_logic
ADDR_REG_RW_GENERIC_SPY_MEM_CONTROLinteger :=0
out data_from_vmestd_logic_vector (width - 1 downto 0)
ADDR_REG_RO_GENERIC_SPY_MEM_STATUSinteger :=0
in data_vme_from_belowarr_16
--! inputs from local registers and from
out data_from_vmestd_logic_vector (width - 1 downto 0)
out data_vme_outstd_logic_vector (15 downto 0)
out data_vmestd_logic_vector (15 downto 0)
in data_vme_instd_logic_vector (15 downto 0)
out port_b_master_inhibitstd_logic
out addrastd_logic_vector (7 downto 0)
out write_detectstd_logic
num_external_RAMSpositive :=1
in addr_vmestd_logic_vector (15 downto 0)
in data_to_vmestd_logic_vector (width - 1 downto 0)
out data_vme_upstd_logic_vector (15 downto 0)
--! connect this to
in addr_vmestd_logic_vector (15 downto 0)
in data_to_vmestd_logic_vector (width - 1 downto 0)
out bus_drive_upstd_logic
or of all bus drive requests from below
out mem_select_addressstd_logic_vector (addr_port_width (num_external_RAMS) - 1 downto 0)
in addr_vmestd_logic_vector (15 downto 0)
in DATAstd_logic_vector (numbits - 1 downto 0)
in data_to_vmestd_logic_vector (width - 1 downto 0)
out data_vme_outstd_logic_vector (15 downto 0)
in addr_vmestd_logic_vector (15 downto 0)
in data_vme_instd_logic_vector (15 downto 0)
in data_vme_instd_logic_vector (15 downto 0)
in data_to_vmestd_logic_vector (width - 1 downto 0)
out mode_controlstd_logic_vector (3 downto 0)
in unstretched_INstd_logic
in bus_drive_from_belowstd_logic_vector