Skip to content

Commit

Permalink
mem: l2 cache use drrip replacement (#304)
Browse files Browse the repository at this point in the history
Change-Id: I3b208d4796352cfb3b6519865d1f789aa111ff7c
  • Loading branch information
tastynoob authored Feb 27, 2025
1 parent 8e0eada commit a72aeb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions configs/common/Caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class L2Cache(Cache):
# recvTimingResp serviceMSHR latency
response_latency = 0

replacement_policy = DRRIPRP(constituency_size = 64, team_size = 8)

cache_level = 2
enable_wayprediction = False

Expand Down
2 changes: 1 addition & 1 deletion src/mem/cache/cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ Cache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt, CacheBlk *blk)
.missLatency[tgt_pkt->req->requestorId()] +=
completion_time - target.recvTime;
stats.cmdStats(tgt_pkt)
.missLatencyDist.sample((completion_time - target.recvTime)/500);
.missLatencyDist.sample(ticksToCycles(completion_time - target.recvTime));

if (tgt_pkt->cmd == MemCmd::LockedRMWReadReq) {
// We're going to leave a target in the MSHR until the
Expand Down

0 comments on commit a72aeb7

Please sign in to comment.