base_set_assoc.cc (10373:342348537a53) base_set_assoc.cc (10693:c0979b2ebda5)
1/*
2 * Copyright (c) 2012-2013 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

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

63 fatal("Block size must be at least 4 and a power of 2");
64 }
65 if (numSets <= 0 || !isPowerOf2(numSets)) {
66 fatal("# of sets must be non-zero and a power of 2");
67 }
68 if (assoc <= 0) {
69 fatal("associativity must be greater than zero");
70 }
1/*
2 * Copyright (c) 2012-2013 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

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

63 fatal("Block size must be at least 4 and a power of 2");
64 }
65 if (numSets <= 0 || !isPowerOf2(numSets)) {
66 fatal("# of sets must be non-zero and a power of 2");
67 }
68 if (assoc <= 0) {
69 fatal("associativity must be greater than zero");
70 }
71 if (hitLatency <= 0) {
72 fatal("access latency must be greater than zero");
73 }
74
75 blkMask = blkSize - 1;
76 setShift = floorLog2(blkSize);
77 setMask = numSets - 1;
78 tagShift = setShift + floorLog2(numSets);
79 /** @todo Make warmup percentage a parameter. */
80 warmupBound = numSets * assoc;
81

--- 121 unchanged lines hidden ---
71
72 blkMask = blkSize - 1;
73 setShift = floorLog2(blkSize);
74 setMask = numSets - 1;
75 tagShift = setShift + floorLog2(numSets);
76 /** @todo Make warmup percentage a parameter. */
77 warmupBound = numSets * assoc;
78

--- 121 unchanged lines hidden ---