1 # Copyright (c) 2006-2007 The Regents of The University of Michigan
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.
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.
29 from m5
.defines
import buildEnv
30 from m5
.params
import *
31 from BaseCPU
import BaseCPU
32 from OzoneChecker
import OzoneChecker
34 class DerivOzoneCPU(BaseCPU
):
35 type = 'DerivOzoneCPU'
37 numThreads
= Param
.Unsigned("number of HW thread contexts")
39 width
= Param
.Unsigned("Width")
40 frontEndWidth
= Param
.Unsigned("Front end width")
41 frontEndLatency
= Param
.Unsigned("Front end latency")
42 backEndWidth
= Param
.Unsigned("Back end width")
43 backEndSquashLatency
= Param
.Unsigned("Back end squash latency")
44 backEndLatency
= Param
.Unsigned("Back end latency")
45 maxInstBufferSize
= Param
.Unsigned("Maximum instruction buffer size")
46 maxOutstandingMemOps
= Param
.Unsigned("Maximum number of outstanding memory operations")
47 decodeToFetchDelay
= Param
.Unsigned("Decode to fetch delay")
48 renameToFetchDelay
= Param
.Unsigned("Rename to fetch delay")
49 iewToFetchDelay
= Param
.Unsigned("Issue/Execute/Writeback to fetch "
51 commitToFetchDelay
= Param
.Unsigned("Commit to fetch delay")
52 fetchWidth
= Param
.Unsigned("Fetch width")
54 renameToDecodeDelay
= Param
.Unsigned("Rename to decode delay")
55 iewToDecodeDelay
= Param
.Unsigned("Issue/Execute/Writeback to decode "
57 commitToDecodeDelay
= Param
.Unsigned("Commit to decode delay")
58 fetchToDecodeDelay
= Param
.Unsigned("Fetch to decode delay")
59 decodeWidth
= Param
.Unsigned("Decode width")
61 iewToRenameDelay
= Param
.Unsigned("Issue/Execute/Writeback to rename "
63 commitToRenameDelay
= Param
.Unsigned("Commit to rename delay")
64 decodeToRenameDelay
= Param
.Unsigned("Decode to rename delay")
65 renameWidth
= Param
.Unsigned("Rename width")
67 commitToIEWDelay
= Param
.Unsigned("Commit to "
68 "Issue/Execute/Writeback delay")
69 renameToIEWDelay
= Param
.Unsigned("Rename to "
70 "Issue/Execute/Writeback delay")
71 issueToExecuteDelay
= Param
.Unsigned("Issue to execute delay (internal "
73 issueWidth
= Param
.Unsigned("Issue width")
74 executeWidth
= Param
.Unsigned("Execute width")
75 executeIntWidth
= Param
.Unsigned("Integer execute width")
76 executeFloatWidth
= Param
.Unsigned("Floating point execute width")
77 executeBranchWidth
= Param
.Unsigned("Branch execute width")
78 executeMemoryWidth
= Param
.Unsigned("Memory execute width")
80 iewToCommitDelay
= Param
.Unsigned("Issue/Execute/Writeback to commit "
82 renameToROBDelay
= Param
.Unsigned("Rename to reorder buffer delay")
83 commitWidth
= Param
.Unsigned("Commit width")
84 squashWidth
= Param
.Unsigned("Squash width")
86 predType
= Param
.String("Type of branch predictor ('local', 'tournament')")
87 localPredictorSize
= Param
.Unsigned("Size of local predictor")
88 localCtrBits
= Param
.Unsigned("Bits per counter")
89 localHistoryTableSize
= Param
.Unsigned("Size of local history table")
90 localHistoryBits
= Param
.Unsigned("Bits for the local history")
91 globalPredictorSize
= Param
.Unsigned("Size of global predictor")
92 globalCtrBits
= Param
.Unsigned("Bits per counter")
93 globalHistoryBits
= Param
.Unsigned("Bits of history")
94 choicePredictorSize
= Param
.Unsigned("Size of choice predictor")
95 choiceCtrBits
= Param
.Unsigned("Bits of choice counters")
97 BTBEntries
= Param
.Unsigned("Number of BTB entries")
98 BTBTagSize
= Param
.Unsigned("Size of the BTB tags, in bits")
100 RASSize
= Param
.Unsigned("RAS size")
102 LQEntries
= Param
.Unsigned("Number of load queue entries")
103 SQEntries
= Param
.Unsigned("Number of store queue entries")
104 lsqLimits
= Param
.Bool(True, "LSQ size limits dispatch")
105 LFSTSize
= Param
.Unsigned("Last fetched store table size")
106 SSITSize
= Param
.Unsigned("Store set ID table size")
108 numPhysIntRegs
= Param
.Unsigned("Number of physical integer registers")
109 numPhysFloatRegs
= Param
.Unsigned("Number of physical floating point "
111 numIQEntries
= Param
.Unsigned("Number of instruction queue entries")
112 numROBEntries
= Param
.Unsigned("Number of reorder buffer entries")
114 instShiftAmt
= Param
.Unsigned("Number of bits to shift instructions by")
116 function_trace
= Param
.Bool(False, "Enable function trace")
117 function_trace_start
= Param
.Tick(0, "Cycle to start function trace")
119 # If the CheckerCPU is brought back to useability in the OzoneCPU, create a
120 # function here called addCheckerCpu() to create a non-NULL Checker and
121 # connect its TLBs (if needed)