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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [openrisc/] [orpsoc/] [current/] [include/] [mc.h] - Blame information for rev 838

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

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      mc.h
4
//
5
//      OpenCores.org memory controller definitions
6
//
7
//==========================================================================
8
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
9
// -------------------------------------------                              
10
// This file is part of eCos, the Embedded Configurable Operating System.   
11
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
12
//
13
// eCos is free software; you can redistribute it and/or modify it under    
14
// the terms of the GNU General Public License as published by the Free     
15
// Software Foundation; either version 2 or (at your option) any later      
16
// version.                                                                 
17
//
18
// eCos is distributed in the hope that it will be useful, but WITHOUT      
19
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
20
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
21
// for more details.                                                        
22
//
23
// You should have received a copy of the GNU General Public License        
24
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
25
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
26
//
27
// As a special exception, if other files instantiate templates or use      
28
// macros or inline functions from this file, or you compile this file      
29
// and link it with other works to produce a work based on this file,       
30
// this file does not by itself cause the resulting work to be covered by   
31
// the GNU General Public License. However the source code for this file    
32
// must still be made available in accordance with section (3) of the GNU   
33
// General Public License v2.                                               
34
//
35
// This exception does not invalidate any other reasons why a work based    
36
// on this file might be covered by the GNU General Public License.         
37
// -------------------------------------------                              
38
// ####ECOSGPLCOPYRIGHTEND####                                              
39
//==========================================================================
40
//#####DESCRIPTIONBEGIN####
41
//
42
// Author(s):    sfurman
43
// Contributors: Marko Mlinar
44
// Date:         2003-01-17
45
// Purpose:      Define OpenRISC architecture special-purpose registers
46
// Usage:        #include <cyg/hal/hal_arch.h>
47
//              
48
//####DESCRIPTIONEND####
49
//
50
//==========================================================================
51
 
52
/* Prototypes */
53
#ifndef __MC_H
54
#define __MC_H
55
 
56
#define N_CE        (8)
57
 
58
#define MC_CSR      (0x00)
59
#define MC_POC      (0x04)
60
#define MC_BA_MASK  (0x08)
61
#define MC_CSC(i)   (0x10 + (i) * 8)
62
#define MC_TMS(i)   (0x14 + (i) * 8)
63
 
64
#define MC_ADDR_SPACE (MC_CSC(N_CE))
65
 
66
/* POC register field definition */
67
#define MC_POC_EN_BW_OFFSET     0
68
#define MC_POC_EN_BW_WIDTH      2
69
#define MC_POC_EN_MEMTYPE_OFFSET        2
70
#define MC_POC_EN_MEMTYPE_WIDTH 2
71
 
72
/* CSC register field definition */
73
#define MC_CSC_EN_OFFSET        0
74
#define MC_CSC_MEMTYPE_OFFSET   1
75
#define MC_CSC_MEMTYPE_WIDTH    2
76
#define MC_CSC_BW_OFFSET        4
77
#define MC_CSC_BW_WIDTH         2
78
#define MC_CSC_MS_OFFSET        6
79
#define MC_CSC_MS_WIDTH         2
80
#define MC_CSC_WP_OFFSET        8
81
#define MC_CSC_BAS_OFFSET       9
82
#define MC_CSC_KRO_OFFSET       10
83
#define MC_CSC_PEN_OFFSET       11
84
#define MC_CSC_SEL_OFFSET       16
85
#define MC_CSC_SEL_WIDTH        8
86
 
87
#define MC_CSC_MEMTYPE_SDRAM  0
88
#define MC_CSC_MEMTYPE_SSRAM  1
89
#define MC_CSC_MEMTYPE_ASYNC  2
90
#define MC_CSC_MEMTYPE_SYNC   3
91
 
92
#define MC_CSR_VALID            0xFF000703LU
93
#define MC_POC_VALID            0x0000000FLU
94
#define MC_BA_MASK_VALID        0x000000FFLU
95
#define MC_CSC_VALID            0x00FF0FFFLU
96
#define MC_TMS_SDRAM_VALID      0x0FFF83FFLU
97
#define MC_TMS_SSRAM_VALID      0x00000000LU
98
#define MC_TMS_ASYNC_VALID      0x03FFFFFFLU
99
#define MC_TMS_SYNC_VALID       0x01FFFFFFLU
100
#define MC_TMS_VALID            0xFFFFFFFFLU /* reg test compat. */
101
 
102
/* TMS register field definition SDRAM */
103
#define MC_TMS_SDRAM_TRFC_OFFSET        24
104
#define MC_TMS_SDRAM_TRFC_WIDTH         4
105
#define MC_TMS_SDRAM_TRP_OFFSET         20
106
#define MC_TMS_SDRAM_TRP_WIDTH          4
107
#define MC_TMS_SDRAM_TRCD_OFFSET        17
108
#define MC_TMS_SDRAM_TRCD_WIDTH         4
109
#define MC_TMS_SDRAM_TWR_OFFSET         15
110
#define MC_TMS_SDRAM_TWR_WIDTH          2
111
#define MC_TMS_SDRAM_WBL_OFFSET         9
112
#define MC_TMS_SDRAM_OM_OFFSET          7
113
#define MC_TMS_SDRAM_OM_WIDTH           2
114
#define MC_TMS_SDRAM_CL_OFFSET          4
115
#define MC_TMS_SDRAM_CL_WIDTH           3
116
#define MC_TMS_SDRAM_BT_OFFSET          3
117
#define MC_TMS_SDRAM_BL_OFFSET          0
118
#define MC_TMS_SDRAM_BL_WIDTH           3
119
 
120
/* TMS register field definition ASYNC */
121
#define MC_TMS_ASYNC_TWWD_OFFSET        20
122
#define MC_TMS_ASYNC_TWWD_WIDTH         6
123
#define MC_TMS_ASYNC_TWD_OFFSET         16
124
#define MC_TMS_ASYNC_TWD_WIDTH          4
125
#define MC_TMS_ASYNC_TWPW_OFFSET        12
126
#define MC_TMS_ASYNC_TWPW_WIDTH         4
127
#define MC_TMS_ASYNC_TRDZ_OFFSET        8
128
#define MC_TMS_ASYNC_TRDZ_WIDTH         4
129
#define MC_TMS_ASYNC_TRDV_OFFSET        0
130
#define MC_TMS_ASYNC_TRDV_WIDTH         8
131
 
132
/* TMS register field definition SYNC  */
133
#define MC_TMS_SYNC_TTO_OFFSET          16
134
#define MC_TMS_SYNC_TTO_WIDTH           9
135
#define MC_TMS_SYNC_TWR_OFFSET          12
136
#define MC_TMS_SYNC_TWR_WIDTH           4
137
#define MC_TMS_SYNC_TRDZ_OFFSET         8
138
#define MC_TMS_SYNC_TRDZ_WIDTH          4
139
#define MC_TMS_SYNC_TRDV_OFFSET         0
140
#define MC_TMS_SYNC_TRDV_WIDTH          8
141
 
142
#endif
143
 
144
// EOF mc.h

powered by: WebSVN 2.1.0

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