Deleted Added
sdiff udiff text old ( 13219:454ecc63338d ) new ( 13222:0dbcc7d7d66f )
full compact
1/*
2 * Copyright (c) 2018 Inria
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

37
38#include <cassert>
39#include <memory>
40#include <string>
41
42#include "base/intmath.hh"
43#include "base/logging.hh"
44#include "base/types.hh"
45#include "mem/cache/base.hh"
46#include "mem/cache/replacement_policies/base.hh"
47#include "mem/cache/tags/indexing_policies/base.hh"
48
49SectorTags::SectorTags(const SectorTagsParams *p)
50 : BaseTags(p), allocAssoc(p->assoc),
51 sequentialAccess(p->sequential_access),
52 replacementPolicy(p->replacement_policy),

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

271 assert(!victim->isValid());
272 } else {
273 // The whole sector must be evicted to make room for the new sector
274 for (const auto& blk : victim_sector->blks){
275 evict_blks.push_back(blk);
276 }
277 }
278
279 return victim;
280}
281
282int
283SectorTags::extractSectorOffset(Addr addr) const
284{
285 return (addr >> sectorShift) & sectorMask;
286}

--- 37 unchanged lines hidden ---