Yu-hsin Wang has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/45267 )
Change subject: mem: add constructor for decouple cpu sendFunc
......................................................................
mem: add constructor for decouple cpu sendFunc
Change-Id: I6428650e05f93f3a20a391274bd9b932c62a51bc
---
M src/mem/se_translating_port_proxy.cc
M src/mem/se_translating_port_proxy.hh
M src/mem/translating_port_proxy.cc
M src/mem/translating_port_proxy.hh
4 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/mem/se_translating_port_proxy.cc
b/src/mem/se_translating_port_proxy.cc
index a8a42d0..1fdabc7 100644
--- a/src/mem/se_translating_port_proxy.cc
+++ b/src/mem/se_translating_port_proxy.cc
@@ -40,6 +40,8 @@
#include "mem/se_translating_port_proxy.hh"
+#include <utility>
+
#include "sim/process.hh"
#include "sim/system.hh"
@@ -48,6 +50,13 @@
TranslatingPortProxy(tc, _flags), allocating(alloc)
{}
+SETranslatingPortProxy::SETranslatingPortProxy(
+ ThreadContext *tc, SendFunctionalFunc func, unsigned int
cacheLineSize,
+ AllocType alloc, Request::Flags _flags) :
+ TranslatingPortProxy(tc, std::move(func), cacheLineSize, _flags),
+ allocating(alloc)
+{}
+
bool
SETranslatingPortProxy::fixupAddr(Addr addr, BaseTLB::Mode mode) const
{
diff --git a/src/mem/se_translating_port_proxy.hh
b/src/mem/se_translating_port_proxy.hh
index d684c20..18dbb38 100644
--- a/src/mem/se_translating_port_proxy.hh
+++ b/src/mem/se_translating_port_proxy.hh
@@ -63,6 +63,9 @@
public:
SETranslatingPortProxy(ThreadContext *tc, AllocType alloc=NextPage,
Request::Flags _flags=0);
+ SETranslatingPortProxy(ThreadContext *tc, SendFunctionalFunc func,
+ unsigned int cacheLineSize, AllocType
alloc=NextPage,
+ Request::Flags _flags=0);
};
#endif // __MEM_SE_TRANSLATING_PORT_PROXY_HH__
diff --git a/src/mem/translating_port_proxy.cc
b/src/mem/translating_port_proxy.cc
index 27a2d67..3b35a8d 100644
--- a/src/mem/translating_port_proxy.cc
+++ b/src/mem/translating_port_proxy.cc
@@ -45,6 +45,8 @@
#include "mem/translating_port_proxy.hh"
+#include <utility>
+
#include "arch/generic/mmu.hh"
#include "base/chunk_generator.hh"
#include "cpu/base.hh"
@@ -59,6 +61,13 @@
flags(_flags)
{}
+TranslatingPortProxy::TranslatingPortProxy(
+ ThreadContext *tc, SendFunctionalFunc func,
+ unsigned int cacheLineSize, Request::Flags _flags) :
+ PortProxy(std::move(func), cacheLineSize), _tc(tc),
+ pageBytes(tc->getSystemPtr()->getPageBytes()), flags(_flags)
+{}
+
bool
TranslatingPortProxy::tryTLBsOnce(RequestPtr req, BaseTLB::Mode mode) const
{
diff --git a/src/mem/translating_port_proxy.hh
b/src/mem/translating_port_proxy.hh
index a5dfe7f..5b9c340 100644
--- a/src/mem/translating_port_proxy.hh
+++ b/src/mem/translating_port_proxy.hh
@@ -73,6 +73,8 @@
public:
TranslatingPortProxy(ThreadContext *tc, Request::Flags _flags=0);
+ TranslatingPortProxy(ThreadContext *tc, SendFunctionalFunc func,
+ unsigned int cacheLineSize, Request::Flags
_flags=0);
/** Version of tryReadblob that translates virt->phys and deals
* with page boundries. */
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45267
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: I6428650e05f93f3a20a391274bd9b932c62a51bc
Gerrit-Change-Number: 45267
Gerrit-PatchSet: 1
Gerrit-Owner: Yu-hsin Wang <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s