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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [gaisler/] [net/] [net.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Entity:      net
20
-- File:        net.vhd
21
-- Author:      Jiri Gaisler - Gaisler Research
22
-- Description: Package with component and type declarations for network cores
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
library grlib;
28
use grlib.amba.all;
29
 
30
package net is
31
 
32
  type eth_in_type is record
33
    gtx_clk    : std_ulogic;
34
    rmii_clk   : std_ulogic;
35
    tx_clk     : std_ulogic;
36
    rx_clk     : std_ulogic;
37
    rxd        : std_logic_vector(7 downto 0);
38
    rx_dv      : std_ulogic;
39
    rx_er      : std_ulogic;
40
    rx_col     : std_ulogic;
41
    rx_crs     : std_ulogic;
42
    mdio_i     : std_ulogic;
43
    phyrstaddr : std_logic_vector(4 downto 0);
44
    edcladdr   : std_logic_vector(3 downto 0);
45
  end record;
46
 
47
  type eth_out_type is record
48
    reset   : std_ulogic;
49
    txd     : std_logic_vector(7 downto 0);
50
    tx_en   : std_ulogic;
51
    tx_er   : std_ulogic;
52
    mdc     : std_ulogic;
53
    mdio_o  : std_ulogic;
54
    mdio_oe : std_ulogic;
55
  end record;
56
 
57
  component eth_arb
58
    generic(
59
      fullduplex : integer := 0;
60
      mdiomaster : integer := 0);
61
    port(
62
      rst   : in std_logic;
63
      clk   : in std_logic;
64
      ethi  : in eth_in_type;
65
      etho  : out eth_out_type;
66
      methi : in eth_out_type;
67
      metho : out eth_in_type;
68
      dethi : in eth_out_type;
69
      detho : out eth_in_type
70
      );
71
  end component;
72
 
73
 
74
  component greth is
75
    generic(
76
      hindex         : integer := 0;
77
      pindex         : integer := 0;
78
      paddr          : integer := 0;
79
      pmask          : integer := 16#FFF#;
80
      pirq           : integer := 0;
81
      memtech        : integer := 0;
82
      ifg_gap        : integer := 24;
83
      attempt_limit  : integer := 16;
84
      backoff_limit  : integer := 10;
85
      slot_time      : integer := 128;
86
      mdcscaler      : integer range 0 to 255 := 25;
87
      enable_mdio    : integer range 0 to 1 := 0;
88
      fifosize       : integer range 4 to 512 := 8;
89
      nsync          : integer range 1 to 2 := 2;
90
      edcl           : integer range 0 to 2 := 0;
91
      edclbufsz      : integer range 1 to 64 := 1;
92
      macaddrh       : integer := 16#00005E#;
93
      macaddrl       : integer := 16#000000#;
94
      ipaddrh        : integer := 16#c0a8#;
95
      ipaddrl        : integer := 16#0035#;
96
      phyrstadr      : integer range 0 to 32 := 0;
97
      rmii           : integer range 0 to 1  := 0;
98
      oepol          : integer range 0 to 1  := 0;
99
      scanen         : integer range 0 to 1  := 0;
100
      ft             : integer range 0 to 1  := 0);
101
    port(
102
     rst            : in  std_ulogic;
103
     clk            : in  std_ulogic;
104
     ahbmi          : in  ahb_mst_in_type;
105
     ahbmo          : out ahb_mst_out_type;
106
     apbi           : in  apb_slv_in_type;
107
     apbo           : out apb_slv_out_type;
108
     ethi           : in  eth_in_type;
109
     etho           : out eth_out_type
110
    );
111
  end component;
112
 
113
  component greth_gbit is
114
    generic(
115
      hindex         : integer := 0;
116
      pindex         : integer := 0;
117
      paddr          : integer := 0;
118
      pmask          : integer := 16#FFF#;
119
      pirq           : integer := 0;
120
      memtech        : integer := 0;
121
      ifg_gap        : integer := 24;
122
      attempt_limit  : integer := 16;
123
      backoff_limit  : integer := 10;
124
      slot_time      : integer := 128;
125
      mdcscaler      : integer range 0 to 255 := 25;
126
      nsync          : integer range 1 to 2 := 2;
127
      edcl           : integer range 0 to 1 := 0;
128
      edclbufsz      : integer range 1 to 64 := 1;
129
      burstlength    : integer range 4 to 128 := 32;
130
      macaddrh       : integer := 16#00005E#;
131
      macaddrl       : integer := 16#000000#;
132
      ipaddrh        : integer := 16#c0a8#;
133
      ipaddrl        : integer := 16#0035#;
134
      phyrstadr      : integer range 0 to 32 := 0;
135
      sim            : integer range 0 to 1 := 0;
136
      oepol          : integer range 0 to 1  := 0;
137
      scanen         : integer range 0 to 1  := 0);
138
    port(
139
      rst            : in  std_ulogic;
140
      clk            : in  std_ulogic;
141
      ahbmi          : in  ahb_mst_in_type;
142
      ahbmo          : out ahb_mst_out_type;
143
      apbi           : in  apb_slv_in_type;
144
      apbo           : out apb_slv_out_type;
145
      ethi           : in  eth_in_type;
146
      etho           : out eth_out_type
147
    );
148
  end component;
149
 
150
  component grethm
151
  generic(
152
    hindex         : integer := 0;
153
    pindex         : integer := 0;
154
    paddr          : integer := 0;
155
    pmask          : integer := 16#FFF#;
156
    pirq           : integer := 0;
157
    memtech        : integer := 0;
158
    ifg_gap        : integer := 24;
159
    attempt_limit  : integer := 16;
160
    backoff_limit  : integer := 10;
161
    slot_time      : integer := 128;
162
    mdcscaler      : integer range 0 to 255 := 25;
163
    enable_mdio    : integer range 0 to 1 := 0;
164
    fifosize       : integer range 4 to 64 := 8;
165
    nsync          : integer range 1 to 2 := 2;
166
    edcl           : integer range 0 to 2 := 0;
167
    edclbufsz      : integer range 1 to 64 := 1;
168
    burstlength    : integer range 4 to 128 := 32;
169
    macaddrh       : integer := 16#00005E#;
170
    macaddrl       : integer := 16#000000#;
171
    ipaddrh        : integer := 16#c0a8#;
172
    ipaddrl        : integer := 16#0035#;
173
    phyrstadr      : integer range 0 to 32 := 0;
174
    rmii           : integer range 0 to 1 := 0;
175
    sim            : integer range 0 to 1 := 0;
176
    giga           : integer range 0 to 1  := 0;
177
    oepol          : integer range 0 to 1  := 0;
178
    scanen         : integer range 0 to 1  := 0);
179
  port(
180
    rst            : in  std_ulogic;
181
    clk            : in  std_ulogic;
182
    ahbmi          : in  ahb_mst_in_type;
183
    ahbmo          : out ahb_mst_out_type;
184
    apbi           : in  apb_slv_in_type;
185
    apbo           : out apb_slv_out_type;
186
    ethi           : in  eth_in_type;
187
    etho           : out eth_out_type
188
  );
189
  end component;
190
 
191
end;

powered by: WebSVN 2.1.0

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