base.cc (8541:27aaee8ec7cc) | base.cc (8733:64a7bf8fa56c) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2010 ARM Limited | 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 36 unchanged lines hidden (view full) --- 47#include "base/cprintf.hh" 48#include "base/inifile.hh" 49#include "base/misc.hh" 50#include "base/pollevent.hh" 51#include "base/range.hh" 52#include "base/trace.hh" 53#include "base/types.hh" 54#include "config/the_isa.hh" | 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 36 unchanged lines hidden (view full) --- 47#include "base/cprintf.hh" 48#include "base/inifile.hh" 49#include "base/misc.hh" 50#include "base/pollevent.hh" 51#include "base/range.hh" 52#include "base/trace.hh" 53#include "base/types.hh" 54#include "config/the_isa.hh" |
55#include "config/use_checker.hh" |
|
55#include "cpu/simple/base.hh" 56#include "cpu/base.hh" 57#include "cpu/exetrace.hh" 58#include "cpu/profile.hh" 59#include "cpu/simple_thread.hh" 60#include "cpu/smt.hh" 61#include "cpu/static_inst.hh" 62#include "cpu/thread_context.hh" --- 14 unchanged lines hidden (view full) --- 77#include "arch/kernel_stats.hh" 78#include "arch/stacktrace.hh" 79#include "arch/tlb.hh" 80#include "arch/vtophys.hh" 81#else // !FULL_SYSTEM 82#include "mem/mem_object.hh" 83#endif // FULL_SYSTEM 84 | 56#include "cpu/simple/base.hh" 57#include "cpu/base.hh" 58#include "cpu/exetrace.hh" 59#include "cpu/profile.hh" 60#include "cpu/simple_thread.hh" 61#include "cpu/smt.hh" 62#include "cpu/static_inst.hh" 63#include "cpu/thread_context.hh" --- 14 unchanged lines hidden (view full) --- 78#include "arch/kernel_stats.hh" 79#include "arch/stacktrace.hh" 80#include "arch/tlb.hh" 81#include "arch/vtophys.hh" 82#else // !FULL_SYSTEM 83#include "mem/mem_object.hh" 84#endif // FULL_SYSTEM 85 |
86#if USE_CHECKER 87#include "cpu/checker/cpu.hh" 88#include "cpu/checker/thread_context.hh" 89#endif 90 |
|
85using namespace std; 86using namespace TheISA; 87 88BaseSimpleCPU::BaseSimpleCPU(BaseSimpleCPUParams *p) 89 : BaseCPU(p), traceData(NULL), thread(NULL), predecoder(NULL) 90{ 91#if FULL_SYSTEM 92 thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb); 93#else 94 thread = new SimpleThread(this, /* thread_num */ 0, p->workload[0], 95 p->itb, p->dtb); 96#endif // !FULL_SYSTEM 97 98 thread->setStatus(ThreadContext::Halted); 99 100 tc = thread->getTC(); 101 | 91using namespace std; 92using namespace TheISA; 93 94BaseSimpleCPU::BaseSimpleCPU(BaseSimpleCPUParams *p) 95 : BaseCPU(p), traceData(NULL), thread(NULL), predecoder(NULL) 96{ 97#if FULL_SYSTEM 98 thread = new SimpleThread(this, 0, p->system, p->itb, p->dtb); 99#else 100 thread = new SimpleThread(this, /* thread_num */ 0, p->workload[0], 101 p->itb, p->dtb); 102#endif // !FULL_SYSTEM 103 104 thread->setStatus(ThreadContext::Halted); 105 106 tc = thread->getTC(); 107 |
108#if USE_CHECKER 109 if (p->checker) { 110 BaseCPU *temp_checker = p->checker; 111 checker = dynamic_cast<CheckerCPU *>(temp_checker); 112#if FULL_SYSTEM 113 checker->setSystem(p->system); 114#endif 115 // Manipulate thread context 116 ThreadContext *cpu_tc = tc; 117 tc = new CheckerThreadContext<ThreadContext>(cpu_tc, this->checker); 118 } else { 119 checker = NULL; 120 } 121#endif 122 |
|
102 numInst = 0; 103 startNumInst = 0; 104 numLoad = 0; 105 startNumLoad = 0; 106 lastIcacheStall = 0; 107 lastDcacheStall = 0; 108 109 threadContexts.push_back(tc); --- 435 unchanged lines hidden --- | 123 numInst = 0; 124 startNumInst = 0; 125 numLoad = 0; 126 startNumLoad = 0; 127 lastIcacheStall = 0; 128 lastDcacheStall = 0; 129 130 threadContexts.push_back(tc); --- 435 unchanged lines hidden --- |