1 from m5
.params
import *
3 from m5
import build_env
4 from BaseCPU
import BaseCPU
5 from Checker
import O3Checker
7 class DerivO3CPU(BaseCPU
):
9 activity
= Param
.Unsigned(0, "Initial count")
10 numThreads
= Param
.Unsigned(1, "number of HW thread contexts")
12 if build_env
['USE_CHECKER']:
13 if not build_env
['FULL_SYSTEM']:
14 checker
= Param
.BaseCPU(O3Checker(workload
=Parent
.workload
,
16 warnOnlyOnLoadError
=False),
19 checker
= Param
.BaseCPU(O3Checker(exitOnError
=True, warnOnlyOnLoadError
=False), "checker")
20 checker
.itb
= Parent
.itb
21 checker
.dtb
= Parent
.dtb
23 cachePorts
= Param
.Unsigned("Cache Ports")
24 icache_port
= Port("Instruction Port")
25 dcache_port
= Port("Data Port")
26 _mem_ports
= ['icache_port', 'dcache_port']
28 decodeToFetchDelay
= Param
.Unsigned(1, "Decode to fetch delay")
29 renameToFetchDelay
= Param
.Unsigned(1 ,"Rename to fetch delay")
30 iewToFetchDelay
= Param
.Unsigned(1, "Issue/Execute/Writeback to fetch "
32 commitToFetchDelay
= Param
.Unsigned(1, "Commit to fetch delay")
33 fetchWidth
= Param
.Unsigned(8, "Fetch width")
35 renameToDecodeDelay
= Param
.Unsigned(1, "Rename to decode delay")
36 iewToDecodeDelay
= Param
.Unsigned(1, "Issue/Execute/Writeback to decode "
38 commitToDecodeDelay
= Param
.Unsigned(1, "Commit to decode delay")
39 fetchToDecodeDelay
= Param
.Unsigned(1, "Fetch to decode delay")
40 decodeWidth
= Param
.Unsigned(8, "Decode width")
42 iewToRenameDelay
= Param
.Unsigned(1, "Issue/Execute/Writeback to rename "
44 commitToRenameDelay
= Param
.Unsigned(1, "Commit to rename delay")
45 decodeToRenameDelay
= Param
.Unsigned(1, "Decode to rename delay")
46 renameWidth
= Param
.Unsigned(8, "Rename width")
48 commitToIEWDelay
= Param
.Unsigned(1, "Commit to "
49 "Issue/Execute/Writeback delay")
50 renameToIEWDelay
= Param
.Unsigned(2, "Rename to "
51 "Issue/Execute/Writeback delay")
52 issueToExecuteDelay
= Param
.Unsigned(1, "Issue to execute delay (internal "
54 dispatchWidth
= Param
.Unsigned(8, "Dispatch width")
55 issueWidth
= Param
.Unsigned(8, "Issue width")
56 wbWidth
= Param
.Unsigned(8, "Writeback width")
57 wbDepth
= Param
.Unsigned(1, "Writeback depth")
58 fuPool
= Param
.FUPool("Functional Unit pool")
60 iewToCommitDelay
= Param
.Unsigned(1, "Issue/Execute/Writeback to commit "
62 renameToROBDelay
= Param
.Unsigned(1, "Rename to reorder buffer delay")
63 commitWidth
= Param
.Unsigned(8, "Commit width")
64 squashWidth
= Param
.Unsigned(8, "Squash width")
65 trapLatency
= Param
.Tick(13, "Trap latency")
66 fetchTrapLatency
= Param
.Tick(1, "Fetch trap latency")
68 backComSize
= Param
.Unsigned(5, "Time buffer size for backwards communication")
69 forwardComSize
= Param
.Unsigned(5, "Time buffer size for forward communication")
71 predType
= Param
.String("tournament", "Branch predictor type ('local', 'tournament')")
72 localPredictorSize
= Param
.Unsigned(2048, "Size of local predictor")
73 localCtrBits
= Param
.Unsigned(2, "Bits per counter")
74 localHistoryTableSize
= Param
.Unsigned(2048, "Size of local history table")
75 localHistoryBits
= Param
.Unsigned(11, "Bits for the local history")
76 globalPredictorSize
= Param
.Unsigned(8192, "Size of global predictor")
77 globalCtrBits
= Param
.Unsigned(2, "Bits per counter")
78 globalHistoryBits
= Param
.Unsigned(4096, "Bits of history")
79 choicePredictorSize
= Param
.Unsigned(8192, "Size of choice predictor")
80 choiceCtrBits
= Param
.Unsigned(2, "Bits of choice counters")
82 BTBEntries
= Param
.Unsigned(4096, "Number of BTB entries")
83 BTBTagSize
= Param
.Unsigned(16, "Size of the BTB tags, in bits")
85 RASSize
= Param
.Unsigned(16, "RAS size")
87 LQEntries
= Param
.Unsigned(32, "Number of load queue entries")
88 SQEntries
= Param
.Unsigned(32, "Number of store queue entries")
89 LFSTSize
= Param
.Unsigned(1024, "Last fetched store table size")
90 SSITSize
= Param
.Unsigned(1024, "Store set ID table size")
92 numRobs
= Param
.Unsigned(1, "Number of Reorder Buffers");
94 numPhysIntRegs
= Param
.Unsigned(256, "Number of physical integer registers")
95 numPhysFloatRegs
= Param
.Unsigned(256, "Number of physical floating point "
97 numIQEntries
= Param
.Unsigned(64, "Number of instruction queue entries")
98 numROBEntries
= Param
.Unsigned(192, "Number of reorder buffer entries")
100 instShiftAmt
= Param
.Unsigned(2, "Number of bits to shift instructions by")
102 function_trace
= Param
.Bool(False, "Enable function trace")
103 function_trace_start
= Param
.Tick(0, "Cycle to start function trace")
105 smtNumFetchingThreads
= Param
.Unsigned("SMT Number of Fetching Threads")
106 smtFetchPolicy
= Param
.String("SMT Fetch policy")
107 smtLSQPolicy
= Param
.String("SMT LSQ Sharing Policy")
108 smtLSQThreshold
= Param
.String("SMT LSQ Threshold Sharing Parameter")
109 smtIQPolicy
= Param
.String("SMT IQ Sharing Policy")
110 smtIQThreshold
= Param
.String("SMT IQ Threshold Sharing Parameter")
111 smtROBPolicy
= Param
.String("SMT ROB Sharing Policy")
112 smtROBThreshold
= Param
.String("SMT ROB Threshold Sharing Parameter")
113 smtCommitPolicy
= Param
.String("SMT Commit Policy")