ipv4: Add rx_length field
This commit is contained in:
parent
fdcb1cb719
commit
87bc9ce3d7
@ -133,6 +133,7 @@ begin
|
|||||||
ipv4_out.rx_data_valid <= ethernet_ii_out.rx_data_valid when state = PAYLOAD else '0';
|
ipv4_out.rx_data_valid <= ethernet_ii_out.rx_data_valid when state = PAYLOAD else '0';
|
||||||
ipv4_out.rx_ip_address <= sr_source_ip;
|
ipv4_out.rx_ip_address <= sr_source_ip;
|
||||||
ipv4_out.rx_protocol <= sr_protocol;
|
ipv4_out.rx_protocol <= sr_protocol;
|
||||||
|
ipv4_out.rx_length <= unsigned(std_logic_vector'(sr_total_length(2) & sr_total_length(3))) - to_integer(unsigned(sr_ihl)) * 4;
|
||||||
|
|
||||||
end block rx;
|
end block rx;
|
||||||
|
|
||||||
|
@ -68,6 +68,7 @@ begin
|
|||||||
mux : for i in ipv4_protocol_out'range generate
|
mux : for i in ipv4_protocol_out'range generate
|
||||||
ipv4_protocol_out(i).rx_data <= ipv4_out.rx_data;
|
ipv4_protocol_out(i).rx_data <= ipv4_out.rx_data;
|
||||||
ipv4_protocol_out(i).rx_ip_address <= ipv4_out.rx_ip_address;
|
ipv4_protocol_out(i).rx_ip_address <= ipv4_out.rx_ip_address;
|
||||||
|
ipv4_protocol_out(i).rx_length <= ipv4_out.rx_length;
|
||||||
ipv4_protocol_out(i).rx_data_valid <= ipv4_out.rx_data_valid when rx_sel = i else '0';
|
ipv4_protocol_out(i).rx_data_valid <= ipv4_out.rx_data_valid when rx_sel = i else '0';
|
||||||
ipv4_protocol_out(i).rx_error_stb <= ipv4_out.rx_error_stb when rx_sel = i else '0';
|
ipv4_protocol_out(i).rx_error_stb <= ipv4_out.rx_error_stb when rx_sel = i else '0';
|
||||||
ipv4_protocol_out(i).rx_ok_stb <= ipv4_out.rx_ok_stb when rx_sel = i else '0';
|
ipv4_protocol_out(i).rx_ok_stb <= ipv4_out.rx_ok_stb when rx_sel = i else '0';
|
||||||
|
@ -147,6 +147,7 @@ package trashernet_pkg is
|
|||||||
type ipv4_out_t is record
|
type ipv4_out_t is record
|
||||||
rx_ip_address : ip_addr_t; -- Source IP address
|
rx_ip_address : ip_addr_t; -- Source IP address
|
||||||
rx_protocol : ipv4_protocol; -- Transport Protocol
|
rx_protocol : ipv4_protocol; -- Transport Protocol
|
||||||
|
rx_length : ipv4_length; -- Telegram length (excluding header)
|
||||||
|
|
||||||
rx_data : byte; -- RX data
|
rx_data : byte; -- RX data
|
||||||
rx_data_valid : std_logic; -- RX data valid strobe
|
rx_data_valid : std_logic; -- RX data valid strobe
|
||||||
@ -168,6 +169,7 @@ package trashernet_pkg is
|
|||||||
|
|
||||||
type ipv4_protocol_out_t is record
|
type ipv4_protocol_out_t is record
|
||||||
rx_ip_address : ip_addr_t; -- Source IP address
|
rx_ip_address : ip_addr_t; -- Source IP address
|
||||||
|
rx_length : ipv4_length; -- Telegram length (excluding header)
|
||||||
|
|
||||||
rx_data : byte; -- RX data
|
rx_data : byte; -- RX data
|
||||||
rx_data_valid : std_logic; -- RX data valid strobe
|
rx_data_valid : std_logic; -- RX data valid strobe
|
||||||
|
Loading…
Reference in New Issue
Block a user