base.cc (13215:82cdb8db4643) | base.cc (13217:725b1701b4ee) |
---|---|
1/* 2 * Copyright (c) 2013,2016,2018 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 64 unchanged lines hidden (view full) --- 73 74void 75BaseTags::setCache(BaseCache *_cache) 76{ 77 assert(!cache); 78 cache = _cache; 79} 80 | 1/* 2 * Copyright (c) 2013,2016,2018 ARM Limited 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 64 unchanged lines hidden (view full) --- 73 74void 75BaseTags::setCache(BaseCache *_cache) 76{ 77 assert(!cache); 78 cache = _cache; 79} 80 |
81std::vector<ReplaceableEntry*> 82BaseTags::getPossibleLocations(const Addr addr) const 83{ 84 panic("Unimplemented getPossibleLocations for tags subclass"); 85} 86 87CacheBlk* 88BaseTags::findBlock(Addr addr, bool is_secure) const 89{ 90 // Extract block tag 91 Addr tag = extractTag(addr); 92 93 // Find possible locations for the given address 94 const std::vector<ReplaceableEntry*> locations = 95 getPossibleLocations(addr); 96 97 // Search for block 98 for (const auto& location : locations) { 99 CacheBlk* blk = static_cast<CacheBlk*>(location); 100 if ((blk->tag == tag) && blk->isValid() && 101 (blk->isSecure() == is_secure)) { 102 return blk; 103 } 104 } 105 106 // Did not find block 107 return nullptr; 108} 109 |
|
81void 82BaseTags::insertBlock(const Addr addr, const bool is_secure, 83 const int src_master_ID, const uint32_t task_ID, 84 CacheBlk *blk) 85{ 86 assert(!blk->isValid()); 87 88 // Previous block, if existed, has been removed, and now we have --- 180 unchanged lines hidden --- | 110void 111BaseTags::insertBlock(const Addr addr, const bool is_secure, 112 const int src_master_ID, const uint32_t task_ID, 113 CacheBlk *blk) 114{ 115 assert(!blk->isValid()); 116 117 // Previous block, if existed, has been removed, and now we have --- 180 unchanged lines hidden --- |