Move SimObject python files alongside the C++ and fix
[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.params import *
30 from m5 import build_env
31 from BaseCPU import BaseCPU
32
33 if build_env['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 build_env['USE_CHECKER']:
42 checker = Param.BaseCPU("Checker CPU")
43 if build_env['FULL_SYSTEM']:
44 profile = Param.Latency('0ns', "trace the kernel stack")
45
46 icache_port = Port("Instruction Port")
47 dcache_port = Port("Data Port")
48
49 width = Param.Unsigned("Width")
50 frontEndWidth = Param.Unsigned("Front end width")
51 frontEndLatency = Param.Unsigned("Front end latency")
52 backEndWidth = Param.Unsigned("Back end width")
53 backEndSquashLatency = Param.Unsigned("Back end squash latency")
54 backEndLatency = Param.Unsigned("Back end latency")
55 maxInstBufferSize = Param.Unsigned("Maximum instruction buffer size")
56 maxOutstandingMemOps = Param.Unsigned("Maximum number of outstanding memory operations")
57 decodeToFetchDelay = Param.Unsigned("Decode to fetch delay")
58 renameToFetchDelay = Param.Unsigned("Rename to fetch delay")
59 iewToFetchDelay = Param.Unsigned("Issue/Execute/Writeback to fetch "
60 "delay")
61 commitToFetchDelay = Param.Unsigned("Commit to fetch delay")
62 fetchWidth = Param.Unsigned("Fetch width")
63
64 renameToDecodeDelay = Param.Unsigned("Rename to decode delay")
65 iewToDecodeDelay = Param.Unsigned("Issue/Execute/Writeback to decode "
66 "delay")
67 commitToDecodeDelay = Param.Unsigned("Commit to decode delay")
68 fetchToDecodeDelay = Param.Unsigned("Fetch to decode delay")
69 decodeWidth = Param.Unsigned("Decode width")
70
71 iewToRenameDelay = Param.Unsigned("Issue/Execute/Writeback to rename "
72 "delay")
73 commitToRenameDelay = Param.Unsigned("Commit to rename delay")
74 decodeToRenameDelay = Param.Unsigned("Decode to rename delay")
75 renameWidth = Param.Unsigned("Rename width")
76
77 commitToIEWDelay = Param.Unsigned("Commit to "
78 "Issue/Execute/Writeback delay")
79 renameToIEWDelay = Param.Unsigned("Rename to "
80 "Issue/Execute/Writeback delay")
81 issueToExecuteDelay = Param.Unsigned("Issue to execute delay (internal "
82 "to the IEW stage)")
83 issueWidth = Param.Unsigned("Issue width")
84 executeWidth = Param.Unsigned("Execute width")
85 executeIntWidth = Param.Unsigned("Integer execute width")
86 executeFloatWidth = Param.Unsigned("Floating point execute width")
87 executeBranchWidth = Param.Unsigned("Branch execute width")
88 executeMemoryWidth = Param.Unsigned("Memory execute width")
89
90 iewToCommitDelay = Param.Unsigned("Issue/Execute/Writeback to commit "
91 "delay")
92 renameToROBDelay = Param.Unsigned("Rename to reorder buffer delay")
93 commitWidth = Param.Unsigned("Commit width")
94 squashWidth = Param.Unsigned("Squash width")
95
96 predType = Param.String("Type of branch predictor ('local', 'tournament')")
97 localPredictorSize = Param.Unsigned("Size of local predictor")
98 localCtrBits = Param.Unsigned("Bits per counter")
99 localHistoryTableSize = Param.Unsigned("Size of local history table")
100 localHistoryBits = Param.Unsigned("Bits for the local history")
101 globalPredictorSize = Param.Unsigned("Size of global predictor")
102 globalCtrBits = Param.Unsigned("Bits per counter")
103 globalHistoryBits = Param.Unsigned("Bits of history")
104 choicePredictorSize = Param.Unsigned("Size of choice predictor")
105 choiceCtrBits = Param.Unsigned("Bits of choice counters")
106
107 BTBEntries = Param.Unsigned("Number of BTB entries")
108 BTBTagSize = Param.Unsigned("Size of the BTB tags, in bits")
109
110 RASSize = Param.Unsigned("RAS size")
111
112 LQEntries = Param.Unsigned("Number of load queue entries")
113 SQEntries = Param.Unsigned("Number of store queue entries")
114 lsqLimits = Param.Bool(True, "LSQ size limits dispatch")
115 LFSTSize = Param.Unsigned("Last fetched store table size")
116 SSITSize = Param.Unsigned("Store set ID table size")
117
118 numPhysIntRegs = Param.Unsigned("Number of physical integer registers")
119 numPhysFloatRegs = Param.Unsigned("Number of physical floating point "
120 "registers")
121 numIQEntries = Param.Unsigned("Number of instruction queue entries")
122 numROBEntries = Param.Unsigned("Number of reorder buffer entries")
123
124 instShiftAmt = Param.Unsigned("Number of bits to shift instructions by")
125
126 function_trace = Param.Bool(False, "Enable function trace")
127 function_trace_start = Param.Tick(0, "Cycle to start function trace")