53 panic(
"Not implemented for R52.");
109 core_pin->poweron_reset.signal_out.set_state(0, new_val);
111 top_reset.signal_out.set_state(0, new_val);
113 dbg_reset.signal_out.set_state(0, new_val);
124 top_reset.signal_out.bind(Base::top_reset);
125 dbg_reset.signal_out.bind(Base::dbg_reset);
131template <
class Types>
135 if (if_name ==
"llpp") {
136 return this->
corePins.at(idx)->llpp;
137 }
else if (if_name ==
"flash") {
138 return this->corePins.at(idx)->flash;
139 }
else if (if_name ==
"amba") {
140 return this->corePins.at(idx)->amba;
141 }
else if (if_name ==
"core_reset") {
142 return this->corePins.at(idx)->core_reset;
143 }
else if (if_name ==
"poweron_reset") {
144 return this->corePins.at(idx)->poweron_reset;
145 }
else if (if_name ==
"halt") {
146 return this->corePins.at(idx)->halt;
147 }
else if (if_name ==
"ext_slave") {
148 return this->ext_slave;
149 }
else if (if_name ==
"top_reset") {
150 return this->top_reset;
151 }
else if (if_name ==
"dbg_reset") {
152 return this->dbg_reset;
153 }
else if (if_name ==
"model_reset") {
154 return this->model_reset;
155 }
else if (if_name ==
"spi") {
156 return *this->spis.at(idx);
157 }
else if (if_name.substr(0, 3) ==
"ppi") {
160 cpu = std::stoi(if_name.substr(4));
161 }
catch (
const std::invalid_argument &
a) {
162 panic(
"Couldn't find CPU number in %s.", if_name);
164 return *this->corePins.at(cpu)->ppis.at(idx);
165 }
else if (if_name.substr(0, 10) ==
"standbywfi") {
168 cpu = std::stoi(if_name.substr(11));
169 }
catch (
const std::invalid_argument &
a) {
170 panic(
"Couldn't find CPU number in %s.", if_name);
172 return this->corePins.at(cpu)->standbywfi.getSignalOut(idx);
174 return Base::gem5_getPort(if_name, idx);
Ports are used to interface objects to each other.
Abstract superclass for simulation objects.
IntSinkPin< ScxEvsCortexR52 > ClstrInt
static const int SpiCount
void setSysCounterFrq(uint64_t sys_counter_frq) override
static const int PpiCount
SignalSinkPort< bool > model_reset
std::vector< std::unique_ptr< ClstrInt > > spis
CortexR52Cluster * gem5CpuCluster
typename Types::Base Base
Port & gem5_getPort(const std::string &if_name, int idx) override
void setCluster(SimObject *cluster) override
void setClkPeriod(Tick clk_period) override
std::vector< std::unique_ptr< CorePins > > corePins
SignalInterruptInitiatorSocket signalInterrupt
typename Types::Params Params
ScxEvsCortexR52< Types > Evs
void setResetAddr(int core, Addr addr, bool secure) override
static const int CoreCount
ScxEvsCortexR52(const Params &p)
ClockRateControlInitiatorSocket clockRateControl
#define panic(...)
This implements a cprintf based panic() function.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Copyright (c) 2024 Arm Limited All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
std::string csprintf(const char *format, const Args &...args)
IntSinkPin< CorePins > CoreInt
std::vector< std::unique_ptr< CoreInt > > ppis
SignalSender poweron_reset
SignalInitiator< uint64_t > cfgvectable
CorePins(Evs *_evs, int _cpu)
SignalReceiverInt standbywfi
const std::string & name()