packet.hh (11284:b3926db25371) packet.hh (11286:2071db8f864b)
1/*
2 * Copyright (c) 2012-2015 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

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

503 bool isRequest() const { return cmd.isRequest(); }
504 bool isResponse() const { return cmd.isResponse(); }
505 bool needsWritable() const { return cmd.needsWritable(); }
506 bool needsResponse() const { return cmd.needsResponse(); }
507 bool isInvalidate() const { return cmd.isInvalidate(); }
508 bool isEviction() const { return cmd.isEviction(); }
509 bool isWriteback() const { return cmd.isWriteback(); }
510 bool hasData() const { return cmd.hasData(); }
1/*
2 * Copyright (c) 2012-2015 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

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

503 bool isRequest() const { return cmd.isRequest(); }
504 bool isResponse() const { return cmd.isResponse(); }
505 bool needsWritable() const { return cmd.needsWritable(); }
506 bool needsResponse() const { return cmd.needsResponse(); }
507 bool isInvalidate() const { return cmd.isInvalidate(); }
508 bool isEviction() const { return cmd.isEviction(); }
509 bool isWriteback() const { return cmd.isWriteback(); }
510 bool hasData() const { return cmd.hasData(); }
511 bool hasRespData() const
512 {
513 MemCmd resp_cmd = cmd.responseCommand();
514 return resp_cmd.hasData();
515 }
511 bool isLLSC() const { return cmd.isLLSC(); }
512 bool isError() const { return cmd.isError(); }
513 bool isPrint() const { return cmd.isPrint(); }
514 bool isFlush() const { return cmd.isFlush(); }
515
516 //@{
517 /// Snoop flags
518 /**

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

1053 flags.clear(STATIC_DATA|DYNAMIC_DATA);
1054 data = NULL;
1055 }
1056
1057 /** Allocate memory for the packet. */
1058 void
1059 allocate()
1060 {
516 bool isLLSC() const { return cmd.isLLSC(); }
517 bool isError() const { return cmd.isError(); }
518 bool isPrint() const { return cmd.isPrint(); }
519 bool isFlush() const { return cmd.isFlush(); }
520
521 //@{
522 /// Snoop flags
523 /**

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

1058 flags.clear(STATIC_DATA|DYNAMIC_DATA);
1059 data = NULL;
1060 }
1061
1062 /** Allocate memory for the packet. */
1063 void
1064 allocate()
1065 {
1061 assert(flags.noneSet(STATIC_DATA|DYNAMIC_DATA));
1062 flags.set(DYNAMIC_DATA);
1063 data = new uint8_t[getSize()];
1066 // if either this command or the response command has a data
1067 // payload, actually allocate space
1068 if (hasData() || hasRespData()) {
1069 assert(flags.noneSet(STATIC_DATA|DYNAMIC_DATA));
1070 flags.set(DYNAMIC_DATA);
1071 data = new uint8_t[getSize()];
1072 }
1064 }
1065
1066 /** @} */
1067
1068 private: // Private data accessor methods
1069 /** Get the data in the packet without byte swapping. */
1070 template <typename T>
1071 T getRaw() const;

--- 90 unchanged lines hidden ---
1073 }
1074
1075 /** @} */
1076
1077 private: // Private data accessor methods
1078 /** Get the data in the packet without byte swapping. */
1079 template <typename T>
1080 T getRaw() const;

--- 90 unchanged lines hidden ---