Skip to content
Snippets Groups Projects
Commit 4c138888 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Rename offload signals.

parent 5a4db5e8
No related branches found
No related tags found
No related merge requests found
Pipeline #28969 passed
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
-- Usage: -- Usage:
-- > as 8 -- > as 8
-- > run -a -- > run -a
-- . for header: view test_offload_sosi and the rx_sdp_stat_header.app fields -- . for header: view rx_offload_sosi and the rx_sdp_stat_header.app fields
-- . for payload: view rx_val, rx_data and exp_data -- . for payload: view rx_val, rx_data and exp_data
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
...@@ -172,15 +172,15 @@ ARCHITECTURE tb OF tb_sdp_statistics_offload IS ...@@ -172,15 +172,15 @@ ARCHITECTURE tb OF tb_sdp_statistics_offload IS
SIGNAL in_crosslets_info_rec : t_sdp_crosslets_info; SIGNAL in_crosslets_info_rec : t_sdp_crosslets_info;
SIGNAL in_crosslets_info_slv : STD_LOGIC_VECTOR(c_sdp_crosslets_info_reg_w-1 DOWNTO 0); SIGNAL in_crosslets_info_slv : STD_LOGIC_VECTOR(c_sdp_crosslets_info_reg_w-1 DOWNTO 0);
SIGNAL offload_data : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0); -- 32 bit SIGNAL sdp_offload_data : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0); -- 32 bit
SIGNAL offload_sosi : t_dp_sosi; SIGNAL sdp_offload_sosi : t_dp_sosi;
SIGNAL offload_siso : t_dp_siso := c_dp_siso_rst; SIGNAL sdp_offload_siso : t_dp_siso := c_dp_siso_rst;
SIGNAL test_offload_en : STD_LOGIC := '0'; SIGNAL rx_offload_en : STD_LOGIC := '0';
SIGNAL test_offload_data : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0); -- 32 bit SIGNAL rx_offload_data : STD_LOGIC_VECTOR(c_word_w-1 DOWNTO 0); -- 32 bit
SIGNAL test_offload_sosi : t_dp_sosi := c_dp_sosi_rst; SIGNAL rx_offload_sosi : t_dp_sosi := c_dp_sosi_rst;
SIGNAL test_offload_sop_cnt : NATURAL := 0; SIGNAL rx_offload_sop_cnt : NATURAL := 0;
SIGNAL test_offload_eop_cnt : NATURAL := 0; SIGNAL rx_offload_eop_cnt : NATURAL := 0;
SIGNAL rx_hdr_fields_out : STD_LOGIC_VECTOR(1023 DOWNTO 0); SIGNAL rx_hdr_fields_out : STD_LOGIC_VECTOR(1023 DOWNTO 0);
SIGNAL rx_hdr_fields_raw : STD_LOGIC_VECTOR(1023 DOWNTO 0) := (OTHERS => '0'); SIGNAL rx_hdr_fields_raw : STD_LOGIC_VECTOR(1023 DOWNTO 0) := (OTHERS => '0');
...@@ -316,7 +316,7 @@ BEGIN ...@@ -316,7 +316,7 @@ BEGIN
proc_mem_mm_bus_wr(c_reg_enable_mm_addr_enable, 1, mm_clk, enable_miso, enable_mosi); proc_mem_mm_bus_wr(c_reg_enable_mm_addr_enable, 1, mm_clk, enable_miso, enable_mosi);
proc_common_wait_some_cycles(mm_clk, c_cross_clock_domain_latency); proc_common_wait_some_cycles(mm_clk, c_cross_clock_domain_latency);
proc_common_wait_some_cycles(dp_clk, 1); proc_common_wait_some_cycles(dp_clk, 1);
test_offload_en <= '1'; rx_offload_en <= '1';
WAIT; WAIT;
END PROCESS; END PROCESS;
...@@ -324,31 +324,31 @@ BEGIN ...@@ -324,31 +324,31 @@ BEGIN
p_test_counters : PROCESS(dp_clk) p_test_counters : PROCESS(dp_clk)
BEGIN BEGIN
IF rising_edge(dp_clk) THEN IF rising_edge(dp_clk) THEN
-- Count test_offload_sosi packets -- Count rx_offload_sosi packets
IF test_offload_sosi.sop = '1' THEN IF rx_offload_sosi.sop = '1' THEN
test_offload_sop_cnt <= test_offload_sop_cnt + 1; -- early count rx_offload_sop_cnt <= rx_offload_sop_cnt + 1; -- early count
END IF; END IF;
IF test_offload_sosi.eop = '1' THEN IF rx_offload_sosi.eop = '1' THEN
test_offload_eop_cnt <= test_offload_eop_cnt + 1; -- after count rx_offload_eop_cnt <= rx_offload_eop_cnt + 1; -- after count
END IF; END IF;
END IF; END IF;
END PROCESS; END PROCESS;
-- Count sync intervals using in_sosi.sync, because there is no test_offload_sosi.sync -- Count sync intervals using in_sosi.sync, because there is no rx_offload_sosi.sync
in_sync_cnt <= in_sync_cnt + 1 WHEN rising_edge(dp_clk) AND in_sosi.sync = '1'; in_sync_cnt <= in_sync_cnt + 1 WHEN rising_edge(dp_clk) AND in_sosi.sync = '1';
test_sync_cnt <= in_sync_cnt - 1; -- optionally adjust to fit test_offload_sosi test_sync_cnt <= in_sync_cnt - 1; -- optionally adjust to fit rx_offload_sosi
-- derive current X_sq correlator cell index -- derive current X_sq correlator cell index
cur_X_sq_cell <= (test_offload_eop_cnt / g_nof_crosslets) MOD c_nof_used_P_sq; cur_X_sq_cell <= (rx_offload_eop_cnt / g_nof_crosslets) MOD c_nof_used_P_sq;
-- derive current N_crosslets index index -- derive current N_crosslets index index
cur_crosslet <= test_offload_eop_cnt MOD g_nof_crosslets; cur_crosslet <= rx_offload_eop_cnt MOD g_nof_crosslets;
-- derive source RN index -- derive source RN index
source_rn <= func_ring_nof_hops_to_source_rn(cur_X_sq_cell, rn_index, g_N_rn, g_crosslets_direction); source_rn <= func_ring_nof_hops_to_source_rn(cur_X_sq_cell, rn_index, g_N_rn, g_crosslets_direction);
source_gn <= g_O_rn + source_rn; source_gn <= g_O_rn + source_rn;
-- Prepare exp_sdp_stat_header before test_offload_sosi.eop, so that p_exp_sdp_stat_header can -- Prepare exp_sdp_stat_header before rx_offload_sosi.eop, so that p_exp_sdp_stat_header can
-- verify it at test_offload_sosi.eop. -- verify it at rx_offload_sosi.eop.
-- For all statistics -- For all statistics
exp_dp_bsn <= TO_SVEC(c_bsn_init + 1 + test_sync_cnt * c_nof_block_per_sync, 64); exp_dp_bsn <= TO_SVEC(c_bsn_init + 1 + test_sync_cnt * c_nof_block_per_sync, 64);
...@@ -433,25 +433,25 @@ BEGIN ...@@ -433,25 +433,25 @@ BEGIN
rx_sdp_stat_header <= func_sdp_map_stat_header(rx_hdr_fields_raw); rx_sdp_stat_header <= func_sdp_map_stat_header(rx_hdr_fields_raw);
p_verify_header : PROCESS(test_offload_sosi) p_verify_header : PROCESS(rx_offload_sosi)
VARIABLE v_bool : BOOLEAN; VARIABLE v_bool : BOOLEAN;
BEGIN BEGIN
-- Prepare exp_sdp_stat_header before test_offload_sosi.eop, so that it can be verified at test_offload_sosi.eop -- Prepare exp_sdp_stat_header before rx_offload_sosi.eop, so that it can be verified at rx_offload_sosi.eop
IF test_offload_sosi.eop = '1' THEN IF rx_offload_sosi.eop = '1' THEN
v_bool := func_sdp_verify_stat_header(g_statistics_type, rx_sdp_stat_header, exp_sdp_stat_header); v_bool := func_sdp_verify_stat_header(g_statistics_type, rx_sdp_stat_header, exp_sdp_stat_header);
END IF; END IF;
END PROCESS; END PROCESS;
-- Count number of packets in a sync interval. -- Count number of packets in a sync interval.
-- There is no active test_offload_sosi.sync to restart the count, therefore -- There is no active rx_offload_sosi.sync to restart the count, therefore
-- use in_sosi.sync to reset the count for the next test_offload_sosi.sync -- use in_sosi.sync to reset the count for the next rx_offload_sosi.sync
-- interval -- interval
p_rx_packet_cnt : PROCESS(dp_clk) p_rx_packet_cnt : PROCESS(dp_clk)
BEGIN BEGIN
IF rising_edge(dp_clk) THEN IF rising_edge(dp_clk) THEN
IF in_sosi.sync = '1' THEN IF in_sosi.sync = '1' THEN
rx_packet_cnt <= 0; rx_packet_cnt <= 0;
ELSIF test_offload_sosi.eop = '1' THEN ELSIF rx_offload_sosi.eop = '1' THEN
rx_packet_cnt <= rx_packet_cnt + 1; rx_packet_cnt <= rx_packet_cnt + 1;
END IF; END IF;
END IF; END IF;
...@@ -470,10 +470,10 @@ BEGIN ...@@ -470,10 +470,10 @@ BEGIN
p_verify_nof_valid_per_packet : PROCESS(dp_clk) p_verify_nof_valid_per_packet : PROCESS(dp_clk)
BEGIN BEGIN
IF rising_edge(dp_clk) THEN IF rising_edge(dp_clk) THEN
IF test_offload_sosi.eop = '1' THEN IF rx_offload_sosi.eop = '1' THEN
rx_valid_cnt <= 0; rx_valid_cnt <= 0;
ASSERT rx_valid_cnt = c_packet_size - 1 REPORT "Wrong number of valid per packet" SEVERITY ERROR; ASSERT rx_valid_cnt = c_packet_size - 1 REPORT "Wrong number of valid per packet" SEVERITY ERROR;
ELSIF test_offload_sosi.valid = '1' THEN ELSIF rx_offload_sosi.valid = '1' THEN
rx_valid_cnt <= rx_valid_cnt + 1; rx_valid_cnt <= rx_valid_cnt + 1;
END IF; END IF;
END IF; END IF;
...@@ -493,8 +493,8 @@ BEGIN ...@@ -493,8 +493,8 @@ BEGIN
BEGIN BEGIN
IF rising_edge(dp_clk) THEN IF rising_edge(dp_clk) THEN
rx_val <= '0'; rx_val <= '0';
v_rx_data := TO_UINT(test_offload_sosi.data); v_rx_data := TO_UINT(rx_offload_sosi.data);
IF test_offload_sosi.valid = '1' THEN IF rx_offload_sosi.valid = '1' THEN
IF g_statistics_type = "SST" THEN IF g_statistics_type = "SST" THEN
-- Indices: -- Indices:
-- W: 0 1 2 3 4 5 ... 1022 1023 -- W: 0 1 2 3 4 5 ... 1022 1023
...@@ -659,10 +659,10 @@ BEGIN ...@@ -659,10 +659,10 @@ BEGIN
reg_hdr_dat_mosi => offload_rx_hdr_dat_mosi, reg_hdr_dat_mosi => offload_rx_hdr_dat_mosi,
reg_hdr_dat_miso => offload_rx_hdr_dat_miso, reg_hdr_dat_miso => offload_rx_hdr_dat_miso,
snk_in_arr(0) => offload_sosi, snk_in_arr(0) => sdp_offload_sosi,
snk_out_arr(0) => offload_siso, snk_out_arr(0) => sdp_offload_siso,
src_out_arr(0) => test_offload_sosi, src_out_arr(0) => rx_offload_sosi,
hdr_fields_out_arr(0) => rx_hdr_fields_out, hdr_fields_out_arr(0) => rx_hdr_fields_out,
hdr_fields_raw_arr(0) => rx_hdr_fields_raw hdr_fields_raw_arr(0) => rx_hdr_fields_raw
...@@ -697,8 +697,8 @@ BEGIN ...@@ -697,8 +697,8 @@ BEGIN
-- ST -- ST
in_sosi => in_sosi, in_sosi => in_sosi,
out_sosi => offload_sosi, out_sosi => sdp_offload_sosi,
out_siso => offload_siso, out_siso => sdp_offload_siso,
-- Inputs from other blocks -- Inputs from other blocks
eth_src_mac => c_eth_src_mac, eth_src_mac => c_eth_src_mac,
...@@ -717,7 +717,7 @@ BEGIN ...@@ -717,7 +717,7 @@ BEGIN
ASSERT c_crosslets_info_rec = func_sdp_map_crosslets_info(c_crosslets_info_slv) REPORT "Error in func_sdp_map_crosslets_info()" SEVERITY FAILURE; ASSERT c_crosslets_info_rec = func_sdp_map_crosslets_info(c_crosslets_info_slv) REPORT "Error in func_sdp_map_crosslets_info()" SEVERITY FAILURE;
-- To view the 32 bit 1GbE offload data more easily in the Wave window -- To view the 32 bit 1GbE offload data more easily in the Wave window
offload_data <= offload_sosi.data(c_word_w-1 DOWNTO 0); offload_data <= sdp_offload_sosi.data(c_word_w-1 DOWNTO 0);
test_offload_data <= test_offload_sosi.data(c_word_w-1 DOWNTO 0); rx_offload_data <= rx_offload_sosi.data(c_word_w-1 DOWNTO 0);
END tb; END tb;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment