Skip to content

Commit

Permalink
mem-prefetch: fix cdp config (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
tastynoob authored Dec 19, 2024
1 parent 1a6c8e1 commit c1d7c01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mem/cache/prefetch/Prefetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ class L2CompositeWithWorkerPrefetcher(CompositeWithWorkerPrefetcher):
bop_small = Param.BOPPrefetcher(SmallBOPPrefetcher(is_sub_prefetcher=True),
"Small BOP used in composite prefetcher ")
enable_bop = Param.Bool(False, "Enable BOP")
enable_cdp = Param.Bool(False, "Enable CDP")
enable_cdp = Param.Bool(True, "Enable CDP")
enable_cmc = Param.Bool(False, "Enable CMC")

class L3CompositeWithWorkerPrefetcher(CompositeWithWorkerPrefetcher):
Expand Down
10 changes: 8 additions & 2 deletions src/mem/cache/prefetch/l2_composite_with_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ L2CompositeWithWorkerPrefetcher::notify(const PacketPtr &pkt, const PrefetchInfo
void
L2CompositeWithWorkerPrefetcher::pfHitNotify(float accuracy, PrefetchSourceType pf_source, const PacketPtr &pkt)
{
cdp->pfHitNotify(accuracy, pf_source, pkt, addressGenBuffer);
if (enableCDP) {
cdp->pfHitNotify(accuracy, pf_source, pkt, addressGenBuffer);
}

if (addressGenBuffer.size()) {
assert(pkt->req->hasVaddr());
postNotifyInsert(pkt, addressGenBuffer);
Expand All @@ -93,7 +96,10 @@ L2CompositeWithWorkerPrefetcher::setParentInfo(System *sys, ProbeManager *pm, Ca
void
L2CompositeWithWorkerPrefetcher::notifyFill(const PacketPtr &pkt)
{
cdp->notifyFill(pkt, addressGenBuffer);
if (enableCDP) {
cdp->notifyFill(pkt, addressGenBuffer);
}

if (addressGenBuffer.size()) {
assert(pkt->req->hasVaddr());
postNotifyInsert(pkt, addressGenBuffer);
Expand Down

0 comments on commit c1d7c01

Please sign in to comment.