diff options
author | Lisa Hsu <Lisa.Hsu@amd.com> | 2011-03-31 17:17:47 -0700 |
---|---|---|
committer | Lisa Hsu <Lisa.Hsu@amd.com> | 2011-03-31 17:17:47 -0700 |
commit | 225e67f5310f44cc8390c77dbb2c939c58c6b46e (patch) | |
tree | 34c0d9a93a7a99039e7cb644d3402f461b7c15e5 /src/mem/ruby/system | |
parent | f6a0b63d7b5d6f5c85eb3af7086b86b753911173 (diff) | |
download | gem5-225e67f5310f44cc8390c77dbb2c939c58c6b46e.tar.xz |
Ruby: pass Packet->Req->contextId() to Ruby.
It is useful for Ruby to understand from whence request packets came.
This has all request packets going into Ruby pass the contextId value, if
it exists. This supplants the old libruby proc_id value passed around in
all the Messages, so I've also removed the unused unsigned proc_id; member
generated by SLICC for all Message types.
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r-- | src/mem/ruby/system/Sequencer.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index 94ba6c2d3..94d41ffe4 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -671,11 +671,13 @@ Sequencer::issueRequest(const RubyRequest& request) Address line_addr(request.m_PhysicalAddress); line_addr.makeLineAddress(); + int proc_id = request.pkt->req->hasContextId() ? + request.pkt->req->contextId() : -1; RubyRequest *msg = new RubyRequest(request.m_PhysicalAddress.getAddress(), request.data, request.m_Size, request.m_ProgramCounter.getAddress(), ctype, amtype, request.pkt, - PrefetchBit_No, request.proc_id); + PrefetchBit_No, proc_id); DPRINTFR(ProtocolTrace, "%7s %3s %10s%20s %6s>%-6s %s %s\n", g_eventQueue_ptr->getTime(), m_version, "Seq", "Begin", "", "", |