Lines Matching refs:packet

53  * Convert a gem5 packet to a TLM payload by copying all the relevant
57 packet2payload(PacketPtr packet, tlm::tlm_generic_payload &trans)
59 trans.set_address(packet->getAddr());
64 unsigned int size = packet->getSize();
65 unsigned char *data = packet->getPtr<unsigned char>();
71 if (packet->isRead()) {
74 else if (packet->isInvalidate()) {
76 } else if (packet->isWrite()) {
79 SC_REPORT_FATAL("SCSlavePort", "No R/W packet");
87 SCSlavePort::recvAtomic(PacketPtr packet)
92 panic_if(packet->cacheResponding(), "Should not see packets where cache "
95 panic_if(!(packet->isRead() || packet->isWrite()),
105 packet2payload(packet, *trans);
107 /* Attach the packet pointer to the TLM transaction to keep track */
108 Gem5Extension* extension = new Gem5Extension(packet);
112 if (packet->cmd == MemCmd::SwapReq) {
114 } else if (packet->isRead()) {
116 } else if (packet->isInvalidate()) {
118 } else if (packet->isWrite()) {
124 if (packet->needsResponse()) {
125 packet->makeResponse();
137 SCSlavePort::recvFunctional(PacketPtr packet)
142 packet2payload(packet, *trans);
144 /* Attach the packet pointer to the TLM transaction to keep track */
145 Gem5Extension* extension = new Gem5Extension(packet);
158 SCSlavePort::recvTimingSnoopResp(PacketPtr packet)
166 SCSlavePort::recvFunctionalSnoop(PacketPtr packet)
176 SCSlavePort::recvTimingReq(PacketPtr packet)
180 panic_if(packet->cacheResponding(), "Should not see packets where cache "
183 panic_if(!(packet->isRead() || packet->isWrite()),
211 packet2payload(packet, *trans);
213 /* Attach the packet pointer to the TLM transaction to keep track */
214 Gem5Extension* extension = new Gem5Extension(packet);
220 * The header delay marks the point in time, when the packet first is seen
238 auto delay = sc_core::sc_time::from_value(packet->payloadDelay);
240 packet->payloadDelay = 0;
241 packet->headerDelay = 0;
294 auto packet = extension.getPacket();
301 * If the packet was piped through and needs a response, we don't need
302 * to touch the packet and can forward it directly as a response.
304 * packet.
307 if (packet->isResponse()) {
308 need_retry = !sendTimingResp(packet);
310 } else if (packet->needsResponse()) {
311 packet->makeResponse();
312 need_retry = !sendTimingResp(packet);
341 PacketPtr packet = Gem5Extension::getExtension(trans).getPacket();
343 bool need_retry = !sendTimingResp(packet);