base_set_assoc.hh (12744:d1ff0b42b747) | base_set_assoc.hh (12745:e28c117a9806) |
---|---|
1/* 2 * Copyright (c) 2012-2014,2017 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 --- 108 unchanged lines hidden (view full) --- 117 BaseSetAssoc(const Params *p); 118 119 /** 120 * Destructor 121 */ 122 virtual ~BaseSetAssoc() {}; 123 124 /** | 1/* 2 * Copyright (c) 2012-2014,2017 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 --- 108 unchanged lines hidden (view full) --- 117 BaseSetAssoc(const Params *p); 118 119 /** 120 * Destructor 121 */ 122 virtual ~BaseSetAssoc() {}; 123 124 /** |
125 * This function updates the tags when a block is invalidated but does 126 * not invalidate the block itself. It also updates the replacement data. | 125 * This function updates the tags when a block is invalidated. It also 126 * updates the replacement data. |
127 * 128 * @param blk The block to invalidate. 129 */ 130 void invalidate(CacheBlk *blk) override; 131 132 /** 133 * Access block and update replacement data. May not succeed, in which case 134 * nullptr is returned. This has all the implications of a cache --- 112 unchanged lines hidden (view full) --- 247 * @param pkt Packet holding the address to update 248 * @param blk The block to update. 249 */ 250 void insertBlock(PacketPtr pkt, CacheBlk *blk) override 251 { 252 // Insert block 253 BaseTags::insertBlock(pkt, blk); 254 | 127 * 128 * @param blk The block to invalidate. 129 */ 130 void invalidate(CacheBlk *blk) override; 131 132 /** 133 * Access block and update replacement data. May not succeed, in which case 134 * nullptr is returned. This has all the implications of a cache --- 112 unchanged lines hidden (view full) --- 247 * @param pkt Packet holding the address to update 248 * @param blk The block to update. 249 */ 250 void insertBlock(PacketPtr pkt, CacheBlk *blk) override 251 { 252 // Insert block 253 BaseTags::insertBlock(pkt, blk); 254 |
255 // Increment tag counter 256 tagsInUse++; 257 |
|
255 // Update replacement policy 256 replacementPolicy->reset(blk->replacementData); 257 } 258 259 /** 260 * Limit the allocation for the cache ways. 261 * @param ways The maximum number of ways available for replacement. 262 */ --- 65 unchanged lines hidden --- | 258 // Update replacement policy 259 replacementPolicy->reset(blk->replacementData); 260 } 261 262 /** 263 * Limit the allocation for the cache ways. 264 * @param ways The maximum number of ways available for replacement. 265 */ --- 65 unchanged lines hidden --- |