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

added byte order inversion

parent 578ee3c8
No related branches found
No related tags found
1 merge request!332Resolve HPR-122
Pipeline #50510 passed
...@@ -152,6 +152,8 @@ END rdma_demo_eth_tester_wrapper; ...@@ -152,6 +152,8 @@ END rdma_demo_eth_tester_wrapper;
ARCHITECTURE str OF rdma_demo_eth_tester_wrapper IS ARCHITECTURE str OF rdma_demo_eth_tester_wrapper IS
CONSTANT c_nof_byte : NATURAL := c_rdma_demo_nof_octet_output_100gbe;
SIGNAL rx_udp_sosi_arr : t_dp_sosi_arr(0 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); 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); SIGNAL rx_udp_siso_arr : t_dp_siso_arr(0 DOWNTO 0) := (OTHERS => c_dp_siso_rdy);
SIGNAL tx_udp_sosi_arr : t_dp_sosi_arr(0 DOWNTO 0) := (OTHERS => c_dp_sosi_rst); SIGNAL tx_udp_sosi_arr : t_dp_sosi_arr(0 DOWNTO 0) := (OTHERS => c_dp_sosi_rst);
...@@ -274,25 +276,31 @@ BEGIN ...@@ -274,25 +276,31 @@ BEGIN
tx_udp_axi4_siso.tready <= tx_udp_tready; tx_udp_axi4_siso.tready <= tx_udp_tready;
tx_udp_tvalid <= tx_udp_axi4_sosi.tvalid; tx_udp_tvalid <= tx_udp_axi4_sosi.tvalid;
tx_udp_tdata <= tx_udp_axi4_sosi.tdata;
tx_udp_tstrb <= tx_udp_axi4_sosi.tstrb; tx_udp_tstrb <= tx_udp_axi4_sosi.tstrb;
tx_udp_tkeep <= tx_udp_axi4_sosi.tkeep;
tx_udp_tlast <= tx_udp_axi4_sosi.tlast; tx_udp_tlast <= tx_udp_axi4_sosi.tlast;
tx_udp_tid <= tx_udp_axi4_sosi.tid; tx_udp_tid <= tx_udp_axi4_sosi.tid;
tx_udp_tdest <= tx_udp_axi4_sosi.tdest; tx_udp_tdest <= tx_udp_axi4_sosi.tdest;
tx_udp_tuser <= tx_udp_axi4_sosi.tuser; 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
rx_udp_tready <= rx_udp_axi4_siso.tready; rx_udp_tready <= rx_udp_axi4_siso.tready;
rx_udp_axi4_sosi.tvalid <= rx_udp_tvalid; rx_udp_axi4_sosi.tvalid <= rx_udp_tvalid;
rx_udp_axi4_sosi.tdata <= rx_udp_tdata;
rx_udp_axi4_sosi.tstrb <= rx_udp_tstrb; rx_udp_axi4_sosi.tstrb <= rx_udp_tstrb;
rx_udp_axi4_sosi.tkeep <= rx_udp_tkeep;
rx_udp_axi4_sosi.tlast <= rx_udp_tlast; rx_udp_axi4_sosi.tlast <= rx_udp_tlast;
rx_udp_axi4_sosi.tid <= rx_udp_tid; rx_udp_axi4_sosi.tid <= rx_udp_tid;
rx_udp_axi4_sosi.tdest <= rx_udp_tdest; rx_udp_axi4_sosi.tdest <= rx_udp_tdest;
rx_udp_axi4_sosi.tuser <= rx_udp_tuser; 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);
END GENERATE;
-- reg_bg_ctrl -- reg_bg_ctrl
-- copi -- copi
......
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