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/] [eth/] [comp/] [ethcomp.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
library ieee;
20
use ieee.std_logic_1164.all;
21
 
22
package ethcomp is
23
  component grethc is
24
    generic(
25
      ifg_gap        : integer := 24;
26
      attempt_limit  : integer := 16;
27
      backoff_limit  : integer := 10;
28
      mdcscaler      : integer range 0 to 255 := 25;
29
      enable_mdio    : integer range 0 to 1 := 0;
30
      fifosize       : integer range 4 to 512 := 8;
31
      nsync          : integer range 1 to 2 := 2;
32
      edcl           : integer range 0 to 2 := 0;
33
      edclbufsz      : integer range 1 to 64 := 1;
34
      macaddrh       : integer := 16#00005E#;
35
      macaddrl       : integer := 16#000000#;
36
      ipaddrh        : integer := 16#c0a8#;
37
      ipaddrl        : integer := 16#0035#;
38
      phyrstadr      : integer range 0 to 32 := 0;
39
      rmii           : integer range 0 to 1  := 0;
40
      oepol          : integer range 0 to 1  := 0;
41
      scanen         : integer range 0 to 1  := 0);
42
    port(
43
      rst            : in  std_ulogic;
44
      clk            : in  std_ulogic;
45
      --ahb mst in
46
      hgrant         : in  std_ulogic;
47
      hready         : in  std_ulogic;
48
      hresp          : in  std_logic_vector(1 downto 0);
49
      hrdata         : in  std_logic_vector(31 downto 0);
50
      --ahb mst out
51
      hbusreq        : out  std_ulogic;
52
      hlock          : out  std_ulogic;
53
      htrans         : out  std_logic_vector(1 downto 0);
54
      haddr          : out  std_logic_vector(31 downto 0);
55
      hwrite         : out  std_ulogic;
56
      hsize          : out  std_logic_vector(2 downto 0);
57
      hburst         : out  std_logic_vector(2 downto 0);
58
      hprot          : out  std_logic_vector(3 downto 0);
59
      hwdata         : out  std_logic_vector(31 downto 0);
60
      --apb slv in 
61
      psel         : in   std_ulogic;
62
      penable      : in   std_ulogic;
63
      paddr        : in   std_logic_vector(31 downto 0);
64
      pwrite       : in   std_ulogic;
65
      pwdata       : in   std_logic_vector(31 downto 0);
66
      --apb slv out
67
      prdata       : out  std_logic_vector(31 downto 0);
68
      --irq
69
      irq            : out  std_logic;
70
      --rx ahb fifo
71
      rxrenable      : out  std_ulogic;
72
      rxraddress     : out  std_logic_vector(10 downto 0);
73
      rxwrite        : out  std_ulogic;
74
      rxwdata        : out  std_logic_vector(31 downto 0);
75
      rxwaddress     : out  std_logic_vector(10 downto 0);
76
      rxrdata        : in   std_logic_vector(31 downto 0);
77
      --tx ahb fifo  
78
      txrenable      : out  std_ulogic;
79
      txraddress     : out  std_logic_vector(10 downto 0);
80
      txwrite        : out  std_ulogic;
81
      txwdata        : out  std_logic_vector(31 downto 0);
82
      txwaddress     : out  std_logic_vector(10 downto 0);
83
      txrdata        : in   std_logic_vector(31 downto 0);
84
      --edcl buf     
85
      erenable       : out  std_ulogic;
86
      eraddress      : out  std_logic_vector(15 downto 0);
87
      ewritem        : out  std_ulogic;
88
      ewritel        : out  std_ulogic;
89
      ewaddressm     : out  std_logic_vector(15 downto 0);
90
      ewaddressl     : out  std_logic_vector(15 downto 0);
91
      ewdata         : out  std_logic_vector(31 downto 0);
92
      erdata         : in   std_logic_vector(31 downto 0);
93
      --ethernet input signals
94
      rmii_clk       : in   std_ulogic;
95
      tx_clk         : in   std_ulogic;
96
      rx_clk         : in   std_ulogic;
97
      rxd            : in   std_logic_vector(3 downto 0);
98
      rx_dv          : in   std_ulogic;
99
      rx_er          : in   std_ulogic;
100
      rx_col         : in   std_ulogic;
101
      rx_crs         : in   std_ulogic;
102
      mdio_i         : in   std_ulogic;
103
      phyrstaddr     : in   std_logic_vector(4 downto 0);
104
      --ethernet output signals
105
      reset          : out  std_ulogic;
106
      txd            : out  std_logic_vector(3 downto 0);
107
      tx_en          : out  std_ulogic;
108
      tx_er          : out  std_ulogic;
109
      mdc            : out  std_ulogic;
110
      mdio_o         : out  std_ulogic;
111
      mdio_oe        : out  std_ulogic;
112
      --scantest
113
      testrst        : in   std_ulogic;
114
      testen         : in   std_ulogic;
115
      edcladdr       : in  std_logic_vector(3 downto 0) := "0000"
116
      );
117
  end component;
118
 
119
  component greth_gbitc is
120
    generic(
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
      --ahb mst in
142
      hgrant         : in  std_ulogic;
143
      hready         : in  std_ulogic;
144
      hresp          : in  std_logic_vector(1 downto 0);
145
      hrdata         : in  std_logic_vector(31 downto 0);
146
      --ahb mst out
147
      hbusreq        : out  std_ulogic;
148
      hlock          : out  std_ulogic;
149
      htrans         : out  std_logic_vector(1 downto 0);
150
      haddr          : out  std_logic_vector(31 downto 0);
151
      hwrite         : out  std_ulogic;
152
      hsize          : out  std_logic_vector(2 downto 0);
153
      hburst         : out  std_logic_vector(2 downto 0);
154
      hprot          : out  std_logic_vector(3 downto 0);
155
      hwdata         : out  std_logic_vector(31 downto 0);
156
      --apb slv in 
157
      psel         : in   std_ulogic;
158
      penable      : in   std_ulogic;
159
      paddr        : in   std_logic_vector(31 downto 0);
160
      pwrite       : in   std_ulogic;
161
      pwdata       : in   std_logic_vector(31 downto 0);
162
      --apb slv out
163
      prdata       : out  std_logic_vector(31 downto 0);
164
      --irq
165
      irq            : out  std_logic;
166
      --rx ahb fifo
167
      rxrenable      : out  std_ulogic;
168
      rxraddress     : out  std_logic_vector(8 downto 0);
169
      rxwrite        : out  std_ulogic;
170
      rxwdata        : out  std_logic_vector(31 downto 0);
171
      rxwaddress     : out  std_logic_vector(8 downto 0);
172
      rxrdata        : in   std_logic_vector(31 downto 0);
173
      --tx ahb fifo  
174
      txrenable      : out  std_ulogic;
175
      txraddress     : out  std_logic_vector(8 downto 0);
176
      txwrite        : out  std_ulogic;
177
      txwdata        : out  std_logic_vector(31 downto 0);
178
      txwaddress     : out  std_logic_vector(8 downto 0);
179
      txrdata        : in   std_logic_vector(31 downto 0);
180
      --edcl buf     
181
      erenable       : out  std_ulogic;
182
      eraddress      : out  std_logic_vector(15 downto 0);
183
      ewritem        : out  std_ulogic;
184
      ewritel        : out  std_ulogic;
185
      ewaddressm     : out  std_logic_vector(15 downto 0);
186
      ewaddressl     : out  std_logic_vector(15 downto 0);
187
      ewdata         : out  std_logic_vector(31 downto 0);
188
      erdata         : in   std_logic_vector(31 downto 0);
189
      --ethernet input signals
190
      gtx_clk        : in   std_ulogic;
191
      tx_clk         : in   std_ulogic;
192
      rx_clk         : in   std_ulogic;
193
      rxd            : in   std_logic_vector(7 downto 0);
194
      rx_dv          : in   std_ulogic;
195
      rx_er          : in   std_ulogic;
196
      rx_col         : in   std_ulogic;
197
      rx_crs         : in   std_ulogic;
198
      mdio_i         : in   std_ulogic;
199
      phyrstaddr     : in   std_logic_vector(4 downto 0);
200
      --ethernet output signals
201
      reset          : out  std_ulogic;
202
      txd            : out  std_logic_vector(7 downto 0);
203
      tx_en          : out  std_ulogic;
204
      tx_er          : out  std_ulogic;
205
      mdc            : out  std_ulogic;
206
      mdio_o         : out  std_ulogic;
207
      mdio_oe        : out  std_ulogic;
208
      --scantest
209
      testrst        : in   std_ulogic;
210
      testen         : in   std_ulogic
211
    );
212
  end component;
213
 
214
  component greth_gen is
215
    generic(
216
      memtech        : integer := 0;
217
      ifg_gap        : integer := 24;
218
      attempt_limit  : integer := 16;
219
      backoff_limit  : integer := 10;
220
      mdcscaler      : integer range 0 to 255 := 25;
221
      enable_mdio    : integer range 0 to 1 := 0;
222
      fifosize       : integer range 4 to 64 := 8;
223
      nsync          : integer range 1 to 2 := 2;
224
      edcl           : integer range 0 to 1 := 0;
225
      edclbufsz      : integer range 1 to 64 := 1;
226
      macaddrh       : integer := 16#00005E#;
227
      macaddrl       : integer := 16#000000#;
228
      ipaddrh        : integer := 16#c0a8#;
229
      ipaddrl        : integer := 16#0035#;
230
      phyrstadr      : integer range 0 to 31 := 0;
231
      rmii           : integer range 0 to 1  := 0;
232
      oepol         : integer range 0 to 1  := 0;
233
      scanen        : integer range 0 to 1  := 0);
234
    port(
235
      rst            : in  std_ulogic;
236
      clk            : in  std_ulogic;
237
      --ahb mst in
238
      hgrant         : in  std_ulogic;
239
      hready         : in  std_ulogic;
240
      hresp          : in  std_logic_vector(1 downto 0);
241
      hrdata         : in  std_logic_vector(31 downto 0);
242
      --ahb mst out
243
      hbusreq        : out  std_ulogic;
244
      hlock          : out  std_ulogic;
245
      htrans         : out  std_logic_vector(1 downto 0);
246
      haddr          : out  std_logic_vector(31 downto 0);
247
      hwrite         : out  std_ulogic;
248
      hsize          : out  std_logic_vector(2 downto 0);
249
      hburst         : out  std_logic_vector(2 downto 0);
250
      hprot          : out  std_logic_vector(3 downto 0);
251
      hwdata         : out  std_logic_vector(31 downto 0);
252
      --apb slv in 
253
      psel         : in   std_ulogic;
254
      penable      : in   std_ulogic;
255
      paddr        : in   std_logic_vector(31 downto 0);
256
      pwrite       : in   std_ulogic;
257
      pwdata       : in   std_logic_vector(31 downto 0);
258
      --apb slv out
259
      prdata       : out  std_logic_vector(31 downto 0);
260
      --irq
261
      irq            : out  std_logic;
262
      --ethernet input signals
263
      rmii_clk       : in   std_ulogic;
264
      tx_clk         : in   std_ulogic;
265
      rx_clk         : in   std_ulogic;
266
      rxd            : in   std_logic_vector(3 downto 0);
267
      rx_dv          : in   std_ulogic;
268
      rx_er          : in   std_ulogic;
269
      rx_col         : in   std_ulogic;
270
      rx_crs         : in   std_ulogic;
271
      mdio_i         : in   std_ulogic;
272
      phyrstaddr     : in   std_logic_vector(4 downto 0);
273
      --ethernet output signals
274
      reset          : out  std_ulogic;
275
      txd            : out  std_logic_vector(3 downto 0);
276
      tx_en          : out  std_ulogic;
277
      tx_er          : out  std_ulogic;
278
      mdc            : out  std_ulogic;
279
      mdio_o         : out  std_ulogic;
280
      mdio_oe        : out  std_ulogic;
281
      --scantest
282
      testrst        : in   std_ulogic;
283
      testen         : in   std_ulogic
284
    );
285
  end component;
286
 
287
  component greth_gbit_gen is
288
    generic(
289
      memtech        : integer := 0;
290
      ifg_gap        : integer := 24;
291
      attempt_limit  : integer := 16;
292
      backoff_limit  : integer := 10;
293
      slot_time      : integer := 128;
294
      mdcscaler      : integer range 0 to 255 := 25;
295
      nsync          : integer range 1 to 2 := 2;
296
      edcl           : integer range 0 to 1 := 0;
297
      edclbufsz      : integer range 1 to 64 := 1;
298
      burstlength    : integer range 4 to 128 := 32;
299
      macaddrh       : integer := 16#00005E#;
300
      macaddrl       : integer := 16#000000#;
301
      ipaddrh        : integer := 16#c0a8#;
302
      ipaddrl        : integer := 16#0035#;
303
      phyrstadr      : integer range 0 to 32 := 0;
304
      sim            : integer range 0 to 1 := 0;
305
      oepol          : integer range 0 to 1 := 0;
306
      scanen         : integer range 0 to 1 := 0);
307
    port(
308
      rst            : in  std_ulogic;
309
      clk            : in  std_ulogic;
310
      --ahb mst in
311
      hgrant         : in  std_ulogic;
312
      hready         : in  std_ulogic;
313
      hresp          : in  std_logic_vector(1 downto 0);
314
      hrdata         : in  std_logic_vector(31 downto 0);
315
      --ahb mst out
316
      hbusreq        : out  std_ulogic;
317
      hlock          : out  std_ulogic;
318
      htrans         : out  std_logic_vector(1 downto 0);
319
      haddr          : out  std_logic_vector(31 downto 0);
320
      hwrite         : out  std_ulogic;
321
      hsize          : out  std_logic_vector(2 downto 0);
322
      hburst         : out  std_logic_vector(2 downto 0);
323
      hprot          : out  std_logic_vector(3 downto 0);
324
      hwdata         : out  std_logic_vector(31 downto 0);
325
      --apb slv in 
326
      psel         : in   std_ulogic;
327
      penable      : in   std_ulogic;
328
      paddr        : in   std_logic_vector(31 downto 0);
329
      pwrite       : in   std_ulogic;
330
      pwdata       : in   std_logic_vector(31 downto 0);
331
      --apb slv out
332
      prdata       : out  std_logic_vector(31 downto 0);
333
      --irq
334
      irq            : out  std_logic;
335
      --ethernet input signals
336
      gtx_clk        : in   std_ulogic;
337
      tx_clk         : in   std_ulogic;
338
      rx_clk         : in   std_ulogic;
339
      rxd            : in   std_logic_vector(7 downto 0);
340
      rx_dv          : in   std_ulogic;
341
      rx_er          : in   std_ulogic;
342
      rx_col         : in   std_ulogic;
343
      rx_crs         : in   std_ulogic;
344
      mdio_i         : in   std_ulogic;
345
      phyrstaddr     : in   std_logic_vector(4 downto 0);
346
      --ethernet output signals
347
      reset          : out  std_ulogic;
348
      txd            : out  std_logic_vector(7 downto 0);
349
      tx_en          : out  std_ulogic;
350
      tx_er          : out  std_ulogic;
351
      mdc            : out  std_ulogic;
352
      mdio_o         : out  std_ulogic;
353
      mdio_oe        : out  std_ulogic;
354
      --scantest
355
      testrst        : in   std_ulogic;
356
      testen         : in   std_ulogic
357
      );
358
  end component;
359
end package;

powered by: WebSVN 2.1.0

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