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

Subversion Repositories ethmac

[/] [ethmac/] [branches/] [unneback/] [rtl/] [verilog/] [eth_defines.v] - Blame information for rev 302

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 15 mohor
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  eth_defines.v                                               ////
4
////                                                              ////
5
////  This file is part of the Ethernet IP core project           ////
6 37 mohor
////  http://www.opencores.org/projects/ethmac/                   ////
7 15 mohor
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - Igor Mohor (igorM@opencores.org)                      ////
10
////                                                              ////
11 203 mohor
////  All additional information is available in the Readme.txt   ////
12 15 mohor
////  file.                                                       ////
13
////                                                              ////
14
//////////////////////////////////////////////////////////////////////
15
////                                                              ////
16 203 mohor
//// Copyright (C) 2001, 2002 Authors                             ////
17 15 mohor
////                                                              ////
18
//// This source file may be used and distributed without         ////
19
//// restriction provided that this copyright statement is not    ////
20
//// removed from the file and that any derivative work contains  ////
21
//// the original copyright notice and the associated disclaimer. ////
22
////                                                              ////
23
//// This source file is free software; you can redistribute it   ////
24
//// and/or modify it under the terms of the GNU Lesser General   ////
25
//// Public License as published by the Free Software Foundation; ////
26
//// either version 2.1 of the License, or (at your option) any   ////
27
//// later version.                                               ////
28
////                                                              ////
29
//// This source is distributed in the hope that it will be       ////
30
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
31
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
32
//// PURPOSE.  See the GNU Lesser General Public License for more ////
33
//// details.                                                     ////
34
////                                                              ////
35
//// You should have received a copy of the GNU Lesser General    ////
36
//// Public License along with this source; if not, download it   ////
37
//// from http://www.opencores.org/lgpl.shtml                     ////
38
////                                                              ////
39
//////////////////////////////////////////////////////////////////////
40
//
41
// CVS Revision History
42
//
43
// $Log: not supported by cvs2svn $
44 302 markom
// Revision 1.31  2003/08/14 16:42:58  simons
45
// Artisan ram instance added.
46
//
47 297 simons
// Revision 1.30  2003/06/13 11:55:37  mohor
48
// Define file in eth_cop.v is changed to eth_defines.v. Some defines were
49
// moved from tb_eth_defines.v to eth_defines.v.
50
//
51 286 mohor
// Revision 1.29  2002/11/19 18:13:49  mohor
52
// r_MiiMRst is not used for resetting the MIIM module. wb_rst used instead.
53
//
54 253 mohor
// Revision 1.28  2002/11/15 14:27:15  mohor
55
// Since r_Rst bit is not used any more, default value is changed to 0xa000.
56
//
57 246 mohor
// Revision 1.27  2002/11/01 18:19:34  mohor
58
// Defines fixed to use generic RAM by default.
59
//
60 238 mohor
// Revision 1.26  2002/10/24 18:53:03  mohor
61
// fpga define added.
62
//
63 232 mohor
// Revision 1.3  2002/10/11 16:57:54  igorm
64
// eth_defines.v tagged with rel_5 used.
65
//
66
// Revision 1.25  2002/10/10 16:47:44  mohor
67
// Defines changed to have ETH_ prolog.
68
// ETH_WISHBONE_B# define added.
69
//
70 213 mohor
// Revision 1.24  2002/10/10 16:33:11  mohor
71
// Bist added.
72
//
73 211 mohor
// Revision 1.23  2002/09/23 18:22:48  mohor
74
// Virtual Silicon RAM might be used in the ASIC implementation of the ethernet
75
// core.
76
//
77 203 mohor
// Revision 1.22  2002/09/04 18:36:49  mohor
78
// Defines for control registers added (ETH_TXCTRL and ETH_RXCTRL).
79
//
80 145 mohor
// Revision 1.21  2002/08/16 22:09:47  mohor
81
// Defines for register width added. mii_rst signal in MIIMODER register
82
// changed.
83
//
84 137 mohor
// Revision 1.20  2002/08/14 19:31:48  mohor
85
// Register TX_BD_NUM is changed so it contains value of the Tx buffer descriptors. No
86
// need to multiply or devide any more.
87
//
88 134 mohor
// Revision 1.19  2002/07/23 15:28:31  mohor
89
// Ram , used for BDs changed from generic_spram to eth_spram_256x32.
90
//
91 119 mohor
// Revision 1.18  2002/05/03 10:15:50  mohor
92
// Outputs registered. Reset changed for eth_wishbone module.
93
//
94 106 mohor
// Revision 1.17  2002/04/24 08:52:19  mohor
95
// Compiler directives added. Tx and Rx fifo size incremented. A "late collision"
96
// bug fixed.
97
//
98 105 mohor
// Revision 1.16  2002/03/19 12:53:29  mohor
99
// Some defines that are used in testbench only were moved to tb_eth_defines.v
100
// file.
101
//
102 92 mohor
// Revision 1.15  2002/02/26 16:11:32  mohor
103
// Number of interrupts changed
104
//
105 73 mohor
// Revision 1.14  2002/02/16 14:03:44  mohor
106
// Registered trimmed. Unused registers removed.
107
//
108 68 mohor
// Revision 1.13  2002/02/16 13:06:33  mohor
109
// EXTERNAL_DMA used instead of WISHBONE_DMA.
110
//
111 67 mohor
// Revision 1.12  2002/02/15 10:58:31  mohor
112
// Changed that were lost with last update put back to the file.
113
//
114 55 mohor
// Revision 1.11  2002/02/14 20:19:41  billditt
115
// Modified for Address Checking,
116
// addition of eth_addrcheck.v
117
//
118
// Revision 1.10  2002/02/12 17:01:19  mohor
119
// HASH0 and HASH1 registers added. 
120
 
121 46 mohor
// Revision 1.9  2002/02/08 16:21:54  mohor
122
// Rx status is written back to the BD.
123
//
124 42 mohor
// Revision 1.8  2002/02/05 16:44:38  mohor
125
// Both rx and tx part are finished. Tested with wb_clk_i between 10 and 200
126
// MHz. Statuses, overrun, control frame transmission and reception still  need
127
// to be fixed.
128
//
129 40 mohor
// Revision 1.7  2002/01/23 10:28:16  mohor
130
// Link in the header changed.
131
//
132 37 mohor
// Revision 1.6  2001/12/05 15:00:16  mohor
133
// RX_BD_NUM changed to TX_BD_NUM (holds number of TX descriptors
134
// instead of the number of RX descriptors).
135
//
136 34 mohor
// Revision 1.5  2001/12/05 10:21:37  mohor
137
// ETH_RX_BD_ADR register deleted. ETH_RX_BD_NUM is used instead.
138
//
139 32 mohor
// Revision 1.4  2001/11/13 14:23:56  mohor
140
// Generic memory model is used. Defines are changed for the same reason.
141
//
142 29 mohor
// Revision 1.3  2001/10/18 12:07:11  mohor
143
// Status signals changed, Adress decoding changed, interrupt controller
144
// added.
145
//
146 21 mohor
// Revision 1.2  2001/09/24 15:02:56  mohor
147
// Defines changed (All precede with ETH_). Small changes because some
148
// tools generate warnings when two operands are together. Synchronization
149
// between two clocks domains in eth_wishbonedma.v is changed (due to ASIC
150
// demands).
151
//
152 20 mohor
// Revision 1.1  2001/08/06 14:44:29  mohor
153
// A define FPGA added to select between Artisan RAM (for ASIC) and Block Ram (For Virtex).
154
// Include files fixed to contain no path.
155
// File names and module names changed ta have a eth_ prologue in the name.
156
// File eth_timescale.v is used to define timescale
157
// All pin names on the top module are changed to contain _I, _O or _OE at the end.
158
// Bidirectional signal MDIO is changed to three signals (Mdc_O, Mdi_I, Mdo_O
159
// and Mdo_OE. The bidirectional signal must be created on the top level. This
160
// is done due to the ASIC tools.
161
//
162 15 mohor
// Revision 1.1  2001/07/30 21:23:42  mohor
163
// Directory structure changed. Files checked and joind together.
164
//
165
//
166
//
167
//
168
//
169
 
