CPU: Get rid of the now unnecessary getInst/setInst family of functions.
[gem5.git] / src / cpu / ozone / OzoneCPU.py
1 # Copyright (c) 2006-2007 The Regents of The University of Michigan
2 # All rights reserved.
3 #
4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are
6 # met: redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer;
8 # redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution;
11 # neither the name of the copyright holders nor the names of its
12 # contributors may be used to endorse or promote products derived from
13 # this software without specific prior written permission.
14 #
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #
27 # Authors: Kevin Lim
28
29 from m5.defines import buildEnv
30 from m5.params import *
31 from BaseCPU import BaseCPU
32
33 if buildEnv['USE_CHECKER']:
34 from OzoneChecker import OzoneChecker
35
36 class DerivOzoneCPU(BaseCPU):
37 type = 'DerivOzoneCPU'
38
39 numThreads = Param.Unsigned("number of HW thread contexts")
40
41 if buildEnv['USE_CHECKER']:
42 checker = Param.BaseCPU("Checker CPU")
43
44 icache_port = Port("Instruction Port")
45 dcache_port = Port("Data Port")
46
47 width = Param.Unsigned("Width")
48 frontEndWidth = Param.Unsigned("Front end width")
49 frontEndLatency = Param.Unsigned("Front end latency")
50 backEndWidth = Param.Unsigned("Back end width")
51 backEndSquashLatency = Param.Unsigned("Back end squash latency")
52 backEndLatency = Param.Unsigned("Back end latency")
53 maxInstBufferSize = Param.Unsigned("Maximum instruction buffer size")
54 maxOutstandingMemOps = Param.Unsigned("Maximum number of outstanding memory operations")
55 decodeToFetchDelay = Param.Unsigned("Decode to fetch delay")
56 renameToFetchDelay = Param.Unsigned("Rename to fetch delay")
57 iewToFetchDelay = Param.Unsigned("Issue/Execute/Writeback to fetch "
58 "delay")
59 commitToFetchDelay = Param.Unsigned("Commit to fetch delay")
60 fetchWidth = Param.Unsigned("Fetch width")
61
62 renameToDecodeDelay = Param.Unsigned("Rename to decode delay")
63 iewToDecodeDelay = Param.Unsigned("Issue/Execute/Writeback to decode "
64 "delay")
65 commitToDecodeDelay = Param.Unsigned("Commit to decode delay")
66 fetchToDecodeDelay = Param.Unsigned("Fetch to decode delay")
67 decodeWidth = Param.Unsigned("Decode width")
68
69 iewToRenameDelay = Param.Unsigned("Issue/Execute/Writeback to rename "
70 "delay")
71 commitToRenameDelay = Param.Unsigned("Commit to rename delay")
72 decodeToRenameDelay = Param.Unsigned("Decode to rename delay")
73 renameWidth = Param.Unsigned("Rename width")
74
75 commitToIEWDelay = Param.Unsigned("Commit to "
76 "Issue/Execute/Writeback delay")
77 renameToIEWDelay = Param.Unsigned("Rename to "
78 "Issue/Execute/Writeback delay")
79 issueToExecuteDelay = Param.Unsigned("Issue to execute delay (internal "
80 "to the IEW stage)")
81 issueWidth = Param.Unsigned("Issue width")
82 executeWidth = Param.Unsigned("Execute width")
83 executeIntWidth = Param.Unsigned("Integer execute width")
84 executeFloatWidth = Param.Unsigned("Floating point execute width")
85 executeBranchWidth = Param.Unsigned("Branch execute width")
86 executeMemoryWidth = Param.Unsigned("Memory execute width")
87
88 iewToCommitDelay = Param.Unsigned("Issue/Execute/Writeback to commit "
89 "delay")
90 renameToROBDelay = Param.Unsigned("Rename to reorder buffer delay")
91 commitWidth = Param.Unsigned("Commit width")
92 squashWidth = Param.Unsigned("Squash width")
93
94 predType = Param.String("Type of branch predictor ('local', 'tournament')")
95 localPredictorSize = Param.Unsigned("Size of local predictor")
96 localCtrBits = Param.Unsigned("Bits per counter")
97 localHistoryTableSize = Param.Unsigned("Size of local history table")
98 localHistoryBits = Param.Unsigned("Bits for the local history")
99 globalPredictorSize = Param.Unsigned("Size of global predictor")
100 globalCtrBits = Param.Unsigned("Bits per counter")
101 globalHistoryBits = Param.Unsigned("Bits of history")
102 choicePredictorSize = Param.Unsigned("Size of choice predictor")
103 choiceCtrBits = Param.Unsigned("Bits of choice counters")
104
105 BTBEntries = Param.Unsigned("Number of BTB entries")
106 BTBTagSize = Param.Unsigned("Size of the BTB tags, in bits")
107
108 RASSize = Param.Unsigned("RAS size")
109
110 LQEntries = Param.Unsigned("Number of load queue entries")
111 SQEntries = Param.Unsigned("Number of store queue entries")
112 lsqLimits = Param.Bool(True, "LSQ size limits dispatch")
113 LFSTSize = Param.Unsigned("Last fetched store table size")
114 SSITSize = Param.Unsigned("Store set ID table size")
115
116 numPhysIntRegs = Param.Unsigned("Number of physical integer registers")
117 numPhysFloatRegs = Param.Unsigned("Number of physical floating point "
118 "registers")
119 numIQEntries = Param.Unsigned("Number of instruction queue entries")
120 numROBEntries = Param.Unsigned("Number of reorder buffer entries")
121
122 instShiftAmt = Param.Unsigned("Number of bits to shift instructions by")
123
124 function_trace = Param.Bool(False, "Enable function trace")
125 function_trace_start = Param.Tick(0, "Cycle to start function trace")