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; --- 66 unchanged lines hidden (view full) --- 75 port->transmitList.push_back(packet); 76} 77 78 79 80bool 81PioPort::recvTiming(Packet *pkt) 82{ |
83 Tick latency = device->recvAtomic(pkt); |
84 // turn packet around to go back to requester 85 pkt->makeTimingResponse(); |
86 sendTiming(pkt, latency); |
87 return true; 88} 89 90PioDevice::~PioDevice() 91{ 92 if (pioPort) 93 delete pioPort; 94} --- 43 unchanged lines hidden (view full) --- 138DmaDevice::DmaDevice(Params *p) 139 : PioDevice(p), dmaPort(NULL) 140{ } 141 142void 143DmaPort::recvRetry() 144{ 145 Packet* pkt = transmitList.front(); |
146 DPRINTF(DMA, "Retry on Packet %#x with senderState: %#x\n", 147 pkt, pkt->senderState); 148 if (sendTiming(pkt)) { 149 DPRINTF(DMA, "-- Done\n"); 150 transmitList.pop_front(); 151 pendingCount--; 152 assert(pendingCount >= 0); 153 } else { 154 DPRINTF(DMA, "-- Failed, queued\n"); |
155 } 156} 157 158 159void 160DmaPort::dmaAction(Packet::Command cmd, Addr addr, int size, Event *event, 161 uint8_t *data) 162{ --- 33 unchanged lines hidden (view full) --- 196 // some kind of selction between access methods 197 // more work is going to have to be done to make 198 // switching actually work 199 /* MemState state = device->platform->system->memState; 200 201 if (state == Timing) { */ 202 DPRINTF(DMA, "Attempting to send Packet %#x with senderState: %#x\n", 203 pkt, pkt->senderState); |
204 if (!sendTiming(pkt)) { |
205 transmitList.push_back(pkt); 206 DPRINTF(DMA, "-- Failed: queued\n"); 207 } else { 208 DPRINTF(DMA, "-- Done\n"); 209 pendingCount--; 210 assert(pendingCount >= 0); 211 } 212 /* } else if (state == Atomic) { --- 28 unchanged lines hidden --- |