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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [test-code-or1k/] [mc-common/] [mc-common.h] - Blame information for rev 588

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

Line No. Rev Author Line
1 90 jeremybenn
/* mc_common.h - Memory Controller testbench common routines defines
2
 
3
   Copyright (C) 2001 Ivan Guzvinec
4
   Copyright (C) 2010 Embecosm Limited
5
 
6
   Contributor Ivan Guzvinec <ivang@opencores.org>
7
   Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
8
 
9
   This file is part of OpenRISC 1000 Architectural Simulator.
10
 
11
   This program is free software; you can redistribute it and/or modify it
12
   under the terms of the GNU General Public License as published by the Free
13
   Software Foundation; either version 3 of the License, or (at your option)
14
   any later version.
15
 
16
   This program is distributed in the hope that it will be useful, but WITHOUT
17
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19
   more details.
20
 
21
   You should have received a copy of the GNU General Public License along
22
   with this program.  If not, see <http:  www.gnu.org/licenses/>.  */
23
 
24
/* ----------------------------------------------------------------------------
25
   This code is commented throughout for use with Doxygen.
26
   --------------------------------------------------------------------------*/
27
 
28
#ifndef __MC_COMMON_H
29
#define __MC_COMMON_H
30
 
31
#define GPIO_BASE       0xA0000000LU
32
#define MC_BASE         0x60000000LU
33
#define MC_MEM_BASE     0x04000000LU
34
 
35
/* Row Test flags */
36
#define MC_TEST_RUN0    0x00000001LU
37
#define MC_TEST_RUN1    0x00000002LU
38
#define MC_TEST_RUN01   0x00000004LU
39
#define MC_TEST_RUN10   0x00000008LU
40
#define MC_TEST_RUNINC  0x00000010LU
41
#define MC_TEST_8       0x00000020LU
42
#define MC_TEST_16      0x00000040LU
43
#define MC_TEST_32      0x00000080LU
44
#define MC_TEST_SEQ     0x00000100LU
45
#define MC_TEST_SEQ1    0x00000200LU
46
#define MC_TEST_RAND    0x00000400LU
47
 
48
/* test pattern defines */
49
#define MC_TEST_PAT1_8  0x00U
50
#define MC_TEST_PAT2_8  0xFFU
51
#define MC_TEST_PAT3_8  0x55U
52
#define MC_TEST_PAT4_8  0xAAU
53
#define MC_TEST_PAT1_16 0x0000U
54
#define MC_TEST_PAT2_16 0xFFFFU
55
#define MC_TEST_PAT3_16 0x5555U
56
#define MC_TEST_PAT4_16 0xAAAAU
57
#define MC_TEST_PAT1_32 0x00000000LU
58
#define MC_TEST_PAT2_32 0xFFFFFFFFLU
59
#define MC_TEST_PAT3_32 0x55555555LU
60
#define MC_TEST_PAT4_32 0xAAAAAAAALU
61
 
62
/* test device defines */
63
#define MC_TEST_DEV_SDRAM       0
64
#define MC_TEST_DEV_SSRAM       1
65
#define MC_TEST_DEV_ASYNC       2
66
#define MC_TEST_DEV_SYNC        3
67
 
68
typedef volatile unsigned char  *MEMLOC8;
69
typedef volatile unsigned short *MEMLOC16;
70
typedef volatile unsigned long  *MEMLOC32;
71
 
72
/* Prototypes */
73
unsigned long mc_test_row(unsigned long nFrom, unsigned long nTo, unsigned long flags);
74
void randomin(unsigned long seed);
75
unsigned long random(unsigned long max);
76
 
77
#endif

powered by: WebSVN 2.1.0

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