1/* 2 * Copyright (c) 2010-2011 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 41 unchanged lines hidden (view full) --- 50#include "base/cprintf.hh" 51#include "base/inifile.hh" 52#include "base/misc.hh" 53#include "base/pollevent.hh" 54#include "base/range.hh" 55#include "base/trace.hh" 56#include "base/types.hh" 57#include "config/the_isa.hh" |
58#include "cpu/simple/base.hh" 59#include "cpu/base.hh" |
60#include "cpu/checker/cpu.hh" 61#include "cpu/checker/thread_context.hh" |
62#include "cpu/exetrace.hh" 63#include "cpu/profile.hh" 64#include "cpu/simple_thread.hh" 65#include "cpu/smt.hh" 66#include "cpu/static_inst.hh" 67#include "cpu/thread_context.hh" 68#include "debug/Decode.hh" 69#include "debug/Fetch.hh" --- 6 unchanged lines hidden (view full) --- 76#include "sim/debug.hh" 77#include "sim/faults.hh" 78#include "sim/full_system.hh" 79#include "sim/sim_events.hh" 80#include "sim/sim_object.hh" 81#include "sim/stats.hh" 82#include "sim/system.hh" 83 |
84using namespace std; 85using namespace TheISA; 86 87BaseSimpleCPU::BaseSimpleCPU(BaseSimpleCPUParams *p) 88 : BaseCPU(p), traceData(NULL), thread(NULL), predecoder(NULL) 89{ 90 if (FullSystem) 91 thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb); 92 else 93 thread = new SimpleThread(this, /* thread_num */ 0, p->system, 94 p->workload[0], p->itb, p->dtb); 95 96 thread->setStatus(ThreadContext::Halted); 97 98 tc = thread->getTC(); 99 |
100 if (p->checker) { 101 BaseCPU *temp_checker = p->checker; 102 checker = dynamic_cast<CheckerCPU *>(temp_checker); 103 checker->setSystem(p->system); 104 // Manipulate thread context 105 ThreadContext *cpu_tc = tc; 106 tc = new CheckerThreadContext<ThreadContext>(cpu_tc, this->checker); 107 } else { 108 checker = NULL; 109 } |
110 111 numInst = 0; 112 startNumInst = 0; 113 numOp = 0; 114 startNumOp = 0; 115 numLoad = 0; 116 startNumLoad = 0; 117 lastIcacheStall = 0; --- 437 unchanged lines hidden --- |