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

Subversion Repositories openrisc_me

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

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

Line No. Rev Author Line
1 90 jeremybenn
/* mc_ssram.h - Memory Controller testbench SSRAM 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_SSRAM_H
29
#define __MC_SSRAM_H
30
 
31
/* should configuration be read form MC? */
32
#define MC_READ_CONF
33
 
34
/* TEMPLATE SELECTION       */
35
/* change #undef to #define */
36
#define _MC_TEST_TEMPLATE1
37
#undef  _MC_TEST_TEMPLATE2
38
#undef  _MC_TEST_TEMPLATE3
39
/* ------------------------ */
40
 
41
/* memory configuration that must reflect mcmem.cfg */
42
#define MC_SSRAM_CSMASK 0xFE    /* 8 bit mask for 8 chip selects. 1 SSRAM at CS, 0 something else at CS */
43
 
44
typedef struct MC_SSRAM_CS
45
{
46
  unsigned long M;
47
} MC_SSRAM_CS;
48
 
49
MC_SSRAM_CS mc_ssram_cs[8] = {
50
  {  0x02  /* SELect mask */
51
    },
52
  { 0x04 },
53
  { 0x06 },
54
  { 0x08 },
55
  { 0x0A },
56
  { 0x0C },
57
  { 0x0E },
58
  { 0x10 } };
59
 
60
#define MC_SSRAM_TEST0  0x00000001LU /* no parity, bank after column, write enable */
61
#define MC_SSRAM_TEST1  0x00000002LU /* parity */
62
#define MC_SSRAM_TEST2  0x00000004LU /* bank after row */
63
#define MC_SSRAM_TEST3  0x00000008LU /* RO */
64
#define MC_SSRAM_TEST4  0x00000010LU /* - NOT DEFINED - */
65
#define MC_SSRAM_TEST5  0x00000020LU /* - NOT DEFINED - */
66
 
67
#ifdef _MC_TEST_TEMPLATE1
68
  #define MC_SSRAM_FLAGS        0x000002B8LU    /* MC_TEST_ flags... see mc_common.h */ 
69
  #define MC_SSRAM_TESTS        0x00000005LU
70
#endif
71
 
72
#ifdef _MC_TEST_TEMPLATE2
73
  #define MC_SSRAM_FLAGS        0x00000128LU    /* MC_TEST_ flags... see mc_common.h */ 
74
  #define MC_SSRAM_TESTS        0x00000008LU
75
#endif
76
 
77
#ifdef _MC_TEST_TEMPLATE3
78
  #define MC_SSRAM_FLAGS        0x000007FFLU    /* MC_TEST_ flags... see mc_common.h */ 
79
  #define MC_SSRAM_TESTS        0x0000003FLU
80
#endif
81
 
82
#endif

powered by: WebSVN 2.1.0

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