packet.hh (4908:771ec077a955) packet.hh (4916:000ab733f1eb)
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;

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

251 bool srcValid;
252 bool destValid;
253
254 enum Flag {
255 // Snoop response flags
256 MemInhibit,
257 Shared,
258 // Special control flags
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;

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

251 bool srcValid;
252 bool destValid;
253
254 enum Flag {
255 // Snoop response flags
256 MemInhibit,
257 Shared,
258 // Special control flags
259 /// Special timing-mode atomic snoop for multi-level coherence.
259 ExpressSnoop,
260 ExpressSnoop,
261 /// Does supplier have exclusive copy?
262 /// Useful for multi-level coherence.
263 SupplyExclusive,
260 NUM_PACKET_FLAGS
261 };
262
263 /** Status flags */
264 std::bitset<NUM_PACKET_FLAGS> flags;
265
266 public:
267

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

310 bool isInvalidate() const { return cmd.isInvalidate(); }
311 bool hasData() const { return cmd.hasData(); }
312 bool isReadWrite() const { return cmd.isReadWrite(); }
313 bool isLocked() const { return cmd.isLocked(); }
314 bool isError() const { return cmd.isError(); }
315
316 // Snoop flags
317 void assertMemInhibit() { flags[MemInhibit] = true; }
264 NUM_PACKET_FLAGS
265 };
266
267 /** Status flags */
268 std::bitset<NUM_PACKET_FLAGS> flags;
269
270 public:
271

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

314 bool isInvalidate() const { return cmd.isInvalidate(); }
315 bool hasData() const { return cmd.hasData(); }
316 bool isReadWrite() const { return cmd.isReadWrite(); }
317 bool isLocked() const { return cmd.isLocked(); }
318 bool isError() const { return cmd.isError(); }
319
320 // Snoop flags
321 void assertMemInhibit() { flags[MemInhibit] = true; }
318 void assertShared() { flags[Shared] = true; }
319 bool memInhibitAsserted() { return flags[MemInhibit]; }
322 bool memInhibitAsserted() { return flags[MemInhibit]; }
323 void assertShared() { flags[Shared] = true; }
320 bool sharedAsserted() { return flags[Shared]; }
321
322 // Special control flags
323 void setExpressSnoop() { flags[ExpressSnoop] = true; }
324 bool isExpressSnoop() { return flags[ExpressSnoop]; }
324 bool sharedAsserted() { return flags[Shared]; }
325
326 // Special control flags
327 void setExpressSnoop() { flags[ExpressSnoop] = true; }
328 bool isExpressSnoop() { return flags[ExpressSnoop]; }
329 void setSupplyExclusive() { flags[SupplyExclusive] = true; }
330 bool isSupplyExclusive() { return flags[SupplyExclusive]; }
325
326 // Network error conditions... encapsulate them as methods since
327 // their encoding keeps changing (from result field to command
328 // field, etc.)
329 void setNacked() { origCmd = cmd; cmd = MemCmd::NetworkNackError; }
330 void setBadAddress() { origCmd = cmd; cmd = MemCmd::BadAddressError; }
331 bool wasNacked() { return cmd == MemCmd::NetworkNackError; }
332 bool hadBadAddress() { return cmd == MemCmd::BadAddressError; }

--- 254 unchanged lines hidden ---
331
332 // Network error conditions... encapsulate them as methods since
333 // their encoding keeps changing (from result field to command
334 // field, etc.)
335 void setNacked() { origCmd = cmd; cmd = MemCmd::NetworkNackError; }
336 void setBadAddress() { origCmd = cmd; cmd = MemCmd::BadAddressError; }
337 bool wasNacked() { return cmd == MemCmd::NetworkNackError; }
338 bool hadBadAddress() { return cmd == MemCmd::BadAddressError; }

--- 254 unchanged lines hidden ---