Merge ktlim@zamp:/z/ktlim2/clean/m5-o3
[gem5.git] / src / cpu / ozone / simple_params.hh
1 /*
2 * Copyright (c) 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
29 #ifndef __CPU_OZONE_SIMPLE_PARAMS_HH__
30 #define __CPU_OZONE_SIMPLE_PARAMS_HH__
31
32 #include "cpu/ozone/cpu.hh"
33
34 //Forward declarations
35 class AlphaDTB;
36 class AlphaITB;
37 class FUPool;
38 class FunctionalMemory;
39 class MemInterface;
40 class PageTable;
41 class Process;
42 class System;
43
44 /**
45 * This file defines the parameters that will be used for the OzoneCPU.
46 * This must be defined externally so that the Impl can have a params class
47 * defined that it can pass to all of the individual stages.
48 */
49
50 class SimpleParams : public BaseCPU::Params
51 {
52 public:
53
54 #if FULL_SYSTEM
55 AlphaITB *itb; AlphaDTB *dtb;
56 #else
57 std::vector<Process *> workload;
58 #endif // FULL_SYSTEM
59
60 //Page Table
61 PageTable *pTable;
62
63 FunctionalMemory *mem;
64
65 //
66 // Caches
67 //
68 MemInterface *icacheInterface;
69 MemInterface *dcacheInterface;
70
71 unsigned cachePorts;
72 unsigned width;
73 unsigned frontEndWidth;
74 unsigned backEndWidth;
75 unsigned backEndSquashLatency;
76 unsigned backEndLatency;
77 unsigned maxInstBufferSize;
78 unsigned numPhysicalRegs;
79 unsigned maxOutstandingMemOps;
80 //
81 // Fetch
82 //
83 unsigned decodeToFetchDelay;
84 unsigned renameToFetchDelay;
85 unsigned iewToFetchDelay;
86 unsigned commitToFetchDelay;
87 unsigned fetchWidth;
88
89 //
90 // Decode
91 //
92 unsigned renameToDecodeDelay;
93 unsigned iewToDecodeDelay;
94 unsigned commitToDecodeDelay;
95 unsigned fetchToDecodeDelay;
96 unsigned decodeWidth;
97
98 //
99 // Rename
100 //
101 unsigned iewToRenameDelay;
102 unsigned commitToRenameDelay;
103 unsigned decodeToRenameDelay;
104 unsigned renameWidth;
105
106 //
107 // IEW
108 //
109 unsigned commitToIEWDelay;
110 unsigned renameToIEWDelay;
111 unsigned issueToExecuteDelay;
112 unsigned issueWidth;
113 unsigned executeWidth;
114 unsigned executeIntWidth;
115 unsigned executeFloatWidth;
116 unsigned executeBranchWidth;
117 unsigned executeMemoryWidth;
118 FUPool *fuPool;
119
120 //
121 // Commit
122 //
123 unsigned iewToCommitDelay;
124 unsigned renameToROBDelay;
125 unsigned commitWidth;
126 unsigned squashWidth;
127
128 //
129 // Branch predictor (BP & BTB)
130 //
131 std::string predType;
132 unsigned localPredictorSize;
133 unsigned localCtrBits;
134 unsigned localHistoryTableSize;
135 unsigned localHistoryBits;
136 unsigned globalPredictorSize;
137 unsigned globalCtrBits;
138 unsigned globalHistoryBits;
139 unsigned choicePredictorSize;
140 unsigned choiceCtrBits;
141
142 unsigned BTBEntries;
143 unsigned BTBTagSize;
144
145 unsigned RASSize;
146
147 //
148 // Load store queue
149 //
150 unsigned LQEntries;
151 unsigned SQEntries;
152
153 //
154 // Memory dependence
155 //
156 unsigned SSITSize;
157 unsigned LFSTSize;
158
159 //
160 // Miscellaneous
161 //
162 unsigned numPhysIntRegs;
163 unsigned numPhysFloatRegs;
164 unsigned numIQEntries;
165 unsigned numROBEntries;
166
167 bool decoupledFrontEnd;
168 int dispatchWidth;
169 int wbWidth;
170
171 //SMT Parameters
172 unsigned smtNumFetchingThreads;
173
174 std::string smtFetchPolicy;
175
176 std::string smtIQPolicy;
177 unsigned smtIQThreshold;
178
179 std::string smtLSQPolicy;
180 unsigned smtLSQThreshold;
181
182 std::string smtCommitPolicy;
183
184 std::string smtROBPolicy;
185 unsigned smtROBThreshold;
186
187 // Probably can get this from somewhere.
188 unsigned instShiftAmt;
189 };
190
191 #endif // __CPU_OZONE_SIMPLE_PARAMS_HH__