base_set_assoc.hh (12566:d6d48df9bf0f) base_set_assoc.hh (12574:22936e2eb2da)
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

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

296 * @return The set index of the address.
297 */
298 int extractSet(Addr addr) const override
299 {
300 return ((addr >> setShift) & setMask);
301 }
302
303 /**
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

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

296 * @return The set index of the address.
297 */
298 int extractSet(Addr addr) const override
299 {
300 return ((addr >> setShift) & setMask);
301 }
302
303 /**
304 * Regenerate the block address from the tag.
305 * @param tag The tag of the block.
306 * @param set The set of the block.
307 * @return The block address.
304 * Regenerate the block address from the tag and set.
305 *
306 * @param block The block.
307 * @return the block address.
308 */
308 */
309 Addr regenerateBlkAddr(Addr tag, unsigned set) const override
309 Addr regenerateBlkAddr(const CacheBlk* blk) const override
310 {
310 {
311 return ((tag << tagShift) | ((Addr)set << setShift));
311 return ((blk->tag << tagShift) | ((Addr)blk->set << setShift));
312 }
313
314 /**
315 * Called at end of simulation to complete average block reference stats.
316 */
317 void cleanupRefs() override;
318
319 /**

--- 30 unchanged lines hidden ---
312 }
313
314 /**
315 * Called at end of simulation to complete average block reference stats.
316 */
317 void cleanupRefs() override;
318
319 /**

--- 30 unchanged lines hidden ---