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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [openrisc/] [orp/] [current/] [include/] [mc.h] - Blame information for rev 587

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

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

powered by: WebSVN 2.1.0

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