30 #ifndef __ARCH_ARM_FASTMODEL_IRIS_CPU_HH__ 31 #define __ARCH_ARM_FASTMODEL_IRIS_CPU_HH__ 34 #include "iris/detail/IrisInterface.h" 35 #include "params/IrisBaseCPU.hh" 69 panic(
"%s not implemented.", __FUNCTION__);
75 panic(
"%s not implemented.", __FUNCTION__);
94 return ::BaseCPU::getSendFunctional();
109 if (!clockEvent || !periodAttribute) {
110 warn(
"Unable to notify EVS of clock change, missing:");
111 warn_if(!clockEvent,
" Clock change event");
112 warn_if(!periodAttribute,
" Clock period attribute");
120 void init()
override;
133 CPU(IrisBaseCPUParams *
params, iris::IrisConnectionInterface *iris_if) :
136 const std::string parent_path =
evs->
name();
137 System *sys = params->system;
140 for (
const std::string &sub_path: params->thread_paths) {
141 std::string
path = parent_path +
"." + sub_path;
142 auto *tc =
new TC(
this, thread_id++, sys,
143 params->dtb, params->itb,iris_if, path);
151 #endif // __ARCH_ARM_FASTMODEL_IRIS_CPU_HH__ #define panic(...)
This implements a cprintf based panic() function.
Ports are used to interface objects to each other.
Counter totalOps() const override
void wakeup(ThreadID tid) override
static std::stack< std::string > path
static const std::string PeriodAttributeName
const char * name() const
sc_core::sc_attribute< PortProxy::SendFunctionalFunc > * sendFunctional
PortProxy::SendFunctionalFunc getSendFunctional() override
Returns a sendFunctional delegate for use with port proxies.
std::vector< ThreadContext * > threadContexts
sc_core::sc_attribute< Tick > * periodAttribute
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
Port & getInstPort() override
Purely virtual method that returns a reference to the instruction port.
Port & getDataPort() override
Purely virtual method that returns a reference to the data port.
CPU(IrisBaseCPUParams *params, iris::IrisConnectionInterface *iris_if)
int64_t Counter
Statistics counter type.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
int16_t ThreadID
Thread index/ID type.
static const std::string ClockEventName
std::function< void(PacketPtr pkt)> SendFunctionalFunc
void serializeThread(CheckpointOut &cp, ThreadID tid) const override
Serialize a single thread.
static const std::string Gem5CpuClusterAttributeName
std::ostream CheckpointOut
static const std::string SendFunctionalAttributeName
sc_core::sc_event * clockEvent
BaseCPU(BaseCPUParams *params, sc_core::sc_module *_evs)
Counter totalInsts() const override
const Params * params() const
void clockPeriodUpdated() override
A hook subclasses can implement so they can do any extra work that's needed when the clock rate is ch...