53 panic(
"Not implemented for R52.");
61 panic_if(!gem5CpuCluster,
"Cluster should be of type CortexR52Cluster");
68 this->corePins[core]->cfgvectable.set_state(0,
addr);
75 llpp(evs->llpp[cpu],
name +
".llpp", -1),
76 flash(evs->flash[cpu],
name +
".flash", -1),
77 amba(evs->amba[cpu],
name +
".amba", -1),
78 core_reset(
name +
".core_reset", 0),
79 poweron_reset(
name +
".poweron_reset", 0),
80 halt(
name +
".halt", 0),
81 standbywfi(
name +
".standbywfi"),
82 cfgvectable((
name +
"cfgvectable").c_str())
90 halt.signal_out.bind(
evs->halt[
cpu]);
109 core_pin->poweron_reset.signal_out.set_state(0, new_val);
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.
void onChange(OnChangeFunc func)
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
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
void setResetAddr(int core, Addr addr, bool secure) override
static const int CoreCount
ScxEvsCortexR52(const Params &p)
ClockRateControlInitiatorSocket clockRateControl
amba_pv::signal_slave_export< bool > signal_in
amba_pv::signal_master_port< bool > signal_out
virtual void bind(base_target_socket_type &s)
#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 - Pranith Kumar Copyright (c) 2020 Inria 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()