Skip to content
Snippets Groups Projects
Commit 097100f3 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

removed byte reorder

parent c584762f
No related branches found
No related tags found
1 merge request!347removed byte reorder
Pipeline #55928 passed
......@@ -154,6 +154,7 @@ end rdma_demo_roce_tester_wrapper;
architecture str of rdma_demo_roce_tester_wrapper is
constant c_nof_byte : natural := c_rdma_demo_nof_octet_output_100gbe;
constant c_reverse_byte_order : boolean := false;
signal rx_udp_sosi_arr : t_dp_sosi_arr(0 downto 0) := (others => c_dp_sosi_rst);
signal rx_udp_siso_arr : t_dp_siso_arr(0 downto 0) := (others => c_dp_siso_rdy);
......@@ -286,11 +287,6 @@ begin
tx_udp_tid <= tx_udp_axi4_sosi.tid;
tx_udp_tdest <= tx_udp_axi4_sosi.tdest;
tx_udp_tuser <= tx_udp_axi4_sosi.tuser;
-- reverse order of bytes
gen_tx_data : for I in 0 to c_nof_byte - 1 generate
tx_udp_tdata( (I + 1) * c_octet_w - 1 downto I * c_octet_w) <= tx_udp_axi4_sosi.tdata((c_nof_byte - I) * c_octet_w - 1 downto (c_nof_byte - 1 - I) * c_octet_w);
tx_udp_tkeep(I) <= tx_udp_axi4_sosi.tkeep(c_nof_byte - 1 - I);
end generate;
-- rx_udp
rx_udp_tready <= rx_udp_axi4_siso.tready;
......@@ -301,10 +297,25 @@ begin
rx_udp_axi4_sosi.tid <= rx_udp_tid;
rx_udp_axi4_sosi.tdest <= rx_udp_tdest;
rx_udp_axi4_sosi.tuser <= rx_udp_tuser;
-- reverse order of bytes
gen_rx_data : for I in 0 to c_nof_byte - 1 generate
rx_udp_axi4_sosi.tdata( (I + 1) * c_octet_w - 1 downto I * c_octet_w) <= rx_udp_tdata((c_nof_byte - I) * c_octet_w - 1 downto (c_nof_byte - 1 - I) * c_octet_w);
rx_udp_axi4_sosi.tkeep(I) <= rx_udp_tkeep(c_nof_byte - 1 - I);
gen_reverse_bytes : if c_reverse_byte_order generate
gen_tx_data : for I in 0 to c_nof_byte - 1 generate
tx_udp_tdata( (I + 1) * c_octet_w - 1 downto I * c_octet_w) <= tx_udp_axi4_sosi.tdata((c_nof_byte - I) * c_octet_w - 1 downto (c_nof_byte - 1 - I) * c_octet_w);
tx_udp_tkeep(I) <= tx_udp_axi4_sosi.tkeep(c_nof_byte - 1 - I);
end generate;
gen_rx_data : for I in 0 to c_nof_byte - 1 generate
rx_udp_axi4_sosi.tdata( (I + 1) * c_octet_w - 1 downto I * c_octet_w) <= rx_udp_tdata((c_nof_byte - I) * c_octet_w - 1 downto (c_nof_byte - 1 - I) * c_octet_w);
rx_udp_axi4_sosi.tkeep(I) <= rx_udp_tkeep(c_nof_byte - 1 - I);
end generate;
end generate;
gen_no_reverse_bytes : if not c_reverse_byte_order generate
tx_udp_tdata <= tx_udp_axi4_sosi.tdata;
tx_udp_tkeep <= tx_udp_axi4_sosi.tkeep;
rx_udp_axi4_sosi.tdata <= rx_udp_tdata;
rx_udp_axi4_sosi.tkeep <= rx_udp_tkeep;
end generate;
-- reg_bg_ctrl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment