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

Subversion Repositories mem_ctrl

[/] [mem_ctrl/] [trunk/] [rtl/] [verilog/] [mc_defines.v] - Blame information for rev 4

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

Line No. Rev Author Line
1 4 rudi
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  WISHBONE Memory Controller Definitions                     ////
4
////                                                             ////
5
////                                                             ////
6
////  Author: Rudolf Usselmann                                   ////
7
////          rudi@asics.ws                                      ////
8
////                                                             ////
9
////                                                             ////
10
////  Downloaded from: http://www.opencores.org/cores/mem_ctrl/  ////
11
////                                                             ////
12
/////////////////////////////////////////////////////////////////////
13
////                                                             ////
14
//// Copyright (C) 2000 Rudolf Usselmann                         ////
15
////                    rudi@asics.ws                            ////
16
////                                                             ////
17
//// This source file may be used and distributed without        ////
18
//// restriction provided that this copyright statement is not   ////
19
//// removed from the file and that any derivative work contains ////
20
//// the original copyright notice and the associated disclaimer.////
21
////                                                             ////
22
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
23
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
24
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
25
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
26
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
27
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
28
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
29
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
30
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
31
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
32
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
33
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
34
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
35
////                                                             ////
36
/////////////////////////////////////////////////////////////////////
37
 
38
//  CVS Log
39
//
40
//  $Id: mc_defines.v,v 1.1 2001-07-29 07:34:41 rudi Exp $
41
//
42
//  $Date: 2001-07-29 07:34:41 $
43
//  $Revision: 1.1 $
44
//  $Author: rudi $
45
//  $Locker:  $
46
//  $State: Exp $
47
//
48
// Change History:
49
//               $Log: not supported by cvs2svn $
50
//               Revision 1.3  2001/06/12 15:19:49  rudi
51
//
52
//
53
//               Minor changes after running lint, and a small bug fix reading csr and ba_mask registers.
54
//
55
//               Revision 1.2  2001/06/03 11:37:17  rudi
56
//
57
//
58
//               1) Fixed Chip Select Mask Register
59
//                      - Power On Value is now all ones
60
//                      - Comparison Logic is now correct
61
//
62
//               2) All resets are now asynchronous
63
//
64
//               3) Converted Power On Delay to an configurable item
65
//
66
//               4) Added reset to Chip Select Output Registers
67
//
68
//               5) Forcing all outputs to Hi-Z state during reset
69
//
70
//               Revision 1.1.1.1  2001/05/13 09:39:38  rudi
71
//               Created Directory Structure
72
//
73
//
74
//
75
//
76
 
77
`timescale 1ns / 10ps
78
 
79
/////////////////////////////////////////////////////////////////////
80
//
81
// This define selects how the WISHBONE interface determines if
82
// the internal register file is selected.
83
// This should be a simple address decoder. "wb_addr_i" is the
84
// WISHBONE address bus (32 bits wide).
85
`define REG_SEL         (wb_addr_i[31:29] == 3'h7)
86
 
87
// This define selects how the WISHBONE interface determines if
88
// the memory is selected.
89
// This should be a simple address decoder. "wb_addr_i" is the
90
// WISHBONE address bus (32 bits wide).
91
`define MEM_SEL         (wb_addr_i[31:29] == 3'h0)
92
 
93
/////////////////////////////////////////////////////////////////////
94
//
95
// This are the default Power-On Reset values for Chip Select
96
//
97
 
98
// Defines which chip select is used for Power On booting
99
`define DEF_SEL         3'h3
100
 
101
// Defines the default (reset) TMS value for the DEF_SEL chip select
102
`define DEF_POR_TMS     32'hffff_ffff
103
 
104
 
105
/////////////////////////////////////////////////////////////////////
106
//
107
// Define how many Chip Selects to Implement
108
//
109
`define HAVE_CS1        1
110
`define HAVE_CS2        1
111
`define HAVE_CS3        1
112
`define HAVE_CS4        1
113
`define HAVE_CS5        1
114
`define HAVE_CS6        1
115
`define HAVE_CS7        1
116
 
117
 
118
/////////////////////////////////////////////////////////////////////
119
//
120
// Init Refresh
121
//
122
// Number of Refresh Cycles to perform during SDRAM initialization.
123
// This varies between SDRAM manufacturer. Typically this value is
124
// between 2 and 8. This number must be smaller than 16.
125
`define INIT_RFRC_CNT   2
126
 
127
/////////////////////////////////////////////////////////////////////
128
//
129
// Power On Delay
130
//
131
// Most if SDRAMs require some time to initialize before they can be used
132
// after power on. If the Memory Controller shall stall after power on to
133
// allow SDRAMs to finish the initialization process uncomment the below
134
// define statement
135
`define POR_DELAY       1
136
 
137
// This value defines how many MEM_CLK cycles the Memory Controller should
138
// stall. Default is 2.5uS. At a 10nS MEM_CLK cycle time, this would 250
139
// cycles.
140
`define POR_DELAY_VAL   8'd250
141
 
142
 
143
// ===============================================================
144
// ===============================================================
145
// Various internal defines (DO NOT MODIFY !)
146
// ===============================================================
147
// ===============================================================
148
 
149
// Register settings encodings
150
`define BW_8    2'h0
151
`define BW_16   2'h1
152
`define BW_32   2'h2
153
 
154
`define MEM_TYPE_SDRAM  3'h0
155
`define MEM_TYPE_SRAM   3'h1
156
`define MEM_TYPE_ACS    3'h2
157
`define MEM_TYPE_SCS    3'h3
158
 
159
`define MEM_SIZE_64     2'h0
160
`define MEM_SIZE_128    2'h1
161
`define MEM_SIZE_256    2'h2

powered by: WebSVN 2.1.0

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