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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [iss/] [mem/] [InstMemory.hh] - Blame information for rev 199

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 198 sybreon
/*!
2
  AEMB INSTRUCTION SET SIMULATOR
3
  Copyright (C) 2009 Shawn Tan 
4
 
5
  This program is free software: you can redistribute it and/or modify
6
  it under the terms of the GNU General Public License as published by
7
  the Free Software Foundation, either version 3 of the License, or
8
  (at your option) any later version.
9
 
10
  This program is distributed in the hope that it will be useful, but
11
  WITHOUT ANY WARRANTY; without even the implied warranty of
12
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
  General Public License for more details.
14
 
15
  You should have received a copy of the GNU General Public License
16
  along with this program.  If not, see
17
  .
18
*/
19
 
20
#ifndef AEMBINSTMEMORY_H_
21
#define AEMBINSTMEMORY_H_
22
 
23
#include 
24
 
25
using std::map;
26
 
27 199 sybreon
namespace aemb
28 198 sybreon
{
29 199 sybreon
 
30
class InstMemory
31
{
32 198 sybreon
        map mem; ///< Instruction memory storage
33
 
34
        /**
35
         * Generic memory write
36
         * @param addr Address to write
37
         * @param data Data to write
38
         */
39
 
40
        void putInst(const int addr, const int data);
41
 
42
public:
43
        /**
44
         * Generic memory read
45
         * @param addr Address to read.
46
         * @return memory word read.
47
         * */
48
 
49
        int getInst(const int addr);
50
 
51
        /**
52
         * Read VMEM from stdin.
53
         * @return size of the instruction space
54
         **/
55
 
56 199 sybreon
        int readVmem();
57 198 sybreon
 
58
        void dumpMem();
59
 
60 199 sybreon
        InstMemory();
61
        virtual ~InstMemory();
62 198 sybreon
};
63
 
64 199 sybreon
}
65 198 sybreon
#endif /*AEMBINSTMEMORY_H_*/

powered by: WebSVN 2.1.0

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