packet.hh (3369:1da3e60827b6) packet.hh (3607:7b7dd28784c4)
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;

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

339 icmd |= HasData;
340 if (isWrite())
341 icmd &= ~HasData;
342 cmd = (Command)icmd;
343 dest = src;
344 srcValid = false;
345 }
346
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;

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

339 icmd |= HasData;
340 if (isWrite())
341 icmd &= ~HasData;
342 cmd = (Command)icmd;
343 dest = src;
344 srcValid = false;
345 }
346
347
348 void toggleData() {
349 int icmd = (int)cmd;
350 icmd ^= HasData;
351 cmd = (Command)icmd;
352 }
353
347 /**
348 * Take a request packet and modify it in place to be suitable for
349 * returning as a response to that request.
350 */
351 void makeAtomicResponse()
352 {
353 assert(needsResponse());
354 assert(isRequest());

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

443
444 /** If there isn't data in the packet, allocate some. */
445 void allocate();
446
447 /** Do the packet modify the same addresses. */
448 bool intersect(PacketPtr p);
449};
450
354 /**
355 * Take a request packet and modify it in place to be suitable for
356 * returning as a response to that request.
357 */
358 void makeAtomicResponse()
359 {
360 assert(needsResponse());
361 assert(isRequest());

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

450
451 /** If there isn't data in the packet, allocate some. */
452 void allocate();
453
454 /** Do the packet modify the same addresses. */
455 bool intersect(PacketPtr p);
456};
457
451
452/** This function given a functional packet and a timing packet either satisfies
453 * the timing packet, or updates the timing packet to reflect the updated state
454 * in the timing packet. It returns if the functional packet should continue to
455 * traverse the memory hierarchy or not.
456 */
457bool fixPacket(PacketPtr func, PacketPtr timing);
458
458/** This function given a functional packet and a timing packet either satisfies
459 * the timing packet, or updates the timing packet to reflect the updated state
460 * in the timing packet. It returns if the functional packet should continue to
461 * traverse the memory hierarchy or not.
462 */
463bool fixPacket(PacketPtr func, PacketPtr timing);
464
465/** This function is a wrapper for the fixPacket field that toggles the hasData bit
466 * it is used when a response is waiting in the caches, but hasn't been marked as a
467 * response yet (so the fixPacket needs to get the correct value for the hasData)
468 */
469bool fixDelayedResponsePacket(PacketPtr func, PacketPtr timing);
470
459std::ostream & operator<<(std::ostream &o, const Packet &p);
460
461#endif //__MEM_PACKET_HH
471std::ostream & operator<<(std::ostream &o, const Packet &p);
472
473#endif //__MEM_PACKET_HH