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

Subversion Repositories scarm

[/] [scarm/] [trunk/] [src/] [pipeline/] [scMEM.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
 
17
///////////////////////////////////////////////////////////////////              
18
//          
19
//  Original Author: Allen Tao Zhong,
20
//  University of Electronic Science and Technology in China
21
//  email: zhong@opencores.org
22
//  info   This is a SystemC ARM model 
23
//   
24
//
25
///////////////////////////////////////////////////////////////////////////////
26
// scMEM.h: interface for the scMEM class.
27
//
28
//////////////////////////////////////////////////////////////////////
29
 
30
#if !defined(MEM_H)
31
#define MEM_H
32
 
33
 
34
#include<systemc.h>
35
#include<sc_mslib.h>
36
#include "scTypes.h"    // Added by ClassView
37
 
38
#include "..\components\registers\scRegisterFile.h"
39
 
40
class scMEM :public sc_module
41
{
42
public: //ports
43
        sc_in<bool>         in_b_Clock;
44
        sc_in<uint32_t>     in_n_ALUOutput;
45
        sc_in<bool_t>       in_b_Branch;
46
        sc_out<bool_t>      out_b_Flush;
47
        sc_in<bool_t>       in_b_MEM;
48
        sc_out<uint32_t>    out_n_NPC;
49
        sc_in<REGS>         in_Rd;
50
    sc_out<REGS>        out_Rd;
51
        sc_out<uint32_t>    out_n_MEMtoWB;
52
        sc_outmaster<uint32_t> out_n_Addr;//  address bus
53
        sc_inoutslave<uint32_t>  inout_n_Data; //Instruction bu
54
        sc_out<bool_t>        out_b_RW;     //R/W
55
public:
56
        void entry(void);
57
 
58
public:
59
 
60
 
61
        SC_HAS_PROCESS(scMEM);
62
        scMEM(const sc_module_name name_):sc_module(name_)
63
        {
64
       b_AccessMem=false;
65
           SC_METHOD(entry);
66
           sensitive_pos<<in_b_Clock;
67
 
68
        }
69
        virtual ~scMEM();
70
 
71
 
72
private:
73
        sc_signal<uint32_t> s_n_LMD;
74
        bool b_AccessMem;
75
 
76
};
77
 
78
#endif // !defined(AFX_SCMEM_H__3D36E4D9_3B3D_11D6_B9E2_000000000000__INCLUDED_)

powered by: WebSVN 2.1.0

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