Deleted Added
sdiff udiff text old ( 9944:4ff1c5c6dcbc ) new ( 9954:72a72649a156 )
full compact
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
53using namespace std;
54
55template <class Impl>
56ROB<Impl>::ROB(O3CPU *_cpu, unsigned _numEntries, unsigned _squashWidth,
57 std::string _smtROBPolicy, unsigned _smtROBThreshold,
58 ThreadID _numThreads)
59 : cpu(_cpu),
60 numEntries(_numEntries),
61 squashWidth(_squashWidth),
62 numInstsInROB(0),
63 numThreads(_numThreads)
64{
65 std::string policy = _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
96 int threshold = _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 ---