Go to the documentation of this file.
41 #ifndef __MEM_PACKET_ACCESS_HH__
42 #define __MEM_PACKET_ACCESS_HH__
55 assert(
sizeof(T) <=
size);
64 assert(
sizeof(T) <=
size);
73 return betoh(getRaw<T>());
80 return letoh(getRaw<T>());
91 case ByteOrder::little:
95 panic(
"Illegal byte order in Packet::get()\n");
106 template <
typename T>
113 template <
typename T>
121 case ByteOrder::little:
125 panic(
"Illegal byte order in Packet::set()\n");
131 #endif //__MEM_PACKET_ACCESS_HH__
void setRaw(T v)
Set the value in the data pointer to v without byte swapping.
unsigned size
The size of the request or transfer.
PacketDataPtr data
A pointer to the data being transferred.
T getRaw() const
Get the data in the packet without byte swapping.
bool isSet(Type mask) const
Verifies whether any bit matching the given mask is set.
T getBE() const
Get the data in the packet byte swapped from big endian to host endian.
@ DYNAMIC_DATA
The data pointer points to a value that should be freed when the packet is destroyed.
void setBE(T v)
Set the value in the data pointer to v as big endian.
T get(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness.
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
@ STATIC_DATA
Is the data pointer set to a value that shouldn't be freed when the packet is destroyed?
void setLE(T v)
Set the value in the data pointer to v as little endian.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
void set(T v, ByteOrder endian)
Set the value in the data pointer to v using the specified endianness.
#define panic(...)
This implements a cprintf based panic() function.
Generated on Sun Jul 30 2023 01:56:58 for gem5 by doxygen 1.8.17