31 lines
1.2 KiB
VHDL
31 lines
1.2 KiB
VHDL
-- -------------------------------------------------------------------------- --
|
|
-- TRASHERNET - A Trashy Ethernet Stack for FPGAs --
|
|
-- -------------------------------------------------------------------------- --
|
|
-- trashernet_types.vhd : VHDL types used throughout Trashernet
|
|
-- -------------------------------------------------------------------------- --
|
|
-- Author : Markus Koch <markus@notsyncing.net>
|
|
-- Contributors : None
|
|
-- License : Mozilla Public License (MPL) Version 2
|
|
-- -------------------------------------------------------------------------- --
|
|
|
|
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
|
|
package trashernet_pkg is
|
|
subtype byte is std_logic_vector(7 downto 0);
|
|
type byte_vector is array (natural range <>) of byte;
|
|
subtype mac_addr_t is byte_vector(0 to 5);
|
|
subtype ip_addr_t is byte_vector(0 to 3);
|
|
subtype ethertype_t is byte_vector(0 to 1);
|
|
|
|
type mac_header_fields is record
|
|
mac_destination : mac_addr_t; -- Destination MAC address
|
|
mac_source : mac_addr_t; -- Source MAC address
|
|
mac_ethertype : ethertype_t; -- Ethertype or length
|
|
end record mac_header_fields;
|
|
end package trashernet_pkg;
|
|
|
|
package body trashernet_pkg is
|
|
|
|
end package body trashernet_pkg;
|