# HG changeset patch # User Brad Beckmann <brad.beckm...@amd.com> # Date 1263536246 28800 # Node ID 01bab1b7fc3c1da1d60c386999ba940ed773bab5 # Parent b2581afcdf3c74326fb4f5732874fc2c9be252e3 ruby: Pass pc from the ruby tester
diff -r b2581afcdf3c -r 01bab1b7fc3c src/cpu/rubytest/Check.cc --- a/src/cpu/rubytest/Check.cc Thu Jan 14 22:17:26 2010 -0800 +++ b/src/cpu/rubytest/Check.cc Thu Jan 14 22:17:26 2010 -0800 @@ -88,7 +88,9 @@ // Request *req = new Request(m_address.getAddress(), 0, - flags); + flags, + curTick, + m_pc.getAddress()); Packet::Command cmd; @@ -146,7 +148,9 @@ // Request *req = new Request(writeAddr.getAddress(), 1, - flags); + flags, + curTick, + m_pc.getAddress()); Packet::Command cmd; @@ -200,7 +204,9 @@ // Request *req = new Request(m_address.getAddress(), CHECK_SIZE, - flags); + flags, + curTick, + m_pc.getAddress()); // // 50% chance that the request will be an instruction fetch diff -r b2581afcdf3c -r 01bab1b7fc3c src/mem/request.hh --- a/src/mem/request.hh Thu Jan 14 22:17:26 2010 -0800 +++ b/src/mem/request.hh Thu Jan 14 22:17:26 2010 -0800 @@ -194,6 +194,13 @@ setPhys(paddr, size, flags, time); } + Request(Addr paddr, int size, Flags flags, Tick time, Addr pc) + { + setPhys(paddr, size, flags, time); + privateFlags.set(VALID_PC); + _pc = pc; + } + Request(int asid, Addr vaddr, int size, Flags flags, Addr pc, int cid, ThreadID tid) { diff -r b2581afcdf3c -r 01bab1b7fc3c src/mem/ruby/system/RubyPort.cc --- a/src/mem/ruby/system/RubyPort.cc Thu Jan 14 22:17:26 2010 -0800 +++ b/src/mem/ruby/system/RubyPort.cc Thu Jan 14 22:17:26 2010 -0800 @@ -177,11 +177,18 @@ // sending them to our assigned ruby port. // RubyRequestType type = RubyRequestType_NULL; + + // + // If valid, copy the pc to the ruby request + // Addr pc = 0; + if (pkt->req->hasPC()) { + pc = pkt->req->getPC(); + } + if (pkt->isRead()) { if (pkt->req->isInstFetch()) { type = RubyRequestType_IFETCH; - pc = pkt->req->getPC(); } else { type = RubyRequestType_LD; } _______________________________________________ m5-dev mailing list m5-dev@m5sim.org http://m5sim.org/mailman/listinfo/m5-dev