Skip to content
Snippets Groups Projects

Resolve HPR-131

Merged
Reinier van der Wallerequested to merge
HPR-131 into master
1 open thread
5 files
+ 311
54
Compare changes
  • Side-by-side
  • Inline

Files

@@ -45,6 +45,10 @@
@@ -45,6 +45,10 @@
-- of messages has reached "nof_msg". Then the cycle repeats.
-- of messages has reached "nof_msg". Then the cycle repeats.
-- . The PSN field (= Packet Sequence Number) is set to LSBs of the incoming BSN.
-- . The PSN field (= Packet Sequence Number) is set to LSBs of the incoming BSN.
-- This can be used to check the order or detect missing packets at the receiver.
-- This can be used to check the order or detect missing packets at the receiver.
 
-- . The incoming datastream has to be at least 6 valid cycles long and be able to handle
Please register or sign in to reply
 
-- backpressure. Using less than 6 cycles seem to result in corrupted packets. It seems
 
-- that it has to do with dp_offload_tx_v3 not capable of processing fast enough, further
 
-- investigation is necessary in order to get rid of this limitation.
-- References:
-- References:
-- . [1] https://support.astron.nl/confluence/x/3pKrB
-- . [1] https://support.astron.nl/confluence/x/3pKrB
@@ -88,8 +92,19 @@ entity rdma_packetiser_assemble_header is
@@ -88,8 +92,19 @@ entity rdma_packetiser_assemble_header is
end rdma_packetiser_assemble_header;
end rdma_packetiser_assemble_header;
architecture str of rdma_packetiser_assemble_header is
architecture str of rdma_packetiser_assemble_header is
constant c_udp_app_hdr_length : natural := c_network_udp_header_len + c_rdma_packetiser_bth_len;
-- Created constants for each header length variant, also included the icrc length here.
constant c_ip_udp_app_hdr_length : natural := c_network_ip_header_len + c_udp_app_hdr_length;
-- first = rdma_write_first and rdma_write_only without immediate.
 
-- mid = rdma_write_middle and rdma_write_last without immediate.
 
-- last = rdma_write_last with immediate.
 
-- wo = rdma_write_only with immediate.
 
constant c_udp_app_first_hdr_len : natural := c_network_udp_header_len + c_rdma_packetiser_bth_len + c_rdma_packetiser_reth_len + c_rdma_packetiser_icrc_len;
 
constant c_udp_app_mid_hdr_len : natural := c_network_udp_header_len + c_rdma_packetiser_bth_len + c_rdma_packetiser_icrc_len;
 
constant c_udp_app_last_hdr_len : natural := c_network_udp_header_len + c_rdma_packetiser_bth_len + c_rdma_packetiser_imm_len + c_rdma_packetiser_icrc_len;
 
constant c_udp_app_wo_hdr_len : natural := c_network_udp_header_len + c_rdma_packetiser_bth_len + c_rdma_packetiser_reth_len + c_rdma_packetiser_imm_len + c_rdma_packetiser_icrc_len;
 
constant c_ip_udp_app_first_hdr_len : natural := c_network_ip_header_len + c_udp_app_first_hdr_len;
 
constant c_ip_udp_app_mid_hdr_len : natural := c_network_ip_header_len + c_udp_app_mid_hdr_len;
 
constant c_ip_udp_app_last_hdr_len : natural := c_network_ip_header_len + c_udp_app_last_hdr_len;
 
constant c_ip_udp_app_wo_hdr_len : natural := c_network_ip_header_len + c_udp_app_wo_hdr_len;
constant c_nof_offload : natural := 4;
constant c_nof_offload : natural := 4;
type t_state is (s_first, s_middle, s_last);
type t_state is (s_first, s_middle, s_last);
@@ -179,24 +194,36 @@ begin
@@ -179,24 +194,36 @@ begin
if v.nof_packets_in_msg = 1 then -- set opcode to write_only.
if v.nof_packets_in_msg = 1 then -- set opcode to write_only.
v.opcode := c_rdma_packetiser_opcode_uc_write_only;
v.opcode := c_rdma_packetiser_opcode_uc_write_only;
 
v.udp_total_length := c_udp_app_first_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_first_hdr_len + to_uint(block_len);
v.sel_ctrl := 0;
v.sel_ctrl := 0;
if use_immediate = '1' then -- set opcode to write_only with immediate data.
if use_immediate = '1' then -- set opcode to write_only with immediate data.
v.opcode := c_rdma_packetiser_opcode_uc_write_only_imm;
v.opcode := c_rdma_packetiser_opcode_uc_write_only_imm;
 
