sector_tags.cc (13418:08101e89101e) | sector_tags.cc (13419:aaadcfae091a) |
---|---|
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; --- 50 unchanged lines hidden (view full) --- 59 // Check parameters 60 fatal_if(blkSize < 4 || !isPowerOf2(blkSize), 61 "Block size must be at least 4 and a power of 2"); 62 fatal_if(!isPowerOf2(numBlocksPerSector), 63 "# of blocks per sector must be non-zero and a power of 2"); 64} 65 66void | 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; --- 50 unchanged lines hidden (view full) --- 59 // Check parameters 60 fatal_if(blkSize < 4 || !isPowerOf2(blkSize), 61 "Block size must be at least 4 and a power of 2"); 62 fatal_if(!isPowerOf2(numBlocksPerSector), 63 "# of blocks per sector must be non-zero and a power of 2"); 64} 65 66void |
67SectorTags::tagsInit(BaseCache* cache) | 67SectorTags::tagsInit() |
68{ | 68{ |
69 // Set parent cache 70 setCache(cache); 71 | |
72 // Initialize all blocks 73 unsigned blk_index = 0; // index into blks array 74 for (unsigned sec_blk_index = 0; sec_blk_index < numSectors; 75 sec_blk_index++) 76 { 77 // Locate next cache sector 78 SectorBlk* sec_blk = &secBlks[sec_blk_index]; 79 --- 235 unchanged lines hidden --- | 69 // Initialize all blocks 70 unsigned blk_index = 0; // index into blks array 71 for (unsigned sec_blk_index = 0; sec_blk_index < numSectors; 72 sec_blk_index++) 73 { 74 // Locate next cache sector 75 SectorBlk* sec_blk = &secBlks[sec_blk_index]; 76 --- 235 unchanged lines hidden --- |