Yu-hsin Wang has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/66551?usp=email )

Change subject: mem: Implement and use the recvMemBackdoorReq func.
......................................................................

mem: Implement and use the recvMemBackdoorReq func.

In the previous change, we miss some model supporting atomic backdoor.
We should also implement the recvMemBackdoorReq to them.

Change-Id: I4706d215aa4a5d18fe4306b2387f9c8750cb4b4a
---
M src/mem/hbm_ctrl.cc
M src/mem/hbm_ctrl.hh
M src/mem/thread_bridge.cc
M src/mem/thread_bridge.hh
4 files changed, 39 insertions(+), 0 deletions(-)



diff --git a/src/mem/hbm_ctrl.cc b/src/mem/hbm_ctrl.cc
index 99618c4..747e714 100644
--- a/src/mem/hbm_ctrl.cc
+++ b/src/mem/hbm_ctrl.cc
@@ -150,6 +150,21 @@
     return latency;
 }

+void
+HBMCtrl::recvMemBackdoorReq(const MemBackdoorReq &req,
+        MemBackdoorPtr &backdoor)
+{
+    auto &range = req.range();
+    if (pc0Int && pc0Int->getAddrRange().isSubset(range)) {
+        pc0Int->getBackdoor(backdoor);
+    } else if (pc1Int && pc1Int->getAddrRange().isSubset(range)) {
+        pc1Int->getBackdoor(backdoor);
+    }
+    else {
+ panic("Can't handle address range for range %s\n", range.to_string());
+    }
+}
+
 bool
 HBMCtrl::writeQueueFullPC0(unsigned int neededEntries) const
 {
diff --git a/src/mem/hbm_ctrl.hh b/src/mem/hbm_ctrl.hh
index c9045f0..a6ecf6c 100644
--- a/src/mem/hbm_ctrl.hh
+++ b/src/mem/hbm_ctrl.hh
@@ -259,6 +259,8 @@
     Tick recvAtomic(PacketPtr pkt) override;
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override;
     void recvFunctional(PacketPtr pkt) override;
+    void recvMemBackdoorReq(const MemBackdoorReq &req,
+            MemBackdoorPtr &_backdoor) override;
     bool recvTimingReq(PacketPtr pkt) override;

 };
diff --git a/src/mem/thread_bridge.cc b/src/mem/thread_bridge.cc
index 3f76ef4..efaf19a 100644
--- a/src/mem/thread_bridge.cc
+++ b/src/mem/thread_bridge.cc
@@ -84,6 +84,14 @@
     device_.out_port_.sendFunctional(pkt);
 }

+void
+ThreadBridge::IncomingPort::recvMemBackdoorReq(const MemBackdoorReq &req,
+                                               MemBackdoorPtr &backdoor)
+{
+    EventQueue::ScopedMigration migrate(device_.eventQueue());
+    device_.out_port_.sendMemBackdoorReq(req, backdoor);
+}
+
 ThreadBridge::OutgoingPort::OutgoingPort(const std::string &name,
                                          ThreadBridge &device)
     : RequestPort(name, &device), device_(device)
diff --git a/src/mem/thread_bridge.hh b/src/mem/thread_bridge.hh
index 28c9591..92cb078 100644
--- a/src/mem/thread_bridge.hh
+++ b/src/mem/thread_bridge.hh
@@ -61,6 +61,8 @@

         // FunctionalResponseProtocol
         void recvFunctional(PacketPtr pkt) override;
+        void recvMemBackdoorReq(const MemBackdoorReq &req,
+                                MemBackdoorPtr &backdoor) override;

       private:
         ThreadBridge &device_;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/66551?usp=email 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: I4706d215aa4a5d18fe4306b2387f9c8750cb4b4a
Gerrit-Change-Number: 66551
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

Reply via email to