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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [SoC/] [Mem/] [scMemory.h] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 zhong
///////////////////////////////////////////////////////////////////////////////
2
// This program is free software; you can redistribute it and/or
3
// modify it under the terms of the GNU General Public License
4
// as published by the Free Software Foundation; either version 2
5
// of the License, or (at your option) any later version.
6
//
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
// GNU General Public License for more details.
11
//
12
// You should have received a copy of the GNU General Public License
13
// along with this program; if not, write to the Free Software
14
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
//
16
//  scMemory.h: interface for the scMemory class.
17
//          
18
//  Original Author: Allen Tao Zhong,
19
//  University of Electronic Science and Technology in China
20
//  email: zhong@opencores.org
21
//  header n/a
22
//  info   This is a simple ARM modeling using SystemC.
23
//               Architecure defined by Allen Tao Zhong. 
24
//
25
///////////////////////////////////////////////////////////////////////////////
26
 
27
/*****************************************************************************
28
 
29
  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
30
  changes you are making here.
31
 
32
      Name, Affiliation, Date:
33
  Description of Modification:
34
 
35
 *****************************************************************************/
36
 
37
#include<systemc.h>
38
#include <sc_mslib.h>
39
#include"scTypes.h"
40
class scMemory  :public sc_module
41
{
42
public:
43
        //sc_in<bool>          in_b_clock;
44
        sc_in<bool>          in_b_nRW;
45
        sc_inslave<uint32_t>      in_n_Addr;
46
        sc_inoutmaster<uint32_t>   inout_n_Data;
47
public:
48
        SC_HAS_PROCESS(scMemory);
49
        scMemory(sc_module_name name_):sc_module(name_)
50
        {
51
          // 
52
                for(int i=0;i<=1024-1;i++)
53
                {
54
                        m_data[i]=0xe1884aa3;//add ;
55
 
56
                }
57
 
58
                m_data[1]=0xe0805184;
59
                m_data[2]=0xe1530001;
60
                m_data[3]=0x401370a3;//cmp
61
                m_data[4]=0xe1884aa3;
62
                m_data[5]=0xe59f0024;
63
                m_data[6]=0xeb000002;
64
     //  SC_METHOD(entry);      
65
         //  sensitive_pos<<in_b_clock;
66
 
67
           SC_SLAVE(read_data,in_n_Addr);
68
 
69
         //  SC_METHOD(write_data)
70
         //  sensitive<<inout_n_Data;
71
 
72
        };
73
        virtual ~scMemory();
74
 
75
private:
76
        uint32_t m_data[1024];
77
 
78
private:
79
 
80
        void read_data(void);
81
        void write_data(void);
82
 
83
};

powered by: WebSVN 2.1.0

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