{
for (auto *tc : threadContexts)
tc->setMiscRegNoEffect(ArmISA::MISCREG_CNTFRQ_EL0, params().cntfrq);
+
+ evs_base_cpu->setSysCounterFrq(cluster->params().cntfrq);
}
void
clockRateControl->set_mul_div(SimClock::Int::s, clk_period);
}
+template <class Types>
+void
+ScxEvsCortexA76<Types>::setSysCounterFrq(uint64_t sys_counter_frq)
+{
+ periphClockRateControl->set_mul_div(sys_counter_frq, 1);
+}
+
template <class Types>
void
ScxEvsCortexA76<Types>::setCluster(SimObject *cluster)
}
clockRateControl.bind(this->clock_rate_s);
+ periphClockRateControl.bind(this->periph_clock_rate_s);
}
template <class Types>
SC_HAS_PROCESS(ScxEvsCortexA76);
ClockRateControlInitiatorSocket clockRateControl;
+ ClockRateControlInitiatorSocket periphClockRateControl;
typedef sc_gem5::TlmTargetBaseWrapper<
64, svp_gicv3_comms::gicv3_comms_fw_if,
void setClkPeriod(Tick clk_period) override;
+ void setSysCounterFrq(uint64_t sys_counter_frq) override;
+
void setCluster(SimObject *cluster) override;
};
// Clocks.
clock1Hz : MasterClock();
clockDiv : ClockDivider();
- clockDivPeriph : ClockDivider(mul=0x01800000);
+ clockDivPeriph : ClockDivider();
}
connection
clockDiv.rate.set64(mul, div);
}
}
+ slave port<ExportedClockRateControl> periph_clock_rate_s
+ {
+ behavior set_mul_div(uint64_t mul, uint64_t div)
+ {
+ clockDivPeriph.rate.set64(mul, div);
+ }
+ }
slave port<GICv3Comms> redistributor[1];
// External ports for CPU-to-GIC signals
// Clocks.
clock1Hz : MasterClock();
clockDiv : ClockDivider();
- clockDivPeriph : ClockDivider(mul=0x01800000);
+ clockDivPeriph : ClockDivider();
}
connection
clockDiv.rate.set64(mul, div);
}
}
+ slave port<ExportedClockRateControl> periph_clock_rate_s
+ {
+ behavior set_mul_div(uint64_t mul, uint64_t div)
+ {
+ clockDivPeriph.rate.set64(mul, div);
+ }
+ }
slave port<GICv3Comms> redistributor[2];
// External ports for CPU-to-GIC signals
// Clocks.
clock1Hz : MasterClock();
clockDiv : ClockDivider();
- clockDivPeriph : ClockDivider(mul=0x01800000);
+ clockDivPeriph : ClockDivider();
}
connection
clockDiv.rate.set64(mul, div);
}
}
+ slave port<ExportedClockRateControl> periph_clock_rate_s
+ {
+ behavior set_mul_div(uint64_t mul, uint64_t div)
+ {
+ clockDivPeriph.rate.set64(mul, div);
+ }
+ }
slave port<GICv3Comms> redistributor[3];
// External ports for CPU-to-GIC signals
// Clocks.
clock1Hz : MasterClock();
clockDiv : ClockDivider();
- clockDivPeriph : ClockDivider(mul=0x01800000);
+ clockDivPeriph : ClockDivider();
}
connection
clockDiv.rate.set64(mul, div);
}
}
+ slave port<ExportedClockRateControl> periph_clock_rate_s
+ {
+ behavior set_mul_div(uint64_t mul, uint64_t div)
+ {
+ clockDivPeriph.rate.set64(mul, div);
+ }
+ }
slave port<GICv3Comms> redistributor[4];
// External ports for CPU-to-GIC signals
clockRateControl->set_mul_div(SimClock::Int::s, clk_period);
}
+template <class Types>
+void
+ScxEvsCortexR52<Types>::setSysCounterFrq(uint64_t sys_counter_frq)
+{
+ panic("Not implemented for R52.");
+}
+
template <class Types>
void
ScxEvsCortexR52<Types>::setCluster(SimObject *cluster)
void setClkPeriod(Tick clk_period) override;
+ void setSysCounterFrq(uint64_t sys_counter_frq) override;
+
void setCluster(SimObject *cluster) override;
};
public:
virtual void sendFunc(PacketPtr pkt) = 0;
virtual void setClkPeriod(Tick clk_period) = 0;
+ virtual void setSysCounterFrq(uint64_t sys_counter_frq) = 0;
virtual void setCluster(SimObject *cluster) = 0;
};