Add functional PrintReq command for memory-system debugging.

--HG--
extra : convert_revision : 73b753e57c355b7e6873f047ddc8cb371c3136b7
This commit is contained in:
Steve Reinhardt
2008-01-02 12:20:15 -08:00
parent 659aef3eb8
commit 3952e41ab1
23 changed files with 458 additions and 123 deletions

View File

@@ -41,8 +41,10 @@
using namespace std;
BaseCache::CachePort::CachePort(const std::string &_name, BaseCache *_cache,
std::vector<Range<Addr> > filter_ranges)
: SimpleTimingPort(_name, _cache), cache(_cache), otherPort(NULL),
const std::string &_label,
std::vector<Range<Addr> > filter_ranges)
: SimpleTimingPort(_name, _cache), cache(_cache),
label(_label), otherPort(NULL),
blocked(false), mustSendRetry(false), filterRanges(filter_ranges)
{
}
@@ -50,8 +52,8 @@ BaseCache::CachePort::CachePort(const std::string &_name, BaseCache *_cache,
BaseCache::BaseCache(const Params *p)
: MemObject(p),
mshrQueue(p->mshrs, 4, MSHRQueue_MSHRs),
writeBuffer(p->write_buffers, p->mshrs+1000,
mshrQueue("MSHRs", p->mshrs, 4, MSHRQueue_MSHRs),
writeBuffer("write buffer", p->write_buffers, p->mshrs+1000,
MSHRQueue_WriteBuffer),
blkSize(p->block_size),
hitLatency(p->latency),
@@ -71,6 +73,17 @@ BaseCache::CachePort::recvStatusChange(Port::Status status)
}
}
bool
BaseCache::CachePort::checkFunctional(PacketPtr pkt)
{
pkt->pushLabel(label);
bool done = SimpleTimingPort::checkFunctional(pkt);
pkt->popLabel();
return done;
}
int
BaseCache::CachePort::deviceBlockSize()
{
@@ -78,15 +91,6 @@ BaseCache::CachePort::deviceBlockSize()
}
void
BaseCache::CachePort::checkAndSendFunctional(PacketPtr pkt)
{
if (!checkFunctional(pkt)) {
sendFunctional(pkt);
}
}
bool
BaseCache::CachePort::recvRetryCommon()
{