packet.hh (4026:7c8c480474c6) packet.hh (4040:eb894f3fc168)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

83 SoftPFResp,
84 HardPFResp,
85 InvalidateReq,
86 WriteInvalidateReq,
87 WriteInvalidateResp,
88 UpgradeReq,
89 ReadExReq,
90 ReadExResp,
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

83 SoftPFResp,
84 HardPFResp,
85 InvalidateReq,
86 WriteInvalidateReq,
87 WriteInvalidateResp,
88 UpgradeReq,
89 ReadExReq,
90 ReadExResp,
91 SwapReq,
92 SwapResp,
91 NUM_MEM_CMDS
92 };
93
94 private:
95 /** List of command attributes. */
96 enum Attribute
97 {
98 IsRead,
99 IsWrite,
100 IsPrefetch,
101 IsInvalidate,
102 IsRequest,
103 IsResponse,
104 NeedsResponse,
105 IsSWPrefetch,
106 IsHWPrefetch,
107 IsUpgrade,
108 HasData,
93 NUM_MEM_CMDS
94 };
95
96 private:
97 /** List of command attributes. */
98 enum Attribute
99 {
100 IsRead,
101 IsWrite,
102 IsPrefetch,
103 IsInvalidate,
104 IsRequest,
105 IsResponse,
106 NeedsResponse,
107 IsSWPrefetch,
108 IsHWPrefetch,
109 IsUpgrade,
110 HasData,
111 IsReadWrite,
109 NUM_COMMAND_ATTRIBUTES
110 };
111
112 /** Structure that defines attributes and other data associated
113 * with a Command. */
114 struct CommandInfo {
115 /** Set of attribute flags. */
116 const std::bitset<NUM_COMMAND_ATTRIBUTES> attributes;

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

136
137 bool isRead() const { return testCmdAttrib(IsRead); }
138 bool isWrite() const { return testCmdAttrib(IsWrite); }
139 bool isRequest() const { return testCmdAttrib(IsRequest); }
140 bool isResponse() const { return testCmdAttrib(IsResponse); }
141 bool needsResponse() const { return testCmdAttrib(NeedsResponse); }
142 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); }
143 bool hasData() const { return testCmdAttrib(HasData); }
112 NUM_COMMAND_ATTRIBUTES
113 };
114
115 /** Structure that defines attributes and other data associated
116 * with a Command. */
117 struct CommandInfo {
118 /** Set of attribute flags. */
119 const std::bitset<NUM_COMMAND_ATTRIBUTES> attributes;

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

139
140 bool isRead() const { return testCmdAttrib(IsRead); }
141 bool isWrite() const { return testCmdAttrib(IsWrite); }
142 bool isRequest() const { return testCmdAttrib(IsRequest); }
143 bool isResponse() const { return testCmdAttrib(IsResponse); }
144 bool needsResponse() const { return testCmdAttrib(NeedsResponse); }
145 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); }
146 bool hasData() const { return testCmdAttrib(HasData); }
147 bool isReadWrite() const { return testCmdAttrib(IsReadWrite); }
144
145 const Command responseCommand() const {
146 return commandInfo[cmd].response;
147 }
148
149 /** Return the string to a cmd given by idx. */
150 const std::string &toString() const {
151 return commandInfo[cmd].str;

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

295
296 bool isRead() const { return cmd.isRead(); }
297 bool isWrite() const { return cmd.isWrite(); }
298 bool isRequest() const { return cmd.isRequest(); }
299 bool isResponse() const { return cmd.isResponse(); }
300 bool needsResponse() const { return cmd.needsResponse(); }
301 bool isInvalidate() const { return cmd.isInvalidate(); }
302 bool hasData() const { return cmd.hasData(); }
148
149 const Command responseCommand() const {
150 return commandInfo[cmd].response;
151 }
152
153 /** Return the string to a cmd given by idx. */
154 const std::string &toString() const {
155 return commandInfo[cmd].str;

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

299
300 bool isRead() const { return cmd.isRead(); }
301 bool isWrite() const { return cmd.isWrite(); }
302 bool isRequest() const { return cmd.isRequest(); }
303 bool isResponse() const { return cmd.isResponse(); }
304 bool needsResponse() const { return cmd.needsResponse(); }
305 bool isInvalidate() const { return cmd.isInvalidate(); }
306 bool hasData() const { return cmd.hasData(); }
307 bool isReadWrite() const { return cmd.isReadWrite(); }
303
304 bool isCacheFill() const { return (flags & CACHE_LINE_FILL) != 0; }
305 bool isNoAllocate() const { return (flags & NO_ALLOCATE) != 0; }
306 bool isCompressed() const { return (flags & COMPRESSED) != 0; }
307
308 bool nic_pkt() { panic("Unimplemented"); M5_DUMMY_RETURN }
309
310 /** Possible results of a packet's request. */

--- 209 unchanged lines hidden ---
308
309 bool isCacheFill() const { return (flags & CACHE_LINE_FILL) != 0; }
310 bool isNoAllocate() const { return (flags & NO_ALLOCATE) != 0; }
311 bool isCompressed() const { return (flags & COMPRESSED) != 0; }
312
313 bool nic_pkt() { panic("Unimplemented"); M5_DUMMY_RETURN }
314
315 /** Possible results of a packet's request. */

--- 209 unchanged lines hidden ---