Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/45862 )
Change subject: fastmodel: Implement ThreadContext::sendFunctional.
......................................................................
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 <[email protected]>
Reviewed-by: Yu-hsin Wang <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/arch/arm/fastmodel/iris/cpu.hh
M src/arch/arm/fastmodel/iris/thread_context.cc
M src/arch/arm/fastmodel/iris/thread_context.hh
3 files changed, 16 insertions(+), 1 deletion(-)
Approvals:
Yu-hsin Wang: Looks good to me, approved
Gabe Black: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/arm/fastmodel/iris/cpu.hh
b/src/arch/arm/fastmodel/iris/cpu.hh
index 369f0d8..0baebec 100644
--- a/src/arch/arm/fastmodel/iris/cpu.hh
+++ b/src/arch/arm/fastmodel/iris/cpu.hh
@@ -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 @@
Iris::BaseCpuEvs *evs_base_cpu;
protected:
+ friend ThreadContext;
+
void
clockPeriodUpdated() override
{
diff --git a/src/arch/arm/fastmodel/iris/thread_context.cc
b/src/arch/arm/fastmodel/iris/thread_context.cc
index b2173e1..043971f 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -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::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 @@
}
}
+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
{
diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh
b/src/arch/arm/fastmodel/iris/thread_context.hh
index 019baca..d093138 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -216,6 +216,8 @@
PortProxy &getVirtProxy() override { return *virtProxy; }
void initMemProxies(::ThreadContext *tc) override;
+ void sendFunctional(PacketPtr pkt) override;
+
Process *
getProcessPtr() override
{
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45862
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Idffb4efc509dd63c852ada0768435bf653bd1854
Gerrit-Change-Number: 45862
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Yu-hsin Wang <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s