Deleted Added
sdiff udiff text old ( 13216:6ae030076b29 ) new ( 13217:725b1701b4ee )
full compact
1/*
2 * Copyright (c) 2012-2014 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

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

79BaseSetAssoc::init(BaseCache* cache)
80{
81 // Set parent cache
82 setCache(cache);
83
84 // Initialize blocks
85 unsigned blkIndex = 0; // index into blks array
86 for (unsigned i = 0; i < numSets; ++i) {
87 sets[i].resize(assoc);
88
89 // link in the data blocks
90 for (unsigned j = 0; j < assoc; ++j) {
91 // Select block within the set to be linked
92 BlkType*& blk = sets[i][j];
93
94 // Locate next cache block
95 blk = &blks[blkIndex];
96
97 // Associate a data chunk to the block
98 blk->data = &dataBlks[blkSize*blkIndex];
99
100 // Associate a replacement data entry to the block

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

121
122 // Decrease the number of tags in use
123 tagsInUse--;
124
125 // Invalidate replacement data
126 replacementPolicy->invalidate(blk->replacementData);
127}
128
129ReplaceableEntry*
130BaseSetAssoc::findBlockBySetAndWay(int set, int way) const
131{
132 return sets[set][way];
133}
134
135BaseSetAssoc *
136BaseSetAssocParams::create()
137{
138 return new BaseSetAssoc(this);
139}