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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [testbench/] [mc_common.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 454 ivang
/* mc_common.h - Memory Controller testbench common routines defines
2
         Copyright (C) 2001 by Ivan Guzvinec, ivang@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
#ifndef __MC_COMMON_H
22
#define __MC_COMMON_H
23
 
24 544 ivang
#define GPIO_BASE       0xA0000000LU
25 454 ivang
#define MC_BASE         0x60000000LU
26
#define MC_MEM_BASE     0x04000000LU
27
 
28
/* Row Test flags */
29
#define MC_TEST_RUN0    0x00000001LU
30
#define MC_TEST_RUN1    0x00000002LU
31
#define MC_TEST_RUN01   0x00000004LU
32
#define MC_TEST_RUN10   0x00000008LU
33
#define MC_TEST_RUNINC  0x00000010LU
34
#define MC_TEST_8       0x00000020LU
35
#define MC_TEST_16      0x00000040LU
36
#define MC_TEST_32      0x00000080LU
37
#define MC_TEST_SEQ     0x00000100LU
38
#define MC_TEST_SEQ1    0x00000200LU
39
#define MC_TEST_RAND    0x00000400LU
40
 
41
/* test pattern defines */
42
#define MC_TEST_PAT1_8  0x00U
43
#define MC_TEST_PAT2_8  0xFFU
44
#define MC_TEST_PAT3_8  0x55U
45
#define MC_TEST_PAT4_8  0xAAU
46
#define MC_TEST_PAT1_16 0x0000U
47
#define MC_TEST_PAT2_16 0xFFFFU
48
#define MC_TEST_PAT3_16 0x5555U
49
#define MC_TEST_PAT4_16 0xAAAAU
50
#define MC_TEST_PAT1_32 0x00000000LU
51
#define MC_TEST_PAT2_32 0xFFFFFFFFLU
52
#define MC_TEST_PAT3_32 0x55555555LU
53
#define MC_TEST_PAT4_32 0xAAAAAAAALU
54
 
55
/* test device defines */
56
#define MC_TEST_DEV_SDRAM       0
57
#define MC_TEST_DEV_SSRAM       1
58
#define MC_TEST_DEV_ASYNC       2
59
#define MC_TEST_DEV_SYNC        3
60
 
61
typedef volatile unsigned char  *MEMLOC8;
62
typedef volatile unsigned short *MEMLOC16;
63
typedef volatile unsigned long  *MEMLOC32;
64
 
65
/* Prototypes */
66
unsigned long mc_test_row(unsigned long nFrom, unsigned long nTo, unsigned long flags);
67
void randomin(unsigned long seed);
68
unsigned long random(unsigned long max);
69
 
70
#endif

powered by: WebSVN 2.1.0

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