summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-07-13 15:48:17 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-07-13 15:48:17 -0400
commitc368ff0bd8d36ba001f523bd03f56f99d9ecd452 (patch)
tree0cd7ccb7fb5846745e86d2d8f332acf79b73a0fa /src/dev
parent2bc9229ea7195b307222bad6de966ea4a27a3f6b (diff)
downloadgem5-c368ff0bd8d36ba001f523bd03f56f99d9ecd452.tar.xz
add system.mem_mode = ['timing', 'atomic']
update scripts acordingly configs/test/SysPaths.py: new syspaths from nate, this one allows you to set script, binary, and disk paths like system.dir = 'aouaou' in your script configs/test/fs.py: update for system mem_mode Put small checkpoint example Make clock 1THz configs/test/test.py: src/arch/alpha/freebsd/system.cc: src/arch/alpha/linux/system.cc: src/arch/alpha/system.cc: src/arch/alpha/tru64/system.cc: src/arch/sparc/system.cc: src/python/m5/objects/System.py: src/sim/system.cc: src/sim/system.hh: update for system mem_mode src/dev/io_device.cc: Use time returned from sendAtomic to delay --HG-- extra : convert_revision : 67eedb3c84ab2584613faf88a534e793926fc92f
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/io_device.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dev/io_device.cc b/src/dev/io_device.cc
index ed2862065..660efabfd 100644
--- a/src/dev/io_device.cc
+++ b/src/dev/io_device.cc
@@ -287,6 +287,7 @@ DmaPort::sendDma(Packet *pkt, bool front)
// some kind of selction between access methods
// more work is going to have to be done to make
// switching actually work
+
System::MemoryMode state = sys->getMemoryMode();
if (state == System::Timing) {
DPRINTF(DMA, "Attempting to send Packet %#x with addr: %#x\n",
@@ -301,15 +302,15 @@ DmaPort::sendDma(Packet *pkt, bool front)
DPRINTF(DMA, "-- Done\n");
}
} else if (state == System::Atomic) {
- sendAtomic(pkt);
+ Tick lat;
+ lat = sendAtomic(pkt);
assert(pkt->senderState);
DmaReqState *state = dynamic_cast<DmaReqState*>(pkt->senderState);
assert(state);
state->numBytes += pkt->req->getSize();
if (state->totBytes == state->numBytes) {
- state->completionEvent->schedule(curTick +
- (pkt->time - pkt->req->getTime()) +1);
+ state->completionEvent->schedule(curTick + lat);
delete state;
delete pkt->req;
}