Line 23... |
Line 23... |
USE ieee.std_logic_1164.ALL;
|
USE ieee.std_logic_1164.ALL;
|
use IEEE.NUMERIC_STD.ALL;
|
use IEEE.NUMERIC_STD.ALL;
|
use work.axi.all;
|
use work.axi.all;
|
use work.ipv4_types.all;
|
use work.ipv4_types.all;
|
use work.arp_types.all;
|
use work.arp_types.all;
|
|
use work.arp;
|
|
use work.arpv2;
|
|
|
entity IP_complete_nomac is
|
entity IP_complete_nomac is
|
generic (
|
generic (
|
CLOCK_FREQ : integer := 125000000; -- freq of data_in_clk -- needed to timout cntr
|
CLOCK_FREQ : integer := 125000000; -- freq of data_in_clk -- needed to timout cntr
|
ARP_TIMEOUT : integer := 60 -- ARP response timeout (s)
|
ARP_TIMEOUT : integer := 60; -- ARP response timeout (s)
|
|
ARP_MAX_PKT_TMO : integer := 5; -- # wrong nwk pkts received before set error
|
|
MAX_ARP_ENTRIES : integer := 255 -- max entries in the ARP store
|
);
|
);
|
Port (
|
Port (
|
-- IP Layer signals
|
-- IP Layer signals
|
ip_tx_start : in std_logic;
|
ip_tx_start : in std_logic;
|
ip_tx : in ipv4_tx_type; -- IP tx cxns
|
ip_tx : in ipv4_tx_type; -- IP tx cxns
|
Line 61... |
Line 65... |
mac_rx_tready : out std_logic; -- tells mac that we are ready to take data
|
mac_rx_tready : out std_logic; -- tells mac that we are ready to take data
|
mac_rx_tlast : in std_logic -- indicates last byte of the trame
|
mac_rx_tlast : in std_logic -- indicates last byte of the trame
|
);
|
);
|
end IP_complete_nomac;
|
end IP_complete_nomac;
|
|
|
|
|
architecture structural of IP_complete_nomac is
|
architecture structural of IP_complete_nomac is
|
|
|
COMPONENT IPv4
|
COMPONENT IPv4
|
PORT(
|
PORT(
|
-- IP Layer signals
|
-- IP Layer signals
|
Line 101... |
Line 106... |
END COMPONENT;
|
END COMPONENT;
|
|
|
COMPONENT arp
|
COMPONENT arp
|
generic (
|
generic (
|
CLOCK_FREQ : integer := 125000000; -- freq of data_in_clk -- needed to timout cntr
|
CLOCK_FREQ : integer := 125000000; -- freq of data_in_clk -- needed to timout cntr
|
ARP_TIMEOUT : integer := 60 -- ARP response timeout (s)
|
ARP_TIMEOUT : integer := 60; -- ARP response timeout (s)
|
|
ARP_MAX_PKT_TMO : integer := 1; -- (added for compatibility with arpv2. this value not used in this impl)
|
|
MAX_ARP_ENTRIES : integer := 1 -- (added for compatibility with arpv2. this value not used in this impl)
|
);
|
);
|
Port (
|
Port (
|
-- lookup request signals
|
-- lookup request signals
|
arp_req_req : in arp_req_req_type;
|
arp_req_req : in arp_req_req_type;
|
arp_req_rslt : out arp_req_rslt_type;
|
arp_req_rslt : out arp_req_rslt_type;
|
Line 156... |
Line 163... |
first : out std_logic; -- indicates first byte of frame
|
first : out std_logic; -- indicates first byte of frame
|
last : out std_logic -- indicates last byte of frame
|
last : out std_logic -- indicates last byte of frame
|
);
|
);
|
END COMPONENT;
|
END COMPONENT;
|
|
|
|
|
|
-------------------
|
|
-- Configuration
|
|
--
|
|
-- Enable one of the following to specify which
|
|
-- implementation of the ARP layer to use
|
|
-------------------
|
|
|
|
|
|
-- for arp_layer : arp use entity work.arp; -- single slot arbitrator
|
|
for arp_layer : arp use entity work.arpv2; -- multislot arbitrator
|
|
|
|
|
|
|
---------------------------
|
---------------------------
|
-- Signals
|
-- Signals
|
---------------------------
|
---------------------------
|
|
|
-- ARP REQUEST
|
-- ARP REQUEST
|
Line 236... |
Line 257... |
-- Instantiate the ARP layer
|
-- Instantiate the ARP layer
|
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
arp_layer : arp
|
arp_layer : arp
|
generic map (
|
generic map (
|
CLOCK_FREQ => CLOCK_FREQ,
|
CLOCK_FREQ => CLOCK_FREQ,
|
ARP_TIMEOUT => ARP_TIMEOUT
|
ARP_TIMEOUT => ARP_TIMEOUT,
|
|
ARP_MAX_PKT_TMO => ARP_MAX_PKT_TMO,
|
|
MAX_ARP_ENTRIES => MAX_ARP_ENTRIES
|
)
|
)
|
Port map(
|
Port map(
|
-- request signals
|
-- request signals
|
arp_req_req => arp_req_req_int,
|
arp_req_req => arp_req_req_int,
|
arp_req_rslt => arp_req_rslt_int,
|
arp_req_rslt => arp_req_rslt_int,
|
Line 296... |
Line 319... |
);
|
);
|
|
|
end structural;
|
end structural;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|