diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-02-06 22:14:19 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2011-02-06 22:14:19 -0800 |
commit | 273e3d49244b3c4f9f62c67431f60f4a0ab5906c (patch) | |
tree | 49684bbae069732f12864e5208e63c3153419764 /src/mem/packet.hh | |
parent | dfa8cbeb06b7556753c26b97978924c1f4a24699 (diff) | |
download | gem5-273e3d49244b3c4f9f62c67431f60f4a0ab5906c.tar.xz |
mem: Added support for Null data packet
The packet now identifies whether static or dynamic data has been allocated and
is used by Ruby to determine whehter to copy the data pointer into the ruby
request. Subsequently, Ruby can be told not to update phys memory when
receiving packets.
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r-- | src/mem/packet.hh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index 19fff7e3a..bcf9d8d68 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -681,9 +681,9 @@ class Packet : public FastAlloc, public Printable */ template <typename T> T* - getPtr() + getPtr(bool null_ok = false) { - assert(flags.isSet(STATIC_DATA|DYNAMIC_DATA)); + assert(null_ok || flags.isSet(STATIC_DATA|DYNAMIC_DATA)); return (T*)data; } @@ -768,7 +768,6 @@ class Packet : public FastAlloc, public Printable data = new uint8_t[getSize()]; } - /** * Check a functional request against a memory value represented * by a base/size pair and an associated data array. If the |