deriv.cc revision 3760
12567SN/A/*
211234Sandreas.sandberg@arm.com * Copyright (c) 2004-2006 The Regents of The University of Michigan
37650SAli.Saidi@ARM.com * All rights reserved.
47650SAli.Saidi@ARM.com *
57650SAli.Saidi@ARM.com * Redistribution and use in source and binary forms, with or without
67650SAli.Saidi@ARM.com * modification, are permitted provided that the following conditions are
77650SAli.Saidi@ARM.com * met: redistributions of source code must retain the above copyright
87650SAli.Saidi@ARM.com * notice, this list of conditions and the following disclaimer;
97650SAli.Saidi@ARM.com * redistributions in binary form must reproduce the above copyright
107650SAli.Saidi@ARM.com * notice, this list of conditions and the following disclaimer in the
117650SAli.Saidi@ARM.com * documentation and/or other materials provided with the distribution;
127650SAli.Saidi@ARM.com * neither the name of the copyright holders nor the names of its
137650SAli.Saidi@ARM.com * contributors may be used to endorse or promote products derived from
142567SN/A * this software without specific prior written permission.
152567SN/A *
162567SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172567SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182567SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192567SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202567SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212567SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222567SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232567SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242567SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252567SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262567SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272567SN/A *
282567SN/A * Authors: Gabe Black
292567SN/A */
302567SN/A
312567SN/A#include <string>
322567SN/A
332567SN/A#include "cpu/base.hh"
342567SN/A#include "cpu/o3/sparc/cpu.hh"
352567SN/A#include "cpu/o3/sparc/impl.hh"
362567SN/A#include "cpu/o3/sparc/params.hh"
372567SN/A#include "cpu/o3/fu_pool.hh"
382567SN/A#include "sim/builder.hh"
392665SN/A
402665SN/Aclass DerivO3CPU : public SparcO3CPU<SparcSimpleImpl>
412567SN/A{
422567SN/A  public:
436757SAli.Saidi@ARM.com    DerivO3CPU(SparcSimpleParams *p)
446757SAli.Saidi@ARM.com        : SparcO3CPU<SparcSimpleImpl>(p)
452567SN/A    { }
4611234Sandreas.sandberg@arm.com};
472567SN/A
482567SN/ABEGIN_DECLARE_SIM_OBJECT_PARAMS(DerivO3CPU)
492567SN/A
508229Snate@binkert.org    Param<int> clock;
516757SAli.Saidi@ARM.com    Param<int> phase;
5210810Sbr@bsdpad.com    Param<int> numThreads;
532567SN/A    Param<int> activity;
542567SN/A
552567SN/A#if FULL_SYSTEM
5610844Sandreas.sandberg@arm.com    SimObjectParam<System *> system;
5710037SARM gem5 Developers    Param<int> cpu_id;
5810037SARM gem5 Developers    SimObjectParam<AlphaISA::ITB *> itb;
596757SAli.Saidi@ARM.com    SimObjectParam<AlphaISA::DTB *> dtb;
602567SN/A    Param<Tick> profile;
618285SPrakash.Ramrakhyani@arm.com
627650SAli.Saidi@ARM.com    Param<bool> do_quiesce;
637650SAli.Saidi@ARM.com    Param<bool> do_checkpoint_insts;
647650SAli.Saidi@ARM.com    Param<bool> do_statistics_insts;
657650SAli.Saidi@ARM.com#else
667650SAli.Saidi@ARM.com    SimObjectVectorParam<Process *> workload;
677650SAli.Saidi@ARM.com#endif // FULL_SYSTEM
6811234Sandreas.sandberg@arm.com
6911234Sandreas.sandberg@arm.com    SimObjectParam<BaseCPU *> checker;
7011234Sandreas.sandberg@arm.com
718286SAli.Saidi@ARM.com    Param<Counter> max_insts_any_thread;
728286SAli.Saidi@ARM.com    Param<Counter> max_insts_all_threads;
738286SAli.Saidi@ARM.com    Param<Counter> max_loads_any_thread;
748286SAli.Saidi@ARM.com    Param<Counter> max_loads_all_threads;
758286SAli.Saidi@ARM.com    Param<Tick> progress_interval;
7610037SARM gem5 Developers
7710037SARM gem5 Developers    Param<unsigned> cachePorts;
7810037SARM gem5 Developers
7910037SARM gem5 Developers    Param<unsigned> decodeToFetchDelay;
8010037SARM gem5 Developers    Param<unsigned> renameToFetchDelay;
8110037SARM gem5 Developers    Param<unsigned> iewToFetchDelay;
8210037SARM gem5 Developers    Param<unsigned> commitToFetchDelay;
8310037SARM gem5 Developers    Param<unsigned> fetchWidth;
8410037SARM gem5 Developers
8510037SARM gem5 Developers    Param<unsigned> renameToDecodeDelay;
8610037SARM gem5 Developers    Param<unsigned> iewToDecodeDelay;
8710037SARM gem5 Developers    Param<unsigned> commitToDecodeDelay;
8810037SARM gem5 Developers    Param<unsigned> fetchToDecodeDelay;
8910037SARM gem5 Developers    Param<unsigned> decodeWidth;
9010037SARM gem5 Developers
9110037SARM gem5 Developers    Param<unsigned> iewToRenameDelay;
9210037SARM gem5 Developers    Param<unsigned> commitToRenameDelay;
9310037SARM gem5 Developers    Param<unsigned> decodeToRenameDelay;
9410037SARM gem5 Developers    Param<unsigned> renameWidth;
9510037SARM gem5 Developers
9610037SARM gem5 Developers    Param<unsigned> commitToIEWDelay;
9710037SARM gem5 Developers    Param<unsigned> renameToIEWDelay;
9810037SARM gem5 Developers    Param<unsigned> issueToExecuteDelay;
9910037SARM gem5 Developers    Param<unsigned> dispatchWidth;
10010037SARM gem5 Developers    Param<unsigned> issueWidth;
10110037SARM gem5 Developers    Param<unsigned> wbWidth;
10210037SARM gem5 Developers    Param<unsigned> wbDepth;
10310037SARM gem5 Developers    SimObjectParam<FUPool *> fuPool;
10410037SARM gem5 Developers
10510037SARM gem5 Developers    Param<unsigned> iewToCommitDelay;
10610037SARM gem5 Developers    Param<unsigned> renameToROBDelay;
10710037SARM gem5 Developers    Param<unsigned> commitWidth;
10810037SARM gem5 Developers    Param<unsigned> squashWidth;
10910037SARM gem5 Developers    Param<Tick> trapLatency;
11010037SARM gem5 Developers
11110037SARM gem5 Developers    Param<unsigned> backComSize;
11210037SARM gem5 Developers    Param<unsigned> forwardComSize;
11310037SARM gem5 Developers
11410037SARM gem5 Developers    Param<std::string> predType;
11510037SARM gem5 Developers    Param<unsigned> localPredictorSize;
11610037SARM gem5 Developers    Param<unsigned> localCtrBits;
11710037SARM gem5 Developers    Param<unsigned> localHistoryTableSize;
11810037SARM gem5 Developers    Param<unsigned> localHistoryBits;
11911234Sandreas.sandberg@arm.com    Param<unsigned> globalPredictorSize;
12011234Sandreas.sandberg@arm.com    Param<unsigned> globalCtrBits;
12111234Sandreas.sandberg@arm.com    Param<unsigned> globalHistoryBits;
12211234Sandreas.sandberg@arm.com    Param<unsigned> choicePredictorSize;
12311234Sandreas.sandberg@arm.com    Param<unsigned> choiceCtrBits;
12411234Sandreas.sandberg@arm.com
12511234Sandreas.sandberg@arm.com    Param<unsigned> BTBEntries;
12611234Sandreas.sandberg@arm.com    Param<unsigned> BTBTagSize;
12711234Sandreas.sandberg@arm.com
12811234Sandreas.sandberg@arm.com    Param<unsigned> RASSize;
1292567SN/A
1306757SAli.Saidi@ARM.com    Param<unsigned> LQEntries;
1318286SAli.Saidi@ARM.com    Param<unsigned> SQEntries;
1328286SAli.Saidi@ARM.com    Param<unsigned> LFSTSize;
1338286SAli.Saidi@ARM.com    Param<unsigned> SSITSize;
1348286SAli.Saidi@ARM.com
1358286SAli.Saidi@ARM.com    Param<unsigned> numPhysIntRegs;
1368286SAli.Saidi@ARM.com    Param<unsigned> numPhysFloatRegs;
1376757SAli.Saidi@ARM.com    Param<unsigned> numIQEntries;
1386757SAli.Saidi@ARM.com    Param<unsigned> numROBEntries;
1398286SAli.Saidi@ARM.com
1408706Sandreas.hansson@arm.com    Param<unsigned> smtNumFetchingThreads;
1418706Sandreas.hansson@arm.com    Param<std::string>   smtFetchPolicy;
1428706Sandreas.hansson@arm.com    Param<std::string>   smtLSQPolicy;
1438706Sandreas.hansson@arm.com    Param<unsigned> smtLSQThreshold;
1448286SAli.Saidi@ARM.com    Param<std::string>   smtIQPolicy;
1453553SN/A    Param<unsigned> smtIQThreshold;
1463553SN/A    Param<std::string>   smtROBPolicy;
1477693SAli.Saidi@ARM.com    Param<unsigned> smtROBThreshold;
1487693SAli.Saidi@ARM.com    Param<std::string>   smtCommitPolicy;
1497693SAli.Saidi@ARM.com
1507720Sgblack@eecs.umich.edu    Param<unsigned> instShiftAmt;
1513553SN/A
1523553SN/A    Param<bool> defer_registration;
1539050Schander.sudanthi@arm.com
1549050Schander.sudanthi@arm.com    Param<bool> function_trace;
1559050Schander.sudanthi@arm.com    Param<Tick> function_trace_start;
15610037SARM gem5 Developers
15710037SARM gem5 DevelopersEND_DECLARE_SIM_OBJECT_PARAMS(DerivO3CPU)
15810037SARM gem5 Developers
15910037SARM gem5 DevelopersBEGIN_INIT_SIM_OBJECT_PARAMS(DerivO3CPU)
16010037SARM gem5 Developers
16110037SARM gem5 Developers    INIT_PARAM(clock, "clock speed"),
16210037SARM gem5 Developers    INIT_PARAM_DFLT(phase, "clock phase", 0),
16310037SARM gem5 Developers    INIT_PARAM(numThreads, "number of HW thread contexts"),
16410037SARM gem5 Developers    INIT_PARAM_DFLT(activity, "Initial activity count", 0),
16510037SARM gem5 Developers
16610037SARM gem5 Developers#if FULL_SYSTEM
16710037SARM gem5 Developers    INIT_PARAM(system, "System object"),
16810037SARM gem5 Developers    INIT_PARAM(cpu_id, "processor ID"),
16910037SARM gem5 Developers    INIT_PARAM(itb, "Instruction translation buffer"),
17010037SARM gem5 Developers    INIT_PARAM(dtb, "Data translation buffer"),
17110037SARM gem5 Developers    INIT_PARAM(profile, ""),
17210037SARM gem5 Developers
17310037SARM gem5 Developers    INIT_PARAM(do_quiesce, ""),
17410037SARM gem5 Developers    INIT_PARAM(do_checkpoint_insts, ""),
17510844Sandreas.sandberg@arm.com    INIT_PARAM(do_statistics_insts, ""),
17610844Sandreas.sandberg@arm.com#else
17710037SARM gem5 Developers    INIT_PARAM(workload, "Processes to run"),
17810037SARM gem5 Developers#endif // FULL_SYSTEM
17910037SARM gem5 Developers
18010037SARM gem5 Developers    INIT_PARAM_DFLT(checker, "Checker CPU", NULL),
18110037SARM gem5 Developers
18210037SARM gem5 Developers    INIT_PARAM_DFLT(max_insts_any_thread,
18310037SARM gem5 Developers                    "Terminate when any thread reaches this inst count",
18410037SARM gem5 Developers                    0),
18510037SARM gem5 Developers    INIT_PARAM_DFLT(max_insts_all_threads,
18610037SARM gem5 Developers                    "Terminate when all threads have reached"
18710037SARM gem5 Developers                    "this inst count",
18810037SARM gem5 Developers                    0),
18910037SARM gem5 Developers    INIT_PARAM_DFLT(max_loads_any_thread,
19010037SARM gem5 Developers                    "Terminate when any thread reaches this load count",
19110037SARM gem5 Developers                    0),
19210037SARM gem5 Developers    INIT_PARAM_DFLT(max_loads_all_threads,
19310037SARM gem5 Developers                    "Terminate when all threads have reached this load"
19410037SARM gem5 Developers                    "count",
19510037SARM gem5 Developers                    0),
19610037SARM gem5 Developers    INIT_PARAM_DFLT(progress_interval, "Progress interval", 0),
19710037SARM gem5 Developers
19810037SARM gem5 Developers    INIT_PARAM_DFLT(cachePorts, "Cache Ports", 200),
19910037SARM gem5 Developers
20010037SARM gem5 Developers    INIT_PARAM(decodeToFetchDelay, "Decode to fetch delay"),
20110037SARM gem5 Developers    INIT_PARAM(renameToFetchDelay, "Rename to fetch delay"),
20210037SARM gem5 Developers    INIT_PARAM(iewToFetchDelay, "Issue/Execute/Writeback to fetch"
20310037SARM gem5 Developers               "delay"),
20410037SARM gem5 Developers    INIT_PARAM(commitToFetchDelay, "Commit to fetch delay"),
20510037SARM gem5 Developers    INIT_PARAM(fetchWidth, "Fetch width"),
20610037SARM gem5 Developers    INIT_PARAM(renameToDecodeDelay, "Rename to decode delay"),
20710037SARM gem5 Developers    INIT_PARAM(iewToDecodeDelay, "Issue/Execute/Writeback to decode"
20810037SARM gem5 Developers               "delay"),
20910037SARM gem5 Developers    INIT_PARAM(commitToDecodeDelay, "Commit to decode delay"),
21010037SARM gem5 Developers    INIT_PARAM(fetchToDecodeDelay, "Fetch to decode delay"),
21110037SARM gem5 Developers    INIT_PARAM(decodeWidth, "Decode width"),
21210037SARM gem5 Developers
21310037SARM gem5 Developers    INIT_PARAM(iewToRenameDelay, "Issue/Execute/Writeback to rename"
21410037SARM gem5 Developers               "delay"),
21510037SARM gem5 Developers    INIT_PARAM(commitToRenameDelay, "Commit to rename delay"),
21610037SARM gem5 Developers    INIT_PARAM(decodeToRenameDelay, "Decode to rename delay"),
21710037SARM gem5 Developers    INIT_PARAM(renameWidth, "Rename width"),
21810037SARM gem5 Developers
21910037SARM gem5 Developers    INIT_PARAM(commitToIEWDelay, "Commit to "
22010037SARM gem5 Developers               "Issue/Execute/Writeback delay"),
22110037SARM gem5 Developers    INIT_PARAM(renameToIEWDelay, "Rename to "
22210037SARM gem5 Developers               "Issue/Execute/Writeback delay"),
22310037SARM gem5 Developers    INIT_PARAM(issueToExecuteDelay, "Issue to execute delay (internal"
22410037SARM gem5 Developers               "to the IEW stage)"),
22510037SARM gem5 Developers    INIT_PARAM(dispatchWidth, "Dispatch width"),
22610037SARM gem5 Developers    INIT_PARAM(issueWidth, "Issue width"),
22710037SARM gem5 Developers    INIT_PARAM(wbWidth, "Writeback width"),
22810037SARM gem5 Developers    INIT_PARAM(wbDepth, "Writeback depth (number of cycles it can buffer)"),
22910037SARM gem5 Developers    INIT_PARAM_DFLT(fuPool, "Functional unit pool", NULL),
23010037SARM gem5 Developers
23110037SARM gem5 Developers    INIT_PARAM(iewToCommitDelay, "Issue/Execute/Writeback to commit "
23210037SARM gem5 Developers               "delay"),
23310037SARM gem5 Developers    INIT_PARAM(renameToROBDelay, "Rename to reorder buffer delay"),
23410037SARM gem5 Developers    INIT_PARAM(commitWidth, "Commit width"),
23510037SARM gem5 Developers    INIT_PARAM(squashWidth, "Squash width"),
23610037SARM gem5 Developers    INIT_PARAM_DFLT(trapLatency, "Number of cycles before the trap is handled", 6),
23710037SARM gem5 Developers
23810037SARM gem5 Developers    INIT_PARAM(backComSize, "Time buffer size for backwards communication"),
23910037SARM gem5 Developers    INIT_PARAM(forwardComSize, "Time buffer size for forward communication"),
24010037SARM gem5 Developers
24110037SARM gem5 Developers    INIT_PARAM(predType, "Type of branch predictor ('local', 'tournament')"),
24210037SARM gem5 Developers    INIT_PARAM(localPredictorSize, "Size of local predictor"),
24310037SARM gem5 Developers    INIT_PARAM(localCtrBits, "Bits per counter"),
24410037SARM gem5 Developers    INIT_PARAM(localHistoryTableSize, "Size of local history table"),
24510037SARM gem5 Developers    INIT_PARAM(localHistoryBits, "Bits for the local history"),
24610037SARM gem5 Developers    INIT_PARAM(globalPredictorSize, "Size of global predictor"),
24710037SARM gem5 Developers    INIT_PARAM(globalCtrBits, "Bits per counter"),
24810037SARM gem5 Developers    INIT_PARAM(globalHistoryBits, "Bits of history"),
24910037SARM gem5 Developers    INIT_PARAM(choicePredictorSize, "Size of choice predictor"),
25010037SARM gem5 Developers    INIT_PARAM(choiceCtrBits, "Bits of choice counters"),
25110037SARM gem5 Developers
25210037SARM gem5 Developers    INIT_PARAM(BTBEntries, "Number of BTB entries"),
25310037SARM gem5 Developers    INIT_PARAM(BTBTagSize, "Size of the BTB tags, in bits"),
25410037SARM gem5 Developers
25510037SARM gem5 Developers    INIT_PARAM(RASSize, "RAS size"),
25610037SARM gem5 Developers
25710037SARM gem5 Developers    INIT_PARAM(LQEntries, "Number of load queue entries"),
25810037SARM gem5 Developers    INIT_PARAM(SQEntries, "Number of store queue entries"),
25910037SARM gem5 Developers    INIT_PARAM(LFSTSize, "Last fetched store table size"),
26010037SARM gem5 Developers    INIT_PARAM(SSITSize, "Store set ID table size"),
26110037SARM gem5 Developers
26210037SARM gem5 Developers    INIT_PARAM(numPhysIntRegs, "Number of physical integer registers"),
26310810Sbr@bsdpad.com    INIT_PARAM(numPhysFloatRegs, "Number of physical floating point "
26410037SARM gem5 Developers               "registers"),
26510810Sbr@bsdpad.com    INIT_PARAM(numIQEntries, "Number of instruction queue entries"),
26610810Sbr@bsdpad.com    INIT_PARAM(numROBEntries, "Number of reorder buffer entries"),
26710810Sbr@bsdpad.com
26810810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtNumFetchingThreads, "SMT Number of Fetching Threads", 1),
26910810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtFetchPolicy, "SMT Fetch Policy", "SingleThread"),
27010810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtLSQPolicy,   "SMT LSQ Sharing Policy",    "Partitioned"),
27110810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtLSQThreshold,"SMT LSQ Threshold", 100),
27210810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtIQPolicy,    "SMT IQ Policy",    "Partitioned"),
27310810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtIQThreshold, "SMT IQ Threshold", 100),
27410810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtROBPolicy,   "SMT ROB Sharing Policy", "Partitioned"),
27510810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtROBThreshold,"SMT ROB Threshold", 100),
27610810Sbr@bsdpad.com    INIT_PARAM_DFLT(smtCommitPolicy,"SMT Commit Fetch Policy", "RoundRobin"),
27710810Sbr@bsdpad.com
27810810Sbr@bsdpad.com    INIT_PARAM(instShiftAmt, "Number of bits to shift instructions by"),
27910810Sbr@bsdpad.com    INIT_PARAM(defer_registration, "defer system registration (for sampling)"),
28010810Sbr@bsdpad.com
28110810Sbr@bsdpad.com    INIT_PARAM(function_trace, "Enable function trace"),
2822567SN/A    INIT_PARAM(function_trace_start, "Cycle to start function trace")
2832567SN/A
2842567SN/AEND_INIT_SIM_OBJECT_PARAMS(DerivO3CPU)
285
286CREATE_SIM_OBJECT(DerivO3CPU)
287{
288    DerivO3CPU *cpu;
289
290#if FULL_SYSTEM
291    // Full-system only supports a single thread for the moment.
292    int actual_num_threads = 1;
293#else
294    // In non-full-system mode, we infer the number of threads from
295    // the workload if it's not explicitly specified.
296    int actual_num_threads =
297        (numThreads.isValid() && numThreads >= workload.size()) ?
298         numThreads : workload.size();
299
300    if (workload.size() == 0) {
301        fatal("Must specify at least one workload!");
302    }
303#endif
304
305    SparcSimpleParams *params = new SparcSimpleParams;
306
307    params->clock = clock;
308
309    params->name = getInstanceName();
310    params->numberOfThreads = actual_num_threads;
311    params->activity = activity;
312
313#if FULL_SYSTEM
314    params->system = system;
315    params->cpu_id = cpu_id;
316    params->itb = itb;
317    params->dtb = dtb;
318    params->profile = profile;
319
320    params->do_quiesce = do_quiesce;
321    params->do_checkpoint_insts = do_checkpoint_insts;
322    params->do_statistics_insts = do_statistics_insts;
323#else
324    params->workload = workload;
325#endif // FULL_SYSTEM
326
327    params->checker = checker;
328
329    params->max_insts_any_thread = max_insts_any_thread;
330    params->max_insts_all_threads = max_insts_all_threads;
331    params->max_loads_any_thread = max_loads_any_thread;
332    params->max_loads_all_threads = max_loads_all_threads;
333    params->progress_interval = progress_interval;
334
335    //
336    // Caches
337    //
338    params->cachePorts = cachePorts;
339
340    params->decodeToFetchDelay = decodeToFetchDelay;
341    params->renameToFetchDelay = renameToFetchDelay;
342    params->iewToFetchDelay = iewToFetchDelay;
343    params->commitToFetchDelay = commitToFetchDelay;
344    params->fetchWidth = fetchWidth;
345
346    params->renameToDecodeDelay = renameToDecodeDelay;
347    params->iewToDecodeDelay = iewToDecodeDelay;
348    params->commitToDecodeDelay = commitToDecodeDelay;
349    params->fetchToDecodeDelay = fetchToDecodeDelay;
350    params->decodeWidth = decodeWidth;
351
352    params->iewToRenameDelay = iewToRenameDelay;
353    params->commitToRenameDelay = commitToRenameDelay;
354    params->decodeToRenameDelay = decodeToRenameDelay;
355    params->renameWidth = renameWidth;
356
357    params->commitToIEWDelay = commitToIEWDelay;
358    params->renameToIEWDelay = renameToIEWDelay;
359    params->issueToExecuteDelay = issueToExecuteDelay;
360    params->dispatchWidth = dispatchWidth;
361    params->issueWidth = issueWidth;
362    params->wbWidth = wbWidth;
363    params->wbDepth = wbDepth;
364    params->fuPool = fuPool;
365
366    params->iewToCommitDelay = iewToCommitDelay;
367    params->renameToROBDelay = renameToROBDelay;
368    params->commitWidth = commitWidth;
369    params->squashWidth = squashWidth;
370    params->trapLatency = trapLatency;
371
372    params->backComSize = backComSize;
373    params->forwardComSize = forwardComSize;
374
375    params->predType = predType;
376    params->localPredictorSize = localPredictorSize;
377    params->localCtrBits = localCtrBits;
378    params->localHistoryTableSize = localHistoryTableSize;
379    params->localHistoryBits = localHistoryBits;
380    params->globalPredictorSize = globalPredictorSize;
381    params->globalCtrBits = globalCtrBits;
382    params->globalHistoryBits = globalHistoryBits;
383    params->choicePredictorSize = choicePredictorSize;
384    params->choiceCtrBits = choiceCtrBits;
385
386    params->BTBEntries = BTBEntries;
387    params->BTBTagSize = BTBTagSize;
388
389    params->RASSize = RASSize;
390
391    params->LQEntries = LQEntries;
392    params->SQEntries = SQEntries;
393
394    params->SSITSize = SSITSize;
395    params->LFSTSize = LFSTSize;
396
397    params->numPhysIntRegs = numPhysIntRegs;
398    params->numPhysFloatRegs = numPhysFloatRegs;
399    params->numIQEntries = numIQEntries;
400    params->numROBEntries = numROBEntries;
401
402    params->smtNumFetchingThreads = smtNumFetchingThreads;
403
404    // Default smtFetchPolicy to "RoundRobin", if necessary.
405    std::string round_robin_policy = "RoundRobin";
406    std::string single_thread = "SingleThread";
407
408    if (actual_num_threads > 1 && single_thread.compare(smtFetchPolicy) == 0)
409        params->smtFetchPolicy = round_robin_policy;
410    else
411        params->smtFetchPolicy = smtFetchPolicy;
412
413    params->smtIQPolicy    = smtIQPolicy;
414    params->smtLSQPolicy    = smtLSQPolicy;
415    params->smtLSQThreshold = smtLSQThreshold;
416    params->smtROBPolicy   = smtROBPolicy;
417    params->smtROBThreshold = smtROBThreshold;
418    params->smtCommitPolicy = smtCommitPolicy;
419
420    params->instShiftAmt = 2;
421
422    params->deferRegistration = defer_registration;
423
424    params->functionTrace = function_trace;
425    params->functionTraceStart = function_trace_start;
426
427    cpu = new DerivO3CPU(params);
428
429    return cpu;
430}
431
432REGISTER_SIM_OBJECT("DerivO3CPU", DerivO3CPU)
433
434