1/* 2 * Copyright (c) 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 --- 49 unchanged lines hidden (view full) --- 58#include "sim/full_system.hh" 59#include "sim/insttracer.hh" 60 61class BaseCPUParams; 62class BranchPred; 63class CheckerCPU; 64class ThreadContext; 65class System; |
66 67namespace TheISA 68{ 69 class Predecoder; 70} 71 72class CPUProgressEvent : public Event 73{ --- 67 unchanged lines hidden (view full) --- 141 142 void recvFunctional(PacketPtr pkt); 143 144 void recvRangeChange(); 145 146 }; 147 148 public: |
149 150 /** 151 * Purely virtual method that returns a reference to the data 152 * port. All subclasses must implement this method. 153 * 154 * @return a reference to the data port 155 */ 156 virtual CpuPort &getDataPort() = 0; 157 158 /** 159 * Purely virtual method that returns a reference to the instruction 160 * port. All subclasses must implement this method. 161 * 162 * @return a reference to the instruction port 163 */ 164 virtual CpuPort &getInstPort() = 0; 165 |
166 /** Reads this CPU's ID. */ 167 int cpuId() { return _cpuId; } 168 169 /** Reads this CPU's unique data requestor ID */ 170 MasterID dataMasterId() { return _dataMasterId; } 171 /** Reads this CPU's unique instruction requestor ID */ 172 MasterID instMasterId() { return _instMasterId; } 173 |
174 /** 175 * Get a port on this MemObject. This method is virtual to allow 176 * the subclasses of the BaseCPU to override it. All CPUs have a 177 * data and instruction port, but the Atomic CPU (in its current 178 * form) adds a port directly connected to the memory and has to 179 * override getPort. 180 * 181 * This method uses getDataPort and getInstPort to resolve the two 182 * ports. 183 * 184 * @param if_name the port name 185 * @param idx ignored index 186 * 187 * @return a pointer to the port with the given name 188 */ 189 virtual Port *getPort(const std::string &if_name, int idx = -1); 190 |
191// Tick currentTick; 192 inline Tick frequency() const { return SimClock::Frequency / clock; } 193 inline Tick ticks(int numCycles) const { return clock * numCycles; } 194 inline Tick curCycle() const { return curTick() / clock; } 195 inline Tick tickToCycles(Tick val) const { return val / clock; } 196 inline void workItemBegin() { numWorkItemsStarted++; } 197 inline void workItemEnd() { numWorkItemsCompleted++; } 198 // @todo remove me after debugging with legion done --- 223 unchanged lines hidden --- |