diff options
author | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-19 21:07:53 -0400 |
---|---|---|
committer | Ron Dreslinski <rdreslin@umich.edu> | 2006-10-19 21:07:53 -0400 |
commit | cc1feb9f6ddf9d0a58365ffa9f7ae948bf19901d (patch) | |
tree | f047a74f12952938c446fc8bf44b63b90cc427d0 /src/mem | |
parent | 210e73f2a298d494e4b15a3bf0523e58369c00d2 (diff) | |
download | gem5-cc1feb9f6ddf9d0a58365ffa9f7ae948bf19901d.tar.xz |
Fix memtester to use functional access, fix cache to work functionally now that we could test it.
src/cpu/memtest/memtest.cc:
Fix memtest to do functional accesses
src/mem/cache/cache_impl.hh:
Fix cache to handle functional accesses properly based on memtester changes
Still need to fix functional accesses in timing mode now that the memtester can test it.
--HG--
extra : convert_revision : a6dbca4dc23763ca13560fbf5d41a23ddf021113
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index c4acc03e7..d8afcb009 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -593,6 +593,8 @@ Cache<TagStore,Buffering,Coherence>::probe(Packet * &pkt, bool update, if (pkt->isWrite()) { memcpy(pkt_data, write_data, data_size); } else { + pkt->flags |= SATISFIED; + pkt->result = Packet::Success; memcpy(write_data, pkt_data, data_size); } } @@ -626,11 +628,19 @@ Cache<TagStore,Buffering,Coherence>::probe(Packet * &pkt, bool update, if (pkt->isWrite()) { memcpy(pkt_data, write_data, data_size); } else { + pkt->flags |= SATISFIED; + pkt->result = Packet::Success; memcpy(write_data, pkt_data, data_size); } } } + if (pkt->isRead() + && pkt->result != Packet::Success + && otherSidePort == memSidePort) { + otherSidePort->sendFunctional(pkt); + assert(pkt->result == Packet::Success); + } return 0; } else if (!blk) { // update the cache state and statistics |