v.udp_total_length := c_udp_app_wo_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_wo_hdr_len + to_uint(block_len);
v.sel_ctrl := 3;
v.sel_ctrl := 3;
end if;
end if;
elsif v.nof_packets_in_msg = 2 then -- set opcode to write_first.
elsif v.nof_packets_in_msg = 2 then -- set opcode to write_first.
v.state := s_last; -- next state is last as there are only 2 packets.
v.state := s_last; -- next state is last as there are only 2 packets.
v.opcode := c_rdma_packetiser_opcode_uc_write_first;
v.opcode := c_rdma_packetiser_opcode_uc_write_first;
 
v.udp_total_length := c_udp_app_first_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_first_hdr_len + to_uint(block_len);
 
v.sel_ctrl := 0;
v.sel_ctrl := 0;
elsif v.nof_packets_in_msg > 2 then
elsif v.nof_packets_in_msg > 2 then
v.state := s_middle;
v.state := s_middle;
v.opcode := c_rdma_packetiser_opcode_uc_write_first;
v.opcode := c_rdma_packetiser_opcode_uc_write_first;
 
v.udp_total_length := c_udp_app_first_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_first_hdr_len + to_uint(block_len);
 
v.sel_ctrl := 0;
v.sel_ctrl := 0;
end if;
end if;
when s_middle => -- wait unitl the first packet is done and set next opcode.
when s_middle => -- wait unitl the first packet is done and set next opcode.
v.opcode := c_rdma_packetiser_opcode_uc_write_middle;
v.opcode := c_rdma_packetiser_opcode_uc_write_middle;
v.sel_ctrl := 1;
v.udp_total_length := c_udp_app_mid_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_mid_hdr_len + to_uint(block_len);
 
v.sel_ctrl := 1;
if q.p_cnt >= v.nof_packets_in_msg - 2 then -- wait until last middle packet
if q.p_cnt >= v.nof_packets_in_msg - 2 then -- wait until last middle packet
v.state := s_last;
v.state := s_last;
end if;
end if;
@@ -204,9 +231,13 @@ begin
@@ -204,9 +231,13 @@ begin
when s_last => -- next packet must be last packet, set opcode.
when s_last => -- next packet must be last packet, set opcode.
v.state := s_first;
v.state := s_first;
v.opcode := c_rdma_packetiser_opcode_uc_write_last;
v.opcode := c_rdma_packetiser_opcode_uc_write_last;
v.sel_ctrl := 1;
v.udp_total_length := c_udp_app_mid_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_mid_hdr_len + to_uint(block_len);
 
v.sel_ctrl := 1;
if use_immediate = '1' then -- set opcode to write_last with immediate data
if use_immediate = '1' then -- set opcode to write_last with immediate data
v.opcode := c_rdma_packetiser_opcode_uc_write_last_imm;
v.opcode := c_rdma_packetiser_opcode_uc_write_last_imm;
 
v.udp_total_length := c_udp_app_last_hdr_len + to_uint(block_len);
 
v.ip_total_length := c_ip_udp_app_last_hdr_len + to_uint(block_len);
v.sel_ctrl := 2;
v.sel_ctrl := 2;
end if;
end if;
end case;
end case;
@@ -215,8 +246,6 @@ begin
@@ -215,8 +246,6 @@ begin
if v.msg_cnt = 0 then -- set on new message
if v.msg_cnt = 0 then -- set on new message
v.virtual_address := unsigned(start_address);
v.virtual_address := unsigned(start_address);
v.dma_len := unsigned(dma_len);
v.dma_len := unsigned(dma_len);
v.udp_total_length := c_udp_app_hdr_length + to_uint(block_len) + c_rdma_packetiser_icrc_len;
v.ip_total_length := c_ip_udp_app_hdr_length + to_uint(block_len) + c_rdma_packetiser_icrc_len;
v.nof_packets_in_msg := to_uint(nof_packets_in_msg);
v.nof_packets_in_msg := to_uint(nof_packets_in_msg);
end if;
end if;
@@ -278,7 +307,7 @@ begin
@@ -278,7 +307,7 @@ begin
hdr_fields_slv_in_first <= field_select_subset(c_rdma_packetiser_first_hdr_field_arr,
hdr_fields_slv_in_first <= field_select_subset(c_rdma_packetiser_first_hdr_field_arr,
c_rdma_packetiser_mm_field_arr,
c_rdma_packetiser_mm_field_arr,
hdr_fields_slv_out_mm);
hdr_fields_slv_out_mm);
hdr_fields_slv_in_mid <= field_select_subset(c_rdma_packetiser_last_hdr_field_arr,
hdr_fields_slv_in_mid <= field_select_subset(c_rdma_packetiser_mid_hdr_field_arr,
c_rdma_packetiser_mm_field_arr,
c_rdma_packetiser_mm_field_arr,
hdr_fields_slv_out_mm);
hdr_fields_slv_out_mm);
hdr_fields_slv_in_last <= field_select_subset(c_rdma_packetiser_last_hdr_field_arr,
hdr_fields_slv_in_last <= field_select_subset(c_rdma_packetiser_last_hdr_field_arr,
Loading