Started to add support for O3 for sparc.
[gem5.git] / src / cpu / o3 / params.hh
1 /*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
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;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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 * Authors: Kevin Lim
29 */
30
31 #ifndef __CPU_O3_PARAMS_HH__
32 #define __CPU_O3_PARAMS_HH__
33
34 #include "cpu/o3/cpu.hh"
35
36 //Forward declarations
37 class FUPool;
38
39 /**
40 * This file defines the parameters that will be used for the O3CPU.
41 * This must be defined externally so that the Impl can have a params class
42 * defined that it can pass to all of the individual stages.
43 */
44 class O3Params : public BaseO3CPU::Params
45 {
46 public:
47 unsigned activity;
48
49 //
50 // Pointers to key objects
51 //
52 #if !FULL_SYSTEM
53 std::vector<Process *> workload;
54 Process *process;
55 #endif // FULL_SYSTEM
56
57 MemObject *mem;
58
59 BaseCPU *checker;
60
61 //
62 // Caches
63 //
64 // MemInterface *icacheInterface;
65 // MemInterface *dcacheInterface;
66
67 unsigned cachePorts;
68
69 //
70 // Fetch
71 //
72 unsigned decodeToFetchDelay;
73 unsigned renameToFetchDelay;
74 unsigned iewToFetchDelay;
75 unsigned commitToFetchDelay;
76 unsigned fetchWidth;
77
78 //
79 // Decode
80 //
81 unsigned renameToDecodeDelay;
82 unsigned iewToDecodeDelay;
83 unsigned commitToDecodeDelay;
84 unsigned fetchToDecodeDelay;
85 unsigned decodeWidth;
86
87 //
88 // Rename
89 //
90 unsigned iewToRenameDelay;
91 unsigned commitToRenameDelay;
92 unsigned decodeToRenameDelay;
93 unsigned renameWidth;
94
95 //
96 // IEW
97 //
98 unsigned commitToIEWDelay;
99 unsigned renameToIEWDelay;
100 unsigned issueToExecuteDelay;
101 unsigned dispatchWidth;
102 unsigned issueWidth;
103 unsigned wbWidth;
104 unsigned wbDepth;
105 FUPool *fuPool;
106
107 //
108 // Commit
109 //
110 unsigned iewToCommitDelay;
111 unsigned renameToROBDelay;
112 unsigned commitWidth;
113 unsigned squashWidth;
114 Tick trapLatency;
115 Tick fetchTrapLatency;
116
117 //
118 // Timebuffer sizes
119 //
120 unsigned backComSize;
121 unsigned forwardComSize;
122
123 //
124 // Branch predictor (BP, BTB, RAS)
125 //
126 std::string predType;
127 unsigned localPredictorSize;
128 unsigned localCtrBits;
129 unsigned localHistoryTableSize;
130 unsigned localHistoryBits;
131 unsigned globalPredictorSize;
132 unsigned globalCtrBits;
133 unsigned globalHistoryBits;
134 unsigned choicePredictorSize;
135 unsigned choiceCtrBits;
136
137 unsigned BTBEntries;
138 unsigned BTBTagSize;
139
140 unsigned RASSize;
141
142 //
143 // Load store queue
144 //
145 unsigned LQEntries;
146 unsigned SQEntries;
147
148 //
149 // Memory dependence
150 //
151 unsigned SSITSize;
152 unsigned LFSTSize;
153
154 //
155 // Miscellaneous
156 //
157 unsigned numPhysIntRegs;
158 unsigned numPhysFloatRegs;
159 unsigned numIQEntries;
160 unsigned numROBEntries;
161
162 //SMT Parameters
163 unsigned smtNumFetchingThreads;
164
165 std::string smtFetchPolicy;
166
167 std::string smtIQPolicy;
168 unsigned smtIQThreshold;
169
170 std::string smtLSQPolicy;
171 unsigned smtLSQThreshold;
172
173 std::string smtCommitPolicy;
174
175 std::string smtROBPolicy;
176 unsigned smtROBThreshold;
177
178 // Probably can get this from somewhere.
179 unsigned instShiftAmt;
180 };
181
182 #endif // __CPU_O3_ALPHA_PARAMS_HH__