OpenCores
URL https://opencores.org/ocsvn/udp_ip_stack/udp_ip_stack/trunk

Subversion Repositories udp_ip_stack

[/] [udp_ip_stack/] [trunk/] [rtl/] [vhdl/] [arp_types.vhd] - Blame information for rev 10

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 pjf
--
2
--      Package File Template
3
--
4
--      Purpose: This package defines supplemental types, subtypes, 
5
--               constants, and functions 
6
--
7
--   To use any of the example code shown below, uncomment the lines and modify as necessary
8 10 pjf
--
9
-- Revision 0.02 - Added type definitions (store and network) for arpv2
10 2 pjf
 
11
library IEEE;
12
use IEEE.STD_LOGIC_1164.all;
13
 
14
package arp_types is
15
 
16 10 pjf
 
17
        -- arp lookup types
18
 
19 2 pjf
        type arp_req_req_type is
20
                record
21
                                lookup_req      : std_logic;                                                                    -- set high when wanting mac adr for the requested IP
22
                                ip                              : std_logic_vector (31 downto 0);
23
                end record;
24 10 pjf
 
25 2 pjf
        type arp_req_rslt_type is
26
                record
27
                                got_mac         : std_logic;                                                                    -- indicates that we got the mac
28
                                mac                     : std_logic_vector (47 downto 0);
29
                                got_err         : std_logic;                                                                    -- indicates that we got an error (prob a timeout)
30
                end record;
31 10 pjf
 
32
        type arp_entry_t is record
33
                ip                              : std_logic_vector (31 downto 0);
34
                mac                             : std_logic_vector (47 downto 0);
35
        end record;
36 2 pjf
 
37 10 pjf
        type arp_control_type is
38
                record
39
                                clear_cache     : std_logic;
40
                end record;
41
 
42
        -- arp store types
43
 
44
        type arp_store_rslt_t is (IDLE,BUSY,SEARCHING,FOUND,NOT_FOUND);
45
 
46
        type arp_store_rdrequest_t is
47
                record
48
                        req                             : std_logic;                                                            -- request to lookup
49
                        ip                                      : std_logic_vector(31 downto 0);         -- contains ip to lookup
50
                end record;
51
 
52
        type arp_store_wrrequest_t is
53
                record
54
                        req                             : std_logic;                                                            -- request to store
55
                        entry                           : arp_entry_t;                                                          -- ip,mac to store
56
                end record;
57
 
58
        type arp_store_result_t is
59
                record
60
                        status                  : arp_store_rslt_t;                                             -- status of the request
61
                        entry                           : arp_entry_t;                                                          -- contains ip,mac if found
62
                end record;
63
 
64
        -- arp network types
65
 
66
        type arp_nwk_rslt_t is (IDLE,REQUESTING,RECEIVED,ERROR);
67
 
68
        type arp_nwk_request_t is
69
                record
70
                        req                             : std_logic;                                                            -- request to resolve IP addr
71
                        ip                                      : std_logic_vector(31 downto 0);         -- IP to request
72
                end record;
73
 
74
        type arp_nwk_result_t is
75
                record
76
                        status                  : arp_nwk_rslt_t;                                                       -- status of request
77
                        entry                           : arp_entry_t;                                                          -- the result
78
                end record;
79
 
80
 
81 2 pjf
end arp_types;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.