summaryrefslogtreecommitdiff
path: root/mem/translating_port.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-03-31 20:32:18 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-03-31 20:32:18 -0500
commitadeb458b878d0768fd4de82bc1997512dc65e6d3 (patch)
treed7b27950803618125f7c2fcfa3353e4e40e0166c /mem/translating_port.hh
parent5c79eb04104e6e3dd2fd957c071fef3ceb47b722 (diff)
parent5936c79ba0f3fd29ef2bbf41fcaddc78fcd9c75c (diff)
downloadgem5-adeb458b878d0768fd4de82bc1997512dc65e6d3.tar.xz
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem --HG-- extra : convert_revision : 08ae5e999d9b313e3e40cb6d58863905b70ca781
Diffstat (limited to 'mem/translating_port.hh')
-rw-r--r--mem/translating_port.hh20
1 files changed, 11 insertions, 9 deletions
diff --git a/mem/translating_port.hh b/mem/translating_port.hh
index 2ba3d68e2..7611ac3c7 100644
--- a/mem/translating_port.hh
+++ b/mem/translating_port.hh
@@ -29,34 +29,36 @@
#ifndef __MEM_TRANSLATING_PROT_HH__
#define __MEM_TRANSLATING_PROT_HH__
-class Port;
+#include "mem/port.hh"
+
class PageTable;
-class TranslatingPort
+class TranslatingPort : public FunctionalPort
{
private:
- Port *port;
PageTable *pTable;
+ bool allocating;
TranslatingPort(const TranslatingPort &specmem);
const TranslatingPort &operator=(const TranslatingPort &specmem);
public:
- TranslatingPort(Port *_port, PageTable *p_table);
+ TranslatingPort(PageTable *p_table, bool alloc = false);
virtual ~TranslatingPort();
public:
bool tryReadBlob(Addr addr, uint8_t *p, int size);
- bool tryWriteBlob(Addr addr, uint8_t *p, int size, bool alloc = false);
- bool tryMemsetBlob(Addr addr, uint8_t val, int size, bool alloc = false);
+ bool tryWriteBlob(Addr addr, uint8_t *p, int size);
+ bool tryMemsetBlob(Addr addr, uint8_t val, int size);
bool tryWriteString(Addr addr, const char *str);
bool tryReadString(std::string &str, Addr addr);
- void readBlob(Addr addr, uint8_t *p, int size);
- void writeBlob(Addr addr, uint8_t *p, int size, bool alloc = false);
- void memsetBlob(Addr addr, uint8_t val, int size, bool alloc = false);
+ virtual void readBlob(Addr addr, uint8_t *p, int size);
+ virtual void writeBlob(Addr addr, uint8_t *p, int size);
+ virtual void memsetBlob(Addr addr, uint8_t val, int size);
void writeString(Addr addr, const char *str);
void readString(std::string &str, Addr addr);
+
};
#endif