AbstractReplacementPolicy.cc (11321:02e930db812d) | AbstractReplacementPolicy.cc (11800:54436a1784dc) |
---|---|
1/* 2 * Copyright (c) 2013 Advanced Micro Devices, Inc 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; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Author: Derek Hower 29 */ 30 31#include "mem/ruby/structures/AbstractReplacementPolicy.hh" 32 | 1/* 2 * Copyright (c) 2013 Advanced Micro Devices, Inc 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; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Author: Derek Hower 29 */ 30 31#include "mem/ruby/structures/AbstractReplacementPolicy.hh" 32 |
33#include "base/misc.hh" 34 |
|
33AbstractReplacementPolicy::AbstractReplacementPolicy(const Params * p) 34 : SimObject(p) 35{ 36 m_num_sets = p->size/p->block_size/p->assoc; 37 m_assoc = p->assoc; 38 m_last_ref_ptr = new Tick*[m_num_sets]; 39 for (unsigned i = 0; i < m_num_sets; i++){ 40 m_last_ref_ptr[i] = new Tick[m_assoc]; --- 32 unchanged lines hidden --- | 35AbstractReplacementPolicy::AbstractReplacementPolicy(const Params * p) 36 : SimObject(p) 37{ 38 m_num_sets = p->size/p->block_size/p->assoc; 39 m_assoc = p->assoc; 40 m_last_ref_ptr = new Tick*[m_num_sets]; 41 for (unsigned i = 0; i < m_num_sets; i++){ 42 m_last_ref_ptr[i] = new Tick[m_assoc]; --- 32 unchanged lines hidden --- |