From 7a61db55ce00558e88a7d3575d772a7db4c78f0f Mon Sep 17 00:00:00 2001 From: Reinier van der Walle <walle@astron.nl> Date: Thu, 13 Jan 2022 09:14:52 +0100 Subject: [PATCH] updated node_sdp_correlator --- .../sdp/src/vhdl/node_sdp_correlator.vhd | 58 +++++++++++++++++-- libraries/base/ring/hdllib.cfg | 1 + 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd index ab0d594eb2..6b9a3d5f1d 100644 --- a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd +++ b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd @@ -50,7 +50,8 @@ ENTITY node_sdp_correlator IS in_sosi_arr : IN t_dp_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0); xst_udp_sosi : OUT t_dp_sosi; xst_udp_siso : IN t_dp_siso; - + from_ri_sosi : IN t_dp_sosi := c_dp_sosi_rst; + to_ri_sosi : OUT t_dp_sosi; mm_rst : IN STD_LOGIC; mm_clk : IN STD_LOGIC; @@ -91,6 +92,11 @@ ARCHITECTURE str OF node_sdp_correlator IS SIGNAL quant_sosi_arr : t_dp_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); SIGNAL dp_bsn_sync_scheduler_src_out : t_dp_sosi := c_dp_sosi_rst; SIGNAL xsel_sosi : t_dp_sosi := c_dp_sosi_rst; + SIGNAL local_sosi : t_dp_sosi := c_dp_sosi_rst; + + SIGNAL ring_mux_sosi : t_dp_sosi := c_dp_sosi_rst; + SIGNAL rx_sosi_sosi : t_dp_sosi := c_dp_sosi_rst; + SIGNAL crosslets_sosi_arr : t_dp_sosi_arr(g_P_sq-1 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); SIGNAL crosslets_mosi_arr : t_mem_mosi_arr(g_P_sq-1 DOWNTO 0) := (OTHERS => c_mem_mosi_rst); SIGNAL crosslets_miso_arr : t_mem_miso_arr(g_P_sq-1 DOWNTO 0) := (OTHERS => c_mem_miso_rst); @@ -154,17 +160,61 @@ BEGIN --------------------------------------------------------------- -- Repack 32b to 64b --------------------------------------------------------------- - -- Not implemented yet + u_dp_repack_data_local : ENTITY dp_lib.dp_repack_data + GENERIC MAP ( + g_in_dat_w => c_word_w, + g_in_nof_words => c_longword_sz/c_word_sz, + g_out_dat_w => c_longword_w, + g_out_nof_words => 1 + ) + PORT MAP ( + rst => dp_rst, + clk => dp_clk, + + snk_in => xsel_sosi, + src_out => local_sosi + ); --------------------------------------------------------------- -- ring_mux --------------------------------------------------------------- - -- Not implemented yet + u_ring_mux : ENTITY ring_lib.ring_mux + GENERIC MAP ( + g_bsn_w => c_longword_w, -- TODO Correct these generics! + g_data_w => c_longword_w, + g_in_chanel_w => c_word_w, + g_error_w => c_word_w, + g_fifo_size => array_init(1024, 2) + ) + PORT MAP ( + dp_clk => dp_clk, + dp_rst => dp_rst, + + remote_sosi => from_ri_sosi, + local_sosi => local_sosi, + mux_sosi => ring_mux_sosi + ); + + to_ri_sosi <= ring_mux_sosi; --------------------------------------------------------------- -- Repack 64b to 32b --------------------------------------------------------------- - -- Not implemented yet + u_dp_repack_data_rx : ENTITY dp_lib.dp_repack_data + GENERIC MAP ( + g_in_dat_w => c_longword_w, + g_in_nof_words => 1, + g_out_dat_w => c_word_w, + g_out_nof_words => c_longword_sz/c_word_sz + ) + PORT MAP ( + rst => dp_rst, + clk => dp_clk, + + snk_in => xsel_sosi, + src_out => local_sosi + ); + --------------------------------------------------------------- -- dp_demux diff --git a/libraries/base/ring/hdllib.cfg b/libraries/base/ring/hdllib.cfg index 68def31c56..1036f25902 100644 --- a/libraries/base/ring/hdllib.cfg +++ b/libraries/base/ring/hdllib.cfg @@ -6,6 +6,7 @@ hdl_lib_technology = synth_files = src/vhdl/ring_pkg.vhd + src/vhdl/ring_mux.vhd src/vhdl/ring_lane_info_reg.vhd src/vhdl/ring_lane_info.vhd src/vhdl/ring_info.vhd -- GitLab