summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:14 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:14 -0700
commit908364a1c9239ad15d166720fdd89fe9f65d9331 (patch)
treead781b3ad89fea33fb752485788e068872cbcd81
parente7f2da517adbc9ba4ed1b33de102126260a0d587 (diff)
downloadgem5-908364a1c9239ad15d166720fdd89fe9f65d9331.tar.xz
ruby: Fixed minor bug in ruby test for setting the request type
-rw-r--r--src/cpu/rubytest/Check.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cpu/rubytest/Check.cc b/src/cpu/rubytest/Check.cc
index 867e755a8..33927ea0c 100644
--- a/src/cpu/rubytest/Check.cc
+++ b/src/cpu/rubytest/Check.cc
@@ -82,10 +82,6 @@ Check::initiatePrefetch()
Request::Flags flags;
flags.set(Request::PREFETCH);
- // Prefetches are assumed to be 0 sized
- Request *req = new Request(m_address.getAddress(), 0, flags, curTick,
- m_pc.getAddress());
-
Packet::Command cmd;
// 1 in 8 chance this will be an exclusive prefetch
@@ -101,6 +97,10 @@ Check::initiatePrefetch()
flags.set(Request::PF_EXCLUSIVE);
}
+ // Prefetches are assumed to be 0 sized
+ Request *req = new Request(m_address.getAddress(), 0, flags, curTick,
+ m_pc.getAddress());
+
PacketPtr pkt = new Packet(req, cmd, port->idx);
// push the subblock onto the sender state. The sequencer will
@@ -198,15 +198,15 @@ Check::initiateCheck()
Request::Flags flags;
- // Checks are sized depending on the number of bytes written
- Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags,
- curTick, m_pc.getAddress());
-
// 50% chance that the request will be an instruction fetch
if ((random() & 0x1) == 0) {
flags.set(Request::INST_FETCH);
}
+ // Checks are sized depending on the number of bytes written
+ Request *req = new Request(m_address.getAddress(), CHECK_SIZE, flags,
+ curTick, m_pc.getAddress());
+
PacketPtr pkt = new Packet(req, MemCmd::ReadReq, port->idx);
uint8_t* dataArray = new uint8_t[CHECK_SIZE];
pkt->dataDynamicArray(dataArray);