packet.hh (4921:bcf49547dae7) packet.hh (4986:b7c82ad6b3ef)
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;

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

327 void setExpressSnoop() { flags[ExpressSnoop] = true; }
328 bool isExpressSnoop() { return flags[ExpressSnoop]; }
329 void setSupplyExclusive() { flags[SupplyExclusive] = true; }
330 bool isSupplyExclusive() { return flags[SupplyExclusive]; }
331
332 // Network error conditions... encapsulate them as methods since
333 // their encoding keeps changing (from result field to command
334 // field, etc.)
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;

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

327 void setExpressSnoop() { flags[ExpressSnoop] = true; }
328 bool isExpressSnoop() { return flags[ExpressSnoop]; }
329 void setSupplyExclusive() { flags[SupplyExclusive] = true; }
330 bool isSupplyExclusive() { return flags[SupplyExclusive]; }
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; }
335 void setNacked() { assert(isResponse()); cmd = MemCmd::NetworkNackError; }
336 void setBadAddress() { assert(isResponse()); cmd = MemCmd::BadAddressError; }
337 bool wasNacked() { return cmd == MemCmd::NetworkNackError; }
338 bool hadBadAddress() { return cmd == MemCmd::BadAddressError; }
337 bool wasNacked() { return cmd == MemCmd::NetworkNackError; }
338 bool hadBadAddress() { return cmd == MemCmd::BadAddressError; }
339 void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; }
339
340 bool nic_pkt() { panic("Unimplemented"); M5_DUMMY_RETURN }
341
342 /** Accessor function that returns the source index of the packet. */
343 short getSrc() const { assert(srcValid); return src; }
344 void setSrc(short _src) { src = _src; srcValid = true; }
345 /** Reset source field, e.g. to retransmit packet on different bus. */
346 void clearSrc() { srcValid = false; }

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

426 * returning as a response to that request. The source and
427 * destination fields are *not* modified, as is appropriate for
428 * atomic accesses.
429 */
430 void makeResponse()
431 {
432 assert(needsResponse());
433 assert(isRequest());
340
341 bool nic_pkt() { panic("Unimplemented"); M5_DUMMY_RETURN }
342
343 /** Accessor function that returns the source index of the packet. */
344 short getSrc() const { assert(srcValid); return src; }
345 void setSrc(short _src) { src = _src; srcValid = true; }
346 /** Reset source field, e.g. to retransmit packet on different bus. */
347 void clearSrc() { srcValid = false; }

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

427 * returning as a response to that request. The source and
428 * destination fields are *not* modified, as is appropriate for
429 * atomic accesses.
430 */
431 void makeResponse()
432 {
433 assert(needsResponse());
434 assert(isRequest());
435 origCmd = cmd;
434 cmd = cmd.responseCommand();
435 dest = src;
436 destValid = srcValid;
437 srcValid = false;
438 }
439
440 void makeAtomicResponse()
441 {

--- 148 unchanged lines hidden ---
436 cmd = cmd.responseCommand();
437 dest = src;
438 destValid = srcValid;
439 srcValid = false;
440 }
441
442 void makeAtomicResponse()
443 {

--- 148 unchanged lines hidden ---