Huang Jiasen has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/55084 )

Change subject: mem-cache: pstAddress should be inserted into PST in STeMS
......................................................................

mem-cache: pstAddress should be inserted into PST in STeMS

Change-Id: Ib2c4c5fb0fec32e63947d3ee8dcb5c3d7e2555ab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55084
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc
1 file changed, 20 insertions(+), 3 deletions(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc
index 6030096..f610288 100644
--- a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc
+++ b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc
@@ -74,6 +74,7 @@
         if (agt_entry.isValid()) {
             bool generation_ended = false;
             bool sr_is_secure = agt_entry.isSecure();
+            Addr pst_addr = 0;
             for (auto &seq_entry : agt_entry.sequence) {
                 if (seq_entry.counter > 0) {
                     Addr cache_addr =
@@ -81,6 +82,8 @@
                     if (!inCache(cache_addr, sr_is_secure) &&
                             !inMissQueue(cache_addr, sr_is_secure)) {
                         generation_ended = true;
+                        pst_addr = (agt_entry.pc << spatialRegionSizeBits)
+                                    + seq_entry.offset;
                         break;
                     }
                 }
@@ -88,13 +91,13 @@
             if (generation_ended) {
                 // PST is indexed using the PC (secure bit is unused)
                 ActiveGenerationTableEntry *pst_entry =
-                    patternSequenceTable.findEntry(agt_entry.pc,
+                    patternSequenceTable.findEntry(pst_addr,
                                                    false /*unused*/);
                 if (pst_entry == nullptr) {
                     // Tipically an entry will not exist
- pst_entry = patternSequenceTable.findVictim(agt_entry.pc);
+                    pst_entry = patternSequenceTable.findVictim(pst_addr);
                     assert(pst_entry != nullptr);
-                    patternSequenceTable.insertEntry(agt_entry.pc,
+                    patternSequenceTable.insertEntry(pst_addr,
                             false /*unused*/, pst_entry);
                 } else {
                     patternSequenceTable.accessEntry(pst_entry);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/55084
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: Ib2c4c5fb0fec32e63947d3ee8dcb5c3d7e2555ab
Gerrit-Change-Number: 55084
Gerrit-PatchSet: 5
Gerrit-Owner: Huang Jiasen <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Huang Jiasen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Javier Bueno Hedo <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[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

Reply via email to