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

Add c_eth_tester_eth_packet_len_max.

parent 296f5896
No related branches found
No related tags found
1 merge request!288Resolve L2SDP-836
...@@ -33,27 +33,33 @@ USE common_lib.common_network_layers_pkg.ALL; ...@@ -33,27 +33,33 @@ USE common_lib.common_network_layers_pkg.ALL;
PACKAGE eth_tester_pkg is PACKAGE eth_tester_pkg is
CONSTANT c_eth_tester_bg_block_len_max : NATURAL := c_network_eth_payload_jumbo_max; -- 9000 octets CONSTANT c_eth_tester_bg_block_len_max : NATURAL := c_network_eth_payload_jumbo_max; -- 9000 octets
CONSTANT c_eth_tester_rx_block_len_max : NATURAL := c_network_eth_payload_jumbo_max + c_network_eth_crc_len; -- 9004 octets
CONSTANT c_eth_tester_eth_packet_len_max : NATURAL := c_network_eth_frame_jumbo_max; -- 9018 octets = 14 header + 9000 + 4 crc
-- hdr_field_sel bit selects where the hdr_field value is set: -- hdr_field_sel bit selects where the hdr_field value is set:
-- . 0 = data path controlled, value is set in data path, so field_default() is not used. -- . 0 = data path controlled, value is set in data path, so field_default()
-- . 1 = MM controlled, value is set via MM or by the field_default(), so any data path setting in -- is not used.
-- eth_tester.vhd is not used. -- . 1 = MM controlled, value is set via MM or by the field_default(), so any
-- data path setting in eth_tester.vhd is not used.
-- Remarks: -- Remarks:
-- . For constant values it is convenient to use MM controlled, because then the field_default() -- . For constant values it is convenient to use MM controlled, because then
-- is used that can be set here in c_eth_tester_hdr_field_arr. -- the field_default() is used that can be set here in
-- . For reserved values it is convenient to use MM controlled, because then in future they -- c_eth_tester_hdr_field_arr.
-- could still be changed via MM without having to recompile the FW. -- . For reserved values it is convenient to use MM controlled, because then
-- . Typically only use data path controlled if the value has to be set dynamically, so dependent -- in future they could still be changed via MM without having to recompile
-- on the state of the FW. -- the FW.
-- . If a data path controlled field is not set in the FW, then it defaults to 0 by declaring -- . Typically only use data path controlled if the value has to be set
-- hdr_fields_in_arr with all 0. Hence e.g. udp_checksum = 0 can be achieve via data path -- dynamically, so dependent on the state of the FW.
-- and default hdr_fields_in_arr = 0 or via MM controlled and field_default(0). -- . If a data path controlled field is not set in the FW, then it defaults
-- to 0 by declaring hdr_fields_in_arr with all 0. Hence e.g. udp_checksum
-- = 0 can be achieve via data path and default hdr_fields_in_arr = 0 or
-- via MM controlled and field_default(0).
CONSTANT c_eth_tester_nof_hdr_fields : NATURAL := 1+3+12+4+3; CONSTANT c_eth_tester_nof_hdr_fields : NATURAL := 1+3+12+4+3;
CONSTANT c_eth_tester_hdr_field_sel : STD_LOGIC_VECTOR(c_eth_tester_nof_hdr_fields-1 DOWNTO 0) := "1"&"101"&"111011111001"&"0100"&"100"; CONSTANT c_eth_tester_hdr_field_sel : STD_LOGIC_VECTOR(c_eth_tester_nof_hdr_fields-1 DOWNTO 0) := "1"&"101"&"111011111001"&"0100"&"100";
-- Default use destination MAC/IP/UDP = 0, so these have to be MM programmed before -- Default use destination MAC/IP/UDP = 0, so these have to be MM programmed
-- eth_tester packets can be send. -- before eth_tester packets can be send.
CONSTANT c_eth_tester_hdr_field_arr : t_common_field_arr(c_eth_tester_nof_hdr_fields-1 DOWNTO 0) := ( CONSTANT c_eth_tester_hdr_field_arr : t_common_field_arr(c_eth_tester_nof_hdr_fields-1 DOWNTO 0) := (
( field_name_pad("word_align" ), "RW", 16, field_default(0) ), -- Tx TSE IP will strip these 2 padding bytes ( field_name_pad("word_align" ), "RW", 16, field_default(0) ), -- Tx TSE IP will strip these 2 padding bytes
( field_name_pad("eth_dst_mac" ), "RW", 48, field_default(0) ), -- c_eth_tester_eth_dst_mac ( field_name_pad("eth_dst_mac" ), "RW", 48, field_default(0) ), -- c_eth_tester_eth_dst_mac
...@@ -87,9 +93,15 @@ PACKAGE eth_tester_pkg is ...@@ -87,9 +93,15 @@ PACKAGE eth_tester_pkg is
CONSTANT c_eth_tester_app_hdr_len : NATURAL := 12; -- octets CONSTANT c_eth_tester_app_hdr_len : NATURAL := 12; -- octets
CONSTANT c_eth_tester_eth_src_mac_47_16 : STD_LOGIC_VECTOR(31 DOWNTO 0) := x"00228608"; -- 00:22:86:08:pp:qq = UNB_ETH_SRC_MAC_BASE in libraries/unb_osy/unbos_eth.h -- Destinations:
CONSTANT c_eth_tester_ip_src_addr_31_16 : STD_LOGIC_VECTOR(15 DOWNTO 0) := x"0A63"; -- 10.99.xx.yy = g_base_ip in ctrl_unb2#_board.vhd used in libraries/unb_osy/unbos_eth.c -- . MAC address 00:22:86:08:pp:qq = UNB_ETH_SRC_MAC_BASE in
CONSTANT c_eth_tester_udp_src_port_15_8 : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"E0"; -- TBC, 7:0 = gn_id (= ID[7:0] = backplane[5:0] & node[1:0]) -- libraries/unb_osy/unbos_eth.h, pp = backplane ID, qq = node ID
-- . IP address 10.99.xx.yy = g_base_ip in ctrl_unb2#_board.vhd used in
-- libraries/unb_osy/unbos_eth.c, xx = backplane ID, yy = node ID + 1
-- . UDP port 15:8 = E0, 7:0 = gn_id (= ID[7:0] = backplane[5:0] & node[1:0])
CONSTANT c_eth_tester_eth_src_mac_47_16 : STD_LOGIC_VECTOR(31 DOWNTO 0) := x"00228608";
CONSTANT c_eth_tester_ip_src_addr_31_16 : STD_LOGIC_VECTOR(15 DOWNTO 0) := x"0A63";
CONSTANT c_eth_tester_udp_src_port_15_8 : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"E0";
TYPE t_eth_tester_app_header IS RECORD TYPE t_eth_tester_app_header IS RECORD
dp_reserved : STD_LOGIC_VECTOR(30 DOWNTO 0); dp_reserved : STD_LOGIC_VECTOR(30 DOWNTO 0);
......
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