Yu-hsin Wang has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45579 )

Change subject: cpu: Add getSendFunctional to ThreadContext
......................................................................

cpu: Add getSendFunctional to ThreadContext

Some cpu context has private memory, for example the tightly coupled
memory(TCM) in Cortex-M arch. The memory request should be initiated
from the aspect of ThreadContext instead of the aspect of cpu. We add
getSendFunctional to ThreadContext and call to getSendFunctional of cpu
as default implementation.

Change-Id: I5176fd67c0b0bfa717183337693a19d8da4191bb
---
M src/cpu/thread_context.cc
M src/cpu/thread_context.hh
2 files changed, 10 insertions(+), 0 deletions(-)



diff --git a/src/cpu/thread_context.cc b/src/cpu/thread_context.cc
index 1a78693..3eb5464 100644
--- a/src/cpu/thread_context.cc
+++ b/src/cpu/thread_context.cc
@@ -127,6 +127,12 @@

 }

+PortProxy::SendFunctionalFunc
+ThreadContext::getSendFunctional()
+{
+    return getCpuPtr()->getSendFunctional();
+}
+
 void
 ThreadContext::quiesce()
 {
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh
index 145be58..e8fc5e1 100644
--- a/src/cpu/thread_context.hh
+++ b/src/cpu/thread_context.hh
@@ -42,6 +42,7 @@
 #ifndef __CPU_THREAD_CONTEXT_HH__
 #define __CPU_THREAD_CONTEXT_HH__

+#include <functional>
 #include <iostream>
 #include <string>

@@ -53,6 +54,7 @@
 #include "config/the_isa.hh"
 #include "cpu/pc_event.hh"
 #include "cpu/reg_class.hh"
+#include "mem/packet.hh"

// @todo: Figure out a more architecture independent way to obtain the ITB and
 // DTB pointers.
@@ -146,6 +148,8 @@

     virtual PortProxy &getVirtProxy() = 0;

+    virtual std::function<void(PacketPtr pkt)> getSendFunctional();
+
     /**
      * Initialise the physical and virtual port proxies and tie them to
      * the data port of the CPU.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45579
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: I5176fd67c0b0bfa717183337693a19d8da4191bb
Gerrit-Change-Number: 45579
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang <yuhsi...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to