diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-01-17 12:55:09 -0600 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-01-17 12:55:09 -0600 |
commit | de34e49d15b95cc8be51dbed2e98c469e7486959 (patch) | |
tree | fc3d2ab7d4c8c75fedbff44bb29d479c620eb620 /src/dev | |
parent | b3f930c884ef23e4d784553fdccc91a772334fd7 (diff) | |
download | gem5-de34e49d15b95cc8be51dbed2e98c469e7486959.tar.xz |
MEM: Simplify ports by removing EventManager
This patch removes the inheritance of EventManager from the ports and
moves all responsibility for event queues to the owner. Eventually the
event manager should be the interface block, which could either be the
structural owner or a subblock like a LSQ in the O3 CPU for example.
Diffstat (limited to 'src/dev')
-rw-r--r-- | src/dev/io_device.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc index 00e463de1..9b7b6ec50 100644 --- a/src/dev/io_device.cc +++ b/src/dev/io_device.cc @@ -136,7 +136,7 @@ DmaPort::recvTiming(PacketPtr pkt) else if (backoffTime < maxBackoffDelay) backoffTime <<= 1; - reschedule(backoffEvent, curTick() + backoffTime, true); + device->reschedule(backoffEvent, curTick() + backoffTime, true); DPRINTF(DMA, "Backoff time set to %d ticks\n", backoffTime); @@ -164,7 +164,8 @@ DmaPort::recvTiming(PacketPtr pkt) if (state->totBytes == state->numBytes) { if (state->completionEvent) { if (state->delay) - schedule(state->completionEvent, curTick() + state->delay); + device->schedule(state->completionEvent, + curTick() + state->delay); else state->completionEvent->process(); } @@ -234,7 +235,7 @@ DmaPort::recvRetry() if (transmitList.size() && backoffTime && !inRetry) { DPRINTF(DMA, "Scheduling backoff for %d\n", curTick()+backoffTime); if (!backoffEvent.scheduled()) - schedule(backoffEvent, backoffTime + curTick()); + device->schedule(backoffEvent, backoffTime + curTick()); } DPRINTF(DMA, "TransmitList: %d, backoffTime: %d inRetry: %d es: %d\n", transmitList.size(), backoffTime, inRetry, @@ -320,7 +321,7 @@ DmaPort::sendDma() !backoffEvent.scheduled()) { DPRINTF(DMA, "-- Scheduling backoff timer for %d\n", backoffTime+curTick()); - schedule(backoffEvent, backoffTime + curTick()); + device->schedule(backoffEvent, backoffTime + curTick()); } } else if (state == Enums::atomic) { transmitList.pop_front(); @@ -342,7 +343,8 @@ DmaPort::sendDma() if (state->totBytes == state->numBytes) { if (state->completionEvent) { assert(!state->completionEvent->scheduled()); - schedule(state->completionEvent, curTick() + lat + state->delay); + device->schedule(state->completionEvent, + curTick() + lat + state->delay); } delete state; delete pkt->req; |