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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-or32/] [mc.h] - Blame information for rev 1633

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

Line No. Rev Author Line
1 1633 jcastillo
/* mc.h -- Simulation of Memory Controller
2
         Copyright (C) 2001 by Marko Mlinar, markom@opencores.org
3
 
4
         This file is part of OpenRISC 1000 Architectural Simulator.
5
 
6
         This program is free software; you can redistribute it and/or modify
7
         it under the terms of the GNU General Public License as published by
8
         the Free Software Foundation; either version 2 of the License, or
9
         (at your option) any later version.
10
 
11
         This program is distributed in the hope that it will be useful,
12
         but WITHOUT ANY WARRANTY; without even the implied warranty of
13
         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
14
         GNU General Public License for more details.
15
 
16
         You should have received a copy of the GNU General Public License
17
         along with this program; if not, write to the Free Software
18
         Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
*/
20
 
21
/* Prototypes */
22
#ifndef _ASM_MC_H
23
#define _ASM_MC_H
24
 
25
#define N_CE        (8)
26
 
27
#define MC_CSR      (0x00)
28
#define MC_POC      (0x04)
29
#define MC_BA_MASK  (0x08)
30
#define MC_CSC(i)   (0x10 + (i) * 8)
31
#define MC_TMS(i)   (0x14 + (i) * 8)
32
 
33
#define MC_ADDR_SPACE (MC_CSC(N_CE))
34
 
35
/* POC register field definition */
36
#define MC_POC_EN_BW_OFFSET     0
37
#define MC_POC_EN_BW_WIDTH      2
38
#define MC_POC_EN_MEMTYPE_OFFSET        2
39
#define MC_POC_EN_MEMTYPE_WIDTH 2
40
 
41
/* CSC register field definition */
42
#define MC_CSC_EN_OFFSET        0
43
#define MC_CSC_MEMTYPE_OFFSET   1
44
#define MC_CSC_MEMTYPE_WIDTH    2
45
#define MC_CSC_BW_OFFSET        4
46
#define MC_CSC_BW_WIDTH         2
47
#define MC_CSC_MS_OFFSET        6
48
#define MC_CSC_MS_WIDTH         2
49
#define MC_CSC_WP_OFFSET        8
50
#define MC_CSC_BAS_OFFSET       9
51
#define MC_CSC_KRO_OFFSET       10
52
#define MC_CSC_PEN_OFFSET       11
53
#define MC_CSC_SEL_OFFSET       16
54
#define MC_CSC_SEL_WIDTH        8
55
 
56
#define MC_CSC_MEMTYPE_SDRAM  0
57
#define MC_CSC_MEMTYPE_SSRAM  1
58
#define MC_CSC_MEMTYPE_ASYNC  2
59
#define MC_CSC_MEMTYPE_SYNC   3
60
 
61
#define MC_CSR_VALID            0xFF000703LU
62
#define MC_POC_VALID            0x0000000FLU
63
#define MC_BA_MASK_VALID        0x000000FFLU
64
#define MC_CSC_VALID            0x00FF0FFFLU
65
#define MC_TMS_SDRAM_VALID      0x0FFF83FFLU
66
#define MC_TMS_SSRAM_VALID      0x00000000LU
67
#define MC_TMS_ASYNC_VALID      0x03FFFFFFLU
68
#define MC_TMS_SYNC_VALID       0x01FFFFFFLU
69
#define MC_TMS_VALID            0xFFFFFFFFLU /* reg test compat. */
70
 
71
/* TMS register field definition SDRAM */
72
#define MC_TMS_SDRAM_TRFC_OFFSET        24
73
#define MC_TMS_SDRAM_TRFC_WIDTH         4
74
#define MC_TMS_SDRAM_TRP_OFFSET         20
75
#define MC_TMS_SDRAM_TRP_WIDTH          4
76
#define MC_TMS_SDRAM_TRCD_OFFSET        17
77
#define MC_TMS_SDRAM_TRCD_WIDTH         4
78
#define MC_TMS_SDRAM_TWR_OFFSET         15
79
#define MC_TMS_SDRAM_TWR_WIDTH          2
80
#define MC_TMS_SDRAM_WBL_OFFSET         9
81
#define MC_TMS_SDRAM_OM_OFFSET          7
82
#define MC_TMS_SDRAM_OM_WIDTH           2
83
#define MC_TMS_SDRAM_CL_OFFSET          4
84
#define MC_TMS_SDRAM_CL_WIDTH           3
85
#define MC_TMS_SDRAM_BT_OFFSET          3
86
#define MC_TMS_SDRAM_BL_OFFSET          0
87
#define MC_TMS_SDRAM_BL_WIDTH           3
88
 
89
/* TMS register field definition ASYNC */
90
#define MC_TMS_ASYNC_TWWD_OFFSET        20
91
#define MC_TMS_ASYNC_TWWD_WIDTH         6
92
#define MC_TMS_ASYNC_TWD_OFFSET         16
93
#define MC_TMS_ASYNC_TWD_WIDTH          4
94
#define MC_TMS_ASYNC_TWPW_OFFSET        12
95
#define MC_TMS_ASYNC_TWPW_WIDTH         4
96
#define MC_TMS_ASYNC_TRDZ_OFFSET        8
97
#define MC_TMS_ASYNC_TRDZ_WIDTH         4
98
#define MC_TMS_ASYNC_TRDV_OFFSET        0
99
#define MC_TMS_ASYNC_TRDV_WIDTH         8
100
 
101
/* TMS register field definition SYNC  */
102
#define MC_TMS_SYNC_TTO_OFFSET          16
103
#define MC_TMS_SYNC_TTO_WIDTH           9
104
#define MC_TMS_SYNC_TWR_OFFSET          12
105
#define MC_TMS_SYNC_TWR_WIDTH           4
106
#define MC_TMS_SYNC_TRDZ_OFFSET         8
107
#define MC_TMS_SYNC_TRDZ_WIDTH          4
108
#define MC_TMS_SYNC_TRDV_OFFSET         0
109
#define MC_TMS_SYNC_TRDV_WIDTH          8
110
 
111
#endif

powered by: WebSVN 2.1.0

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