54 periphClockRateControl->set_mul_div(sys_counter_frq, 1);
62 panic_if(!gem5CpuCluster,
"Cluster should be of type CortexA76Cluster");
69 this->rvbaraddr[core]->set_state(0,
addr);
77 top_reset(
p.
name +
".top_reset", 0),
78 dbg_reset(
p.
name +
".dbg_reset", 0),
79 model_reset(
p.
name +
".model_reset"),
114 Base::cnthpirq[
i].bind(
cnthpirq[
i]->signal_in);
115 Base::cnthvirq[
i].bind(
cnthvirq[
i]->signal_in);
116 Base::cntpsirq[
i].bind(
cntpsirq[
i]->signal_in);
117 Base::cntvirq[
i].bind(
cntvirq[
i]->signal_in);
118 Base::commirq[
i].bind(
commirq[
i]->signal_in);
120 Base::pmuirq[
i].bind(
pmuirq[
i]->signal_in);
135template <
class Types>
139 Base::before_end_of_elaboration();
141 auto set_on_change = [
this](
144 auto *pin = gen->get(gem5CpuCluster->getCore(num)->getContext(0));
145 auto handler = [pin](
bool status)
147 status ? pin->raise() : pin->clear();
152 for (
int i = 0;
i < CoreCount;
i++) {
153 set_on_change(*cnthpirq[
i], gem5CpuCluster->params().cnthpirq,
i);
154 set_on_change(*cnthvirq[
i], gem5CpuCluster->params().cnthvirq,
i);
155 set_on_change(*cntpsirq[
i], gem5CpuCluster->params().cntpsirq,
i);
156 set_on_change(*cntvirq[
i], gem5CpuCluster->params().cntvirq,
i);
157 set_on_change(*commirq[
i], gem5CpuCluster->params().commirq,
i);
158 set_on_change(*ctidbgirq[
i], gem5CpuCluster->params().ctidbgirq,
i);
159 set_on_change(*pmuirq[
i], gem5CpuCluster->params().pmuirq,
i);
160 set_on_change(*vcpumntirq[
i], gem5CpuCluster->params().vcpumntirq,
i);
161 set_on_change(*cntpnsirq[
i], gem5CpuCluster->params().cntpnsirq,
i);
165template <
class Types>
169 if (if_name ==
"redistributor")
170 return *redist.at(idx);
171 else if (if_name ==
"core_reset")
172 return *core_reset.at(idx);
173 else if (if_name ==
"poweron_reset")
174 return *poweron_reset.at(idx);
175 else if (if_name ==
"amba")
177 else if (if_name ==
"top_reset")
179 else if (if_name ==
"dbg_reset")
181 else if (if_name ==
"model_reset")
184 return Base::gem5_getPort(if_name, idx);
Base class for ARM GIC implementations.
This SimObject is instantiated in the python world and serves as an ArmInterruptPin generator.
Ports are used to interface objects to each other.
void onChange(OnChangeFunc func)
Abstract superclass for simulation objects.
std::vector< std::unique_ptr< SignalReceiver > > cntvirq
sc_gem5::TlmTargetBaseWrapper< 64, svp_gicv3_comms::gicv3_comms_fw_if, svp_gicv3_comms::gicv3_comms_bw_if, 1, sc_core::SC_ONE_OR_MORE_BOUND > TlmGicTarget
typename Types::Base Base
amba_pv::signal_master_port< T > SignalInitiator
std::vector< std::unique_ptr< SignalReceiver > > cntpnsirq
std::vector< std::unique_ptr< SignalReceiver > > pmuirq
void setResetAddr(int core, Addr addr, bool secure) override
std::vector< std::unique_ptr< SignalInitiator< uint64_t > > > rvbaraddr
static const int CoreCount
SignalSinkPort< bool > model_reset
void setCluster(SimObject *cluster) override
std::vector< std::unique_ptr< TlmGicTarget > > redist
std::vector< std::unique_ptr< SignalSender > > poweron_reset
std::vector< std::unique_ptr< SignalReceiver > > cnthpirq
std::vector< std::unique_ptr< SignalReceiver > > ctidbgirq
std::vector< std::unique_ptr< SignalSender > > core_reset
std::vector< std::unique_ptr< SignalReceiver > > cnthvirq
void before_end_of_elaboration() override
typename Types::Params Params
ClockRateControlInitiatorSocket clockRateControl
ClockRateControlInitiatorSocket periphClockRateControl
ScxEvsCortexA76(const Params &p)
void setClkPeriod(Tick clk_period) override
std::vector< std::unique_ptr< SignalReceiver > > cntpsirq
std::vector< std::unique_ptr< SignalReceiver > > vcpumntirq
std::vector< std::unique_ptr< SignalReceiver > > commirq
Port & gem5_getPort(const std::string &if_name, int idx) override
void setSysCounterFrq(uint64_t sys_counter_frq) override
void onChange(OnChangeFunc func)
amba_pv::signal_master_port< bool > signal_out
virtual void bind(base_target_socket_type &s)
#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)
const std::string & name()