170 32 mohor
 
171
 
172 232 mohor
//`define ETH_BIST                    // Bist for usage with Virtual Silicon RAMS
173 32 mohor
 
174 302 markom
`define ETH_MBIST_CTRL_WIDTH 3        // width of MBIST control bus
175 232 mohor
 
176 238 mohor
// Ethernet implemented in Xilinx Chips
177
// `define ETH_FIFO_XILINX             // Use Xilinx distributed ram for tx and rx fifo
178
// `define ETH_XILINX_RAMB4            // Selection of the used memory for Buffer descriptors
179 232 mohor
                                      // Core is going to be implemented in Virtex FPGA and contains Virtex 
180 29 mohor
                                      // specific elements. 
181 15 mohor
 
182 238 mohor
// Ethernet implemented in ASIC with Virtual Silicon RAMs
183
// `define ETH_VIRTUAL_SILICON_RAM     // Virtual Silicon RAMS used storing buffer decriptors (ASIC implementation)
184 297 simons
// `define ETH_ARTISAN_RAM             // Artisan RAMS used storing buffer decriptors (ASIC implementation)
185 238 mohor
 
186 55 mohor
`define ETH_MODER_ADR         8'h0    // 0x0 
187
`define ETH_INT_SOURCE_ADR    8'h1    // 0x4 
188
`define ETH_INT_MASK_ADR      8'h2    // 0x8 
189
`define ETH_IPGT_ADR          8'h3    // 0xC 
190
`define ETH_IPGR1_ADR         8'h4    // 0x10
191
`define ETH_IPGR2_ADR         8'h5    // 0x14
192
`define ETH_PACKETLEN_ADR     8'h6    // 0x18
193
`define ETH_COLLCONF_ADR      8'h7    // 0x1C
194
`define ETH_TX_BD_NUM_ADR     8'h8    // 0x20
195
`define ETH_CTRLMODER_ADR     8'h9    // 0x24
196
`define ETH_MIIMODER_ADR      8'hA    // 0x28
197
`define ETH_MIICOMMAND_ADR    8'hB    // 0x2C
198
`define ETH_MIIADDRESS_ADR    8'hC    // 0x30
199
`define ETH_MIITX_DATA_ADR    8'hD    // 0x34
200
`define ETH_MIIRX_DATA_ADR    8'hE    // 0x38
201
`define ETH_MIISTATUS_ADR     8'hF    // 0x3C
202
`define ETH_MAC_ADDR0_ADR     8'h10   // 0x40
203
`define ETH_MAC_ADDR1_ADR     8'h11   // 0x44
204
`define ETH_HASH0_ADR         8'h12   // 0x48
205
`define ETH_HASH1_ADR         8'h13   // 0x4C
206 145 mohor
`define ETH_TX_CTRL_ADR       8'h14   // 0x50
207
`define ETH_RX_CTRL_ADR       8'h15   // 0x54
208 15 mohor
 
209
 
