rob_impl.hh (9944:4ff1c5c6dcbc) | rob_impl.hh (9954:72a72649a156) |
---|---|
1/* 2 * Copyright (c) 2012 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 --- 35 unchanged lines hidden (view full) --- 44#ifndef __CPU_O3_ROB_IMPL_HH__ 45#define __CPU_O3_ROB_IMPL_HH__ 46 47#include <list> 48 49#include "cpu/o3/rob.hh" 50#include "debug/Fetch.hh" 51#include "debug/ROB.hh" | 1/* 2 * Copyright (c) 2012 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 --- 35 unchanged lines hidden (view full) --- 44#ifndef __CPU_O3_ROB_IMPL_HH__ 45#define __CPU_O3_ROB_IMPL_HH__ 46 47#include <list> 48 49#include "cpu/o3/rob.hh" 50#include "debug/Fetch.hh" 51#include "debug/ROB.hh" |
52#include "params/DerivO3CPU.hh" |
|
52 53using namespace std; 54 55template <class Impl> | 53 54using namespace std; 55 56template <class Impl> |
56ROB<Impl>::ROB(O3CPU *_cpu, unsigned _numEntries, unsigned _squashWidth, 57 std::string _smtROBPolicy, unsigned _smtROBThreshold, 58 ThreadID _numThreads) | 57ROB<Impl>::ROB(O3CPU *_cpu, DerivO3CPUParams *params) |
59 : cpu(_cpu), | 58 : cpu(_cpu), |
60 numEntries(_numEntries), 61 squashWidth(_squashWidth), | 59 numEntries(params->numROBEntries), 60 squashWidth(params->squashWidth), |
62 numInstsInROB(0), | 61 numInstsInROB(0), |
63 numThreads(_numThreads) | 62 numThreads(params->numThreads) |
64{ | 63{ |
65 std::string policy = _smtROBPolicy; | 64 std::string policy = params->smtROBPolicy; |
66 67 //Convert string to lowercase 68 std::transform(policy.begin(), policy.end(), policy.begin(), 69 (int(*)(int)) tolower); 70 71 //Figure out rob policy 72 if (policy == "dynamic") { 73 robPolicy = Dynamic; --- 14 unchanged lines hidden (view full) --- 88 for (ThreadID tid = 0; tid < numThreads; tid++) { 89 maxEntries[tid] = part_amt; 90 } 91 92 } else if (policy == "threshold") { 93 robPolicy = Threshold; 94 DPRINTF(Fetch, "ROB sharing policy set to Threshold\n"); 95 | 65 66 //Convert string to lowercase 67 std::transform(policy.begin(), policy.end(), policy.begin(), 68 (int(*)(int)) tolower); 69 70 //Figure out rob policy 71 if (policy == "dynamic") { 72 robPolicy = Dynamic; --- 14 unchanged lines hidden (view full) --- 87 for (ThreadID tid = 0; tid < numThreads; tid++) { 88 maxEntries[tid] = part_amt; 89 } 90 91 } else if (policy == "threshold") { 92 robPolicy = Threshold; 93 DPRINTF(Fetch, "ROB sharing policy set to Threshold\n"); 94 |
96 int threshold = _smtROBThreshold;; | 95 int threshold = params->smtROBThreshold;; |
97 98 //Divide up by threshold amount 99 for (ThreadID tid = 0; tid < numThreads; tid++) { 100 maxEntries[tid] = threshold; 101 } 102 } else { 103 assert(0 && "Invalid ROB Sharing Policy.Options Are:{Dynamic," 104 "Partitioned, Threshold}"); --- 463 unchanged lines hidden --- | 96 97 //Divide up by threshold amount 98 for (ThreadID tid = 0; tid < numThreads; tid++) { 99 maxEntries[tid] = threshold; 100 } 101 } else { 102 assert(0 && "Invalid ROB Sharing Policy.Options Are:{Dynamic," 103 "Partitioned, Threshold}"); --- 463 unchanged lines hidden --- |