Line 146... |
Line 146... |
-- addresses. The CNTR values then differ from the memory address values,
|
-- addresses. The CNTR values then differ from the memory address values,
|
-- which can be useful to ensure that reading e.g. address 2**g_seq_dat_w
|
-- which can be useful to ensure that reading e.g. address 2**g_seq_dat_w
|
-- yields a different CNTR value than reading 2**(g_seq_dat_w+1).
|
-- yields a different CNTR value than reading 2**(g_seq_dat_w+1).
|
|
|
|
|
LIBRARY IEEE, common_pkg_lib, dp_pkg_lib, dp_pipeline_lib, common_ram_lib, mm_lib; -- init value for out_dat when diag_en = '0'
|
LIBRARY IEEE, common_pkg_lib, dp_pkg_lib, astron_pipeline_lib, astron_ram_lib, astron_mm_lib; -- init value for out_dat when diag_en = '0'
|
USE IEEE.std_logic_1164.ALL;
|
USE IEEE.std_logic_1164.ALL;
|
USE common_pkg_lib.common_pkg.ALL;
|
USE common_pkg_lib.common_pkg.ALL;
|
USE common_ram_lib.common_ram_pkg.ALL;
|
USE astron_ram_lib.common_ram_pkg.ALL;
|
USE mm_lib.common_field_pkg.ALL;
|
USE astron_mm_lib.common_field_pkg.ALL;
|
USE dp_pkg_lib.dp_stream_pkg.ALL;
|
USE dp_pkg_lib.dp_stream_pkg.ALL;
|
USE work.diag_pkg.ALL;
|
USE work.diag_pkg.ALL;
|
|
|
ENTITY mms_diag_tx_seq IS
|
ENTITY mms_diag_tx_seq IS
|
GENERIC (
|
GENERIC (
|
Line 288... |
Line 288... |
stat_reg_arr(I) <= ctrl_reg_arr(I); -- address 0, 1: control read back
|
stat_reg_arr(I) <= ctrl_reg_arr(I); -- address 0, 1: control read back
|
-- Status read only:
|
-- Status read only:
|
stat_reg_arr(I)(3*c_word_w-1 DOWNTO 2*c_word_w) <= tx_cnt_arr(I); -- address 2: read tx_cnt
|
stat_reg_arr(I)(3*c_word_w-1 DOWNTO 2*c_word_w) <= tx_cnt_arr(I); -- address 2: read tx_cnt
|
END PROCESS;
|
END PROCESS;
|
|
|
u_reg : ENTITY mm_lib.common_reg_r_w_dc
|
u_reg : ENTITY astron_mm_lib.common_reg_r_w_dc
|
GENERIC MAP (
|
GENERIC MAP (
|
g_cross_clock_domain => TRUE,
|
g_cross_clock_domain => TRUE,
|
g_readback => FALSE, -- must use FALSE for write/read or read only register when g_cross_clock_domain=TRUE
|
g_readback => FALSE, -- must use FALSE for write/read or read only register when g_cross_clock_domain=TRUE
|
g_reg => c_mm_reg
|
g_reg => c_mm_reg
|
)
|
)
|
Line 312... |
Line 312... |
out_reg => ctrl_reg_arr(I)
|
out_reg => ctrl_reg_arr(I)
|
);
|
);
|
END GENERATE;
|
END GENERATE;
|
|
|
-- Combine the internal array of mm interfaces for the bg_data to one array that is connected to the port of the MM bus
|
-- Combine the internal array of mm interfaces for the bg_data to one array that is connected to the port of the MM bus
|
u_mem_mux : ENTITY mm_lib.common_mem_mux
|
u_mem_mux : ENTITY astron_mm_lib.common_mem_mux
|
GENERIC MAP (
|
GENERIC MAP (
|
g_broadcast => g_mm_broadcast,
|
g_broadcast => g_mm_broadcast,
|
g_nof_mosi => g_nof_streams,
|
g_nof_mosi => g_nof_streams,
|
g_mult_addr_w => c_mm_reg.adr_w
|
g_mult_addr_w => c_mm_reg.adr_w
|
)
|
)
|
Line 365... |
Line 365... |
END IF;
|
END IF;
|
END LOOP;
|
END LOOP;
|
END PROCESS;
|
END PROCESS;
|
|
|
-- Pipeline the streams by 1 to register the mux_seq_src_out_arr data to ease timing closure given that c_tx_seq_latency=0
|
-- Pipeline the streams by 1 to register the mux_seq_src_out_arr data to ease timing closure given that c_tx_seq_latency=0
|
u_dp_pipeline_arr : ENTITY dp_pipeline_lib.dp_pipeline_arr
|
u_dp_pipeline_arr : ENTITY astron_pipeline_lib.dp_pipeline_arr
|
GENERIC MAP (
|
GENERIC MAP (
|
g_nof_streams => g_nof_streams
|
g_nof_streams => g_nof_streams
|
)
|
)
|
PORT MAP (
|
PORT MAP (
|
rst => dp_rst,
|
rst => dp_rst,
|