diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-02-23 13:51:54 -0500 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-02-23 13:51:54 -0500 |
commit | 8fc06589cbf28b2a5bf13384d1c683dc50f68a8a (patch) | |
tree | 48e22202d8b38239b06811256f500661901652be /mem/physical.hh | |
parent | ceac38e41c5c0a7131d7581244713d33b5fff521 (diff) | |
download | gem5-8fc06589cbf28b2a5bf13384d1c683dc50f68a8a.tar.xz |
Update functional memory to have a response event
Clean out old memory python files, move them into old_mem directory. Maybe we should just delete them, they are under revision control.
Add new py files for new objects.
SConscript:
Update because memory is just a header file now
base/chunk_generator.hh:
Make Chunk Generator return the entire size if the chunk_size is set to zero. Useful when trying to chunck on blocksize of memory, which can write large pieces of data.
cpu/simple/cpu.cc:
Make sure to delete the pkt.
mem/physical.cc:
mem/physical.hh:
Set up response event.
mem/port.cc:
Rename rqst to req to conform to same standard naming convention.
python/m5/objects/PhysicalMemory.py:
Update the params, inheritence
--HG--
extra : convert_revision : 857154ec256522baf423b715833930497999549b
Diffstat (limited to 'mem/physical.hh')
-rw-r--r-- | mem/physical.hh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mem/physical.hh b/mem/physical.hh index bac7e3d46..b31e45ac5 100644 --- a/mem/physical.hh +++ b/mem/physical.hh @@ -35,6 +35,8 @@ #include "base/range.hh" #include "mem/memory.hh" #include "mem/packet.hh" +#include "mem/port.hh" +#include "sim/eventq.hh" // // Functional model for a contiguous block of physical memory. (i.e. RAM) @@ -63,7 +65,6 @@ class PhysicalMemory : public Memory bool &owner); virtual int deviceBlockSize(); - }; MemoryPort memoryPort; @@ -72,7 +73,15 @@ class PhysicalMemory : public Memory int lat; - //event to send response needs to be here + struct MemResponseEvent : public Event + { + Packet pkt; + MemoryPort *memoryPort; + + MemResponseEvent(Packet &pkt, MemoryPort *memoryPort); + void process(); + const char *description(); + }; private: // prevent copying of a MainMemory object @@ -98,7 +107,7 @@ class PhysicalMemory : public Memory void prot_access_error(Addr addr, int size, Command func); public: - virtual int deviceBlockSize(); + int deviceBlockSize(); void prot_memset(Addr addr, uint8_t val, int size); |