fastmodel: Implement ThreadContext::sendFunctional.
This change provides a custom implementation for the ThreadContext::sendFunctional method. Change-Id: Idffb4efc509dd63c852ada0768435bf653bd1854 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45862 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Yu-hsin Wang <yuhsingw@google.com> Maintainer: Gabe Black <gabe.black@gmail.com>
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
namespace Iris
|
||||
{
|
||||
|
||||
class ThreadContext;
|
||||
|
||||
// The base interface of the EVS used by gem5 BaseCPU below.
|
||||
class BaseCpuEvs
|
||||
{
|
||||
@@ -93,6 +95,8 @@ class BaseCPU : public ::BaseCPU
|
||||
Iris::BaseCpuEvs *evs_base_cpu;
|
||||
|
||||
protected:
|
||||
friend ThreadContext;
|
||||
|
||||
void
|
||||
clockPeriodUpdated() override
|
||||
{
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "arch/arm/fastmodel/iris/cpu.hh"
|
||||
#include "arch/arm/system.hh"
|
||||
#include "arch/arm/utility.hh"
|
||||
#include "iris/detail/IrisCppAdapter.h"
|
||||
@@ -304,7 +305,7 @@ ThreadContext::semihostingEvent(
|
||||
}
|
||||
|
||||
ThreadContext::ThreadContext(
|
||||
BaseCPU *cpu, int id, System *system, ::BaseMMU *mmu,
|
||||
::BaseCPU *cpu, int id, System *system, ::BaseMMU *mmu,
|
||||
BaseISA *isa, iris::IrisConnectionInterface *iris_if,
|
||||
const std::string &iris_path) :
|
||||
_cpu(cpu), _threadId(id), _system(system), _mmu(mmu), _isa(isa),
|
||||
@@ -488,6 +489,14 @@ ThreadContext::initMemProxies(::ThreadContext *tc)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ThreadContext::sendFunctional(PacketPtr pkt)
|
||||
{
|
||||
auto *iris_cpu = dynamic_cast<Iris::BaseCPU *>(getCpuPtr());
|
||||
assert(iris_cpu);
|
||||
iris_cpu->evs_base_cpu->sendFunc(pkt);
|
||||
}
|
||||
|
||||
ThreadContext::Status
|
||||
ThreadContext::status() const
|
||||
{
|
||||
|
||||
@@ -216,6 +216,8 @@ class ThreadContext : public ::ThreadContext
|
||||
PortProxy &getVirtProxy() override { return *virtProxy; }
|
||||
void initMemProxies(::ThreadContext *tc) override;
|
||||
|
||||
void sendFunctional(PacketPtr pkt) override;
|
||||
|
||||
Process *
|
||||
getProcessPtr() override
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user