Package: EthMacPkg
- File: EthMacPkg.vhd
Constants
| Name | Type | Value | Description |
|---|---|---|---|
| MAC_ADDR_INIT_C | slv(47 downto 0) | x"000000560008" | |
| ARP_TYPE_C | slv(15 downto 0) | x"0608" | EtherType = ARP = 0x0806 |
| IPV4_TYPE_C | slv(15 downto 0) | x"0008" | EtherType = IPV4 = 0x0800 |
| VLAN_TYPE_C | slv(15 downto 0) | x"0081" | EtherType = VLAN = 0x8100 |
| UDP_C | slv(7 downto 0) | x"11" | Protocol = UDP = 0x11 |
| TCP_C | slv(7 downto 0) | x"06" | Protocol = TCP = 0x06 |
| ICMP_C | slv(7 downto 0) | x"01" | Protocol = ICMP = 0x01 |
| DHCP_CPORT | slv(15 downto 0) | x"4400" | Port = 68 = 0x0044 |
| DHCP_SPORT | slv(15 downto 0) | x"4300" | Port = 67 = 0x0043 |
| EMAC_FRAG_BIT_C | integer | 0 | First TUSER Bits |
| EMAC_SOF_BIT_C | integer | 1 | |
| EMAC_EOFE_BIT_C | integer | 0 | Last TUSER Bits |
| EMAC_IPERR_BIT_C | integer | 1 | |
| EMAC_TCPERR_BIT_C | integer | 2 | |
| EMAC_UDPERR_BIT_C | integer | 3 | |
| EMAC_AXIS_CONFIG_C | AxiStreamConfigType | ( -- TDEST_INTERLEAVE_C => false, TSTRB_EN_C => false, TDATA_BYTES_C => 16, TDEST_BITS_C => 8, TID_BITS_C => 0, TKEEP_MODE_C => TKEEP_COMP_C, TUSER_BITS_C => 4, TUSER_MODE_C => TUSER_FIRST_LAST_C) |
Ethernet AXI Stream Configuration |
| INT_EMAC_AXIS_CONFIG_C | AxiStreamConfigType | ( -- TDEST_INTERLEAVE_C => EMAC_AXIS_CONFIG_C.TDEST_INTERLEAVE_C, TSTRB_EN_C => EMAC_AXIS_CONFIG_C.TSTRB_EN_C, TDATA_BYTES_C => EMAC_AXIS_CONFIG_C.TDATA_BYTES_C, TDEST_BITS_C => 0, -- TDEST not used internally of EthMacTop.vhd TID_BITS_C => EMAC_AXIS_CONFIG_C.TID_BITS_C, TKEEP_MODE_C => EMAC_AXIS_CONFIG_C.TKEEP_MODE_C, TUSER_BITS_C => EMAC_AXIS_CONFIG_C.TUSER_BITS_C, TUSER_MODE_C => EMAC_AXIS_CONFIG_C.TUSER_MODE_C) |
Ethernet AXI Stream Configuration that's optimized for 141-bit FIFO interface (2 x 72b input BRAMs) |
| ETH_MAC_CONFIG_INIT_C | EthMacConfigType | ( macAddress => MAC_ADDR_INIT_C, filtEnable => '1', pauseEnable => '1', pauseTime => x"00FF", pauseThresh => toSlv((9000/16), 16), -- 9000B jumbo frame in cache ipCsumEn => '1', tcpCsumEn => '1', udpCsumEn => '1', dropOnPause => '0') |
|
| ETH_MAC_STATUS_INIT_C | EthMacStatusType | ( rxFifoDropCnt => '0', rxPauseCnt => '0', txPauseCnt => '0', rxCountEn => '0', rxOverFlow => '0', rxCrcErrorCnt => '0', txCountEn => '0', txUnderRunCnt => '0', txNotReadyCnt => '0') |
|
| EMAC_CSUM_PIPELINE_C | natural | 3 | |
| ETH_MAC_CSUM_ACCUM_INIT_C | EthMacCsumAccumType | ( step => (others => '0'), sum1 => (others => (others => '0')), sum3 => (others => '0'), sum5 => (others => '0')) |
Types
| Name | Type | Description |
|---|---|---|
| EthMacConfigType | Generic XMAC Configuration | |
| EthMacConfigArray | array (natural range<>) of EthMacConfigType | |
| EthMacStatusType | Generic XMAC Status | |
| EthMacStatusArray | array (natural range<>) of EthMacStatusType | |
| EthMacCsumAccumType | ||
| EthMacCsumAccumArray | array (natural range<>) of EthMacCsumAccumType |
Functions
- EthPortArrayBigEndian (portNum : PositiveArray;
portSize : positive) return Slv16Array
- GetEthMacCsum ( udpDet : in sl;
last : in sl;
hdr : in Slv8Array(19 downto 0);
-- IPv4 Header tKeep : in slv(15 downto 0);
-- TCP/Data tKeep tData : in slv(127 downto 0);
-- TCP/Data tKeep len : in slv(15 downto 0);
ibcsum : in slv(15 downto 0);
-- TCP/UDP checksum to compare r : in EthMacCsumAccumArray(1 downto 0);
v : inout EthMacCsumAccumArray(1 downto 0);
ipValid : inout sl;
ipCsum : inout slv(15 downto 0);
valid : inout sl;
csum : inout slv(15 downto 0)) return ()