diff options
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r-- | src/mem/packet.hh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index b5b882c91..a4eeabe29 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 ARM Limited + * Copyright (c) 2012-2018 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -1068,6 +1068,20 @@ class Packet : public Printable template <typename T> void set(T v); + + /** + * Get the data in the packet byte swapped from the specified + * endianness and zero-extended to 64 bits. + */ + uint64_t getUintX(ByteOrder endian) const; + + /** + * Set the value in the word w after truncating it to the length + * of the packet and then byteswapping it to the desired + * endianness. + */ + void setUintX(uint64_t w, ByteOrder endian); + /** * Copy data into the packet from the provided pointer. */ |