summaryrefslogtreecommitdiff
path: root/src/mem/physical.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/physical.hh')
-rw-r--r--src/mem/physical.hh25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/mem/physical.hh b/src/mem/physical.hh
index b549c1f8b..c0a5523ba 100644
--- a/src/mem/physical.hh
+++ b/src/mem/physical.hh
@@ -80,19 +80,28 @@ class PhysicalMemory : public MemObject
const PhysicalMemory &operator=(const PhysicalMemory &specmem);
protected:
- Addr base_addr;
- Addr pmem_size;
- uint8_t *pmem_addr;
+ uint8_t *pmemAddr;
MemoryPort *port;
- int page_ptr;
+ int pagePtr;
Tick lat;
public:
Addr new_page();
- uint64_t size() { return pmem_size; }
+ uint64_t size() { return params()->addrRange.size(); }
+
+ struct Params
+ {
+ std::string name;
+ Range<Addr> addrRange;
+ Tick latency;
+ };
+
+ protected:
+ Params *_params;
public:
- PhysicalMemory(const std::string &n, Tick latency);
+ const Params *params() const { return _params; }
+ PhysicalMemory(Params *p);
virtual ~PhysicalMemory();
public:
@@ -102,9 +111,9 @@ class PhysicalMemory : public MemObject
void virtual init();
unsigned int drain(Event *de);
- private:
+ protected:
Tick doFunctionalAccess(Packet *pkt);
-
+ virtual Tick calculateLatency(Packet *pkt);
void recvStatusChange(Port::Status status);
public: