packet.hh (3348:11f6ef023158) packet.hh (3349:fec4a86fa212)
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;

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

41#include <cassert>
42#include <list>
43
44#include "mem/request.hh"
45#include "sim/host.hh"
46#include "sim/root.hh"
47
48struct Packet;
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;

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

41#include <cassert>
42#include <list>
43
44#include "mem/request.hh"
45#include "sim/host.hh"
46#include "sim/root.hh"
47
48struct Packet;
49typedef Packet* PacketPtr;
49typedef Packet *PacketPtr;
50typedef uint8_t* PacketDataPtr;
51typedef std::list<PacketPtr> PacketList;
52
53//Coherence Flags
54#define NACKED_LINE 1 << 0
55#define SATISFIED 1 << 1
56#define SHARED_LINE 1 << 2
57#define CACHE_LINE_FILL 1 << 3

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

98 Addr addr;
99
100 /** The size of the request or transfer. */
101 int size;
102
103 /** Device address (e.g., bus ID) of the source of the
104 * transaction. The source is not responsible for setting this
105 * field; it is set implicitly by the interconnect when the
50typedef uint8_t* PacketDataPtr;
51typedef std::list<PacketPtr> PacketList;
52
53//Coherence Flags
54#define NACKED_LINE 1 << 0
55#define SATISFIED 1 << 1
56#define SHARED_LINE 1 << 2
57#define CACHE_LINE_FILL 1 << 3

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

98 Addr addr;
99
100 /** The size of the request or transfer. */
101 int size;
102
103 /** Device address (e.g., bus ID) of the source of the
104 * transaction. The source is not responsible for setting this
105 * field; it is set implicitly by the interconnect when the
106 * packet * is first sent. */
106 * packet is first sent. */
107 short src;
108
109 /** Device address (e.g., bus ID) of the destination of the
110 * transaction. The special value Broadcast indicates that the
111 * packet should be routed based on its address. This field is
112 * initialized in the constructor and is thus always valid
113 * (unlike * addr, size, and src). */
114 short dest;

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

439 * matter how data was allocted.
440 */
441 void deleteData();
442
443 /** If there isn't data in the packet, allocate some. */
444 void allocate();
445
446 /** Do the packet modify the same addresses. */
107 short src;
108
109 /** Device address (e.g., bus ID) of the destination of the
110 * transaction. The special value Broadcast indicates that the
111 * packet should be routed based on its address. This field is
112 * initialized in the constructor and is thus always valid
113 * (unlike * addr, size, and src). */
114 short dest;

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

439 * matter how data was allocted.
440 */
441 void deleteData();
442
443 /** If there isn't data in the packet, allocate some. */
444 void allocate();
445
446 /** Do the packet modify the same addresses. */
447 bool intersect(Packet *p);
447 bool intersect(PacketPtr p);
448};
449
450
451/** This function given a functional packet and a timing packet either satisfies
452 * the timing packet, or updates the timing packet to reflect the updated state
453 * in the timing packet. It returns if the functional packet should continue to
454 * traverse the memory hierarchy or not.
455 */
448};
449
450
451/** This function given a functional packet and a timing packet either satisfies
452 * the timing packet, or updates the timing packet to reflect the updated state
453 * in the timing packet. It returns if the functional packet should continue to
454 * traverse the memory hierarchy or not.
455 */
456bool fixPacket(Packet *func, Packet *timing);
456bool fixPacket(PacketPtr func, PacketPtr timing);
457
458std::ostream & operator<<(std::ostream &o, const Packet &p);
459
460#endif //__MEM_PACKET_HH
457
458std::ostream & operator<<(std::ostream &o, const Packet &p);
459
460#endif //__MEM_PACKET_HH