210 246 mohor
`define ETH_MODER_DEF         17'h0A000
211 73 mohor
`define ETH_INT_MASK_DEF      7'h0
212 68 mohor
`define ETH_IPGT_DEF          7'h12
213
`define ETH_IPGR1_DEF         7'h0C
214
`define ETH_IPGR2_DEF         7'h12
215 105 mohor
`define ETH_PACKETLEN_DEF     32'h00400600
216 68 mohor
`define ETH_COLLCONF0_DEF     6'h3f
217
`define ETH_COLLCONF1_DEF     4'hF
218 134 mohor
`define ETH_TX_BD_NUM_DEF     8'h40
219 68 mohor
`define ETH_CTRLMODER_DEF     3'h0
220 137 mohor
`define ETH_MIIMODER_DEF      10'h064
221 68 mohor
`define ETH_MIIADDRESS0_DEF   5'h00
222
`define ETH_MIIADDRESS1_DEF   5'h00
223
`define ETH_MIITX_DATA_DEF    16'h0000
224
`define ETH_MIIRX_DATA_DEF    16'h0000
225 20 mohor
`define ETH_MIISTATUS_DEF     32'h00000000
226
`define ETH_MAC_ADDR0_DEF     32'h00000000
227 68 mohor
`define ETH_MAC_ADDR1_DEF     16'h0000
228 46 mohor
`define ETH_HASH0_DEF         32'h00000000
229
`define ETH_HASH1_DEF         32'h00000000
230 145 mohor
`define ETH_RX_CTRL_DEF       16'h0
231 15 mohor
 
232 40 mohor
 
233 137 mohor
`define ETH_MODER_WIDTH       17
234
`define ETH_INT_SOURCE_WIDTH  7
235
`define ETH_INT_MASK_WIDTH    7
236
`define ETH_IPGT_WIDTH        7
237
`define ETH_IPGR1_WIDTH       7
238
`define ETH_IPGR2_WIDTH       7
239
`define ETH_PACKETLEN_WIDTH   32
240
`define ETH_TX_BD_NUM_WIDTH   8
241
`define ETH_CTRLMODER_WIDTH   3
242 253 mohor
`define ETH_MIIMODER_WIDTH    9
243 137 mohor
`define ETH_MIITX_DATA_WIDTH  16
244
`define ETH_MIIRX_DATA_WIDTH  16
245
`define ETH_MIISTATUS_WIDTH   3
246
`define ETH_MAC_ADDR0_WIDTH   32
247
`define ETH_MAC_ADDR1_WIDTH   16
248
`define ETH_HASH0_WIDTH       32
249
`define ETH_HASH1_WIDTH       32
250 145 mohor
`define ETH_TX_CTRL_WIDTH     17
251
`define ETH_RX_CTRL_WIDTH     16
252 137 mohor
 
253
 
254 40 mohor
// Outputs are registered (uncomment when needed)
255 106 mohor
`define ETH_REGISTERED_OUTPUTS
256 40 mohor
 
257 213 mohor
// Settings for TX FIFO
258
`define ETH_TX_FIFO_CNT_WIDTH  5
259
`define ETH_TX_FIFO_DEPTH      16
260
`define ETH_TX_FIFO_DATA_WIDTH 32
261 40 mohor
 
262 213 mohor
// Settings for RX FIFO
263
`define ETH_RX_FIFO_CNT_WIDTH  5
264
`define ETH_RX_FIFO_DEPTH      16
265
`define ETH_RX_FIFO_DATA_WIDTH 32
266
 
267
// Burst length
268
`define ETH_BURST_LENGTH       4    // Change also ETH_BURST_CNT_WIDTH
269
`define ETH_BURST_CNT_WIDTH    3    // The counter must be width enough to count to ETH_BURST_LENGTH
270
 
271
// WISHBONE interface is Revision B3 compliant (uncomment when needed)
272
//`define ETH_WISHBONE_B3
273
 
274 286 mohor
 
275
// Following defines are needed when eth_cop.v is used. Otherwise they may be deleted.
276
`define ETH_BASE              32'hd0000000
277
`define ETH_WIDTH             32'h800
278
`define MEMORY_BASE           32'h2000
279
`define MEMORY_WIDTH          32'h10000
280
 
281
`define M1_ADDRESSED_S1 ( (m1_wb_adr_i >= `ETH_BASE)    & (m1_wb_adr_i < (`ETH_BASE    + `ETH_WIDTH   )) )
282
`define M1_ADDRESSED_S2 ( (m1_wb_adr_i >= `MEMORY_BASE) & (m1_wb_adr_i < (`MEMORY_BASE + `MEMORY_WIDTH)) )
283
`define M2_ADDRESSED_S1 ( (m2_wb_adr_i >= `ETH_BASE)    & (m2_wb_adr_i < (`ETH_BASE    + `ETH_WIDTH   )) )
284
`define M2_ADDRESSED_S2 ( (m2_wb_adr_i >= `MEMORY_BASE) & (m2_wb_adr_i < (`MEMORY_BASE + `MEMORY_WIDTH)) )
285
// Previous defines are only needed for eth_cop.v
286
 

powered by: WebSVN 2.1.0

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