packet.hh (12351:17eaa27bef22) packet.hh (12633:675cd1260b40)
1/*
2 * Copyright (c) 2012-2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 310 unchanged lines hidden (view full) ---

319
320 const PacketId id;
321
322 /// A pointer to the original request.
323 const RequestPtr req;
324
325 private:
326 /**
1/*
2 * Copyright (c) 2012-2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 310 unchanged lines hidden (view full) ---

319
320 const PacketId id;
321
322 /// A pointer to the original request.
323 const RequestPtr req;
324
325 private:
326 /**
327 * A pointer to the data being transfered. It can be differnt
328 * sizes at each level of the heirarchy so it belongs in the
327 * A pointer to the data being transferred. It can be different
328 * sizes at each level of the hierarchy so it belongs to the
329 * packet, not request. This may or may not be populated when a
329 * packet, not request. This may or may not be populated when a
330 * responder recieves the packet. If not populated it memory should
330 * responder receives the packet. If not populated memory should
331 * be allocated.
332 */
333 PacketDataPtr data;
334
335 /// The address of the request. This address could be virtual or
336 /// physical, depending on the system configuration.
337 Addr addr;
338

--- 752 unchanged lines hidden (view full) ---

1091 */
1092 void
1093 setDataFromBlock(const uint8_t *blk_data, int blkSize)
1094 {
1095 setData(blk_data + getOffset(blkSize));
1096 }
1097
1098 /**
331 * be allocated.
332 */
333 PacketDataPtr data;
334
335 /// The address of the request. This address could be virtual or
336 /// physical, depending on the system configuration.
337 Addr addr;
338

--- 752 unchanged lines hidden (view full) ---

1091 */
1092 void
1093 setDataFromBlock(const uint8_t *blk_data, int blkSize)
1094 {
1095 setData(blk_data + getOffset(blkSize));
1096 }
1097
1098 /**
1099 * Copy data from the packet to the provided block pointer, which
1100 * is aligned to the given block size.
1099 * Copy data from the packet to the memory at the provided pointer.
1100 * @param p Pointer to which data will be copied.
1101 */
1102 void
1103 writeData(uint8_t *p) const
1104 {
1105 std::memcpy(p, getConstPtr<uint8_t>(), getSize());
1106 }
1107
1108 /**
1101 */
1102 void
1103 writeData(uint8_t *p) const
1104 {
1105 std::memcpy(p, getConstPtr<uint8_t>(), getSize());
1106 }
1107
1108 /**
1109 * Copy data from the packet to the memory at the provided pointer.
1109 * Copy data from the packet to the provided block pointer, which
1110 * is aligned to the given block size.
1111 * @param blk_data Pointer to block to which data will be copied.
1112 * @param blkSize Block size in bytes.
1110 */
1111 void
1112 writeDataToBlock(uint8_t *blk_data, int blkSize) const
1113 {
1114 writeData(blk_data + getOffset(blkSize));
1115 }
1116
1117 /**

--- 122 unchanged lines hidden ---
1113 */
1114 void
1115 writeDataToBlock(uint8_t *blk_data, int blkSize) const
1116 {
1117 writeData(blk_data + getOffset(blkSize));
1118 }
1119
1120 /**

--- 122 unchanged lines hidden ---