RubyRequest.cc (9302:c2e70a9bc340) RubyRequest.cc (9572:13ae8000f771)
1#include <iostream>
2
3#include "mem/ruby/slicc_interface/RubyRequest.hh"
4
5using namespace std;
6
7void
8RubyRequest::print(ostream& out) const

--- 25 unchanged lines hidden (view full) ---

34{
35 // This needs a little explanation. I am not sure if this message
36 // should be written. Essentially the question is how are writes
37 // ordered. I am assuming that if a functional write is issued after
38 // a timing write to the same address, then the functional write
39 // has to overwrite the data for the timing request, even if the
40 // timing request has still not been ordered globally.
41
1#include <iostream>
2
3#include "mem/ruby/slicc_interface/RubyRequest.hh"
4
5using namespace std;
6
7void
8RubyRequest::print(ostream& out) const

--- 25 unchanged lines hidden (view full) ---

34{
35 // This needs a little explanation. I am not sure if this message
36 // should be written. Essentially the question is how are writes
37 // ordered. I am assuming that if a functional write is issued after
38 // a timing write to the same address, then the functional write
39 // has to overwrite the data for the timing request, even if the
40 // timing request has still not been ordered globally.
41
42 Address pktLineAddr(pkt->getAddr());
43 pktLineAddr.makeLineAddress();
42 Addr wBase = pkt->getAddr();
43 Addr wTail = wBase + pkt->getSize();
44 Addr mBase = m_PhysicalAddress.getAddress();
45 Addr mTail = mBase + m_Size;
44
46
45 if (pktLineAddr == m_LineAddress) {
46 uint8_t *pktData = pkt->getPtr<uint8_t>(true);
47 unsigned int size_in_bytes = pkt->getSize();
48 unsigned startByte = pkt->getAddr() - m_LineAddress.getAddress();
47 uint8_t * pktData = pkt->getPtr<uint8_t>(true);
49
48
50 for (unsigned i = 0; i < size_in_bytes; ++i) {
51 data[i + startByte] = pktData[i];
52 }
49 Addr cBase = std::max(wBase, mBase);
50 Addr cTail = std::min(wTail, mTail);
53
51
54 return true;
52 for (Addr i = cBase; i < cTail; ++i) {
53 data[i - mBase] = pktData[i - wBase];
55 }
54 }
56 return false;
55
56 return cBase < cTail;
57}
57}