From 2d8a2eab7013778fbd287d78dd5b84036cd9b032 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 19 Nov 2024 14:38:15 -0800 Subject: [PATCH] misc: Revert bad merge Merge 78db0e2 was bad and cause problems. This commit reverts it. --- src/Doxyfile | 2 +- src/base/version.cc | 2 +- src/mem/cache/prefetch/associative_set.hh | 100 ------------------ src/mem/cache/prefetch/indirect_memory.hh | 2 +- src/mem/cache/prefetch/pif.hh | 2 +- src/mem/cache/prefetch/signature_path.hh | 2 +- src/mem/cache/prefetch/signature_path_v2.hh | 2 +- .../spatio_temporal_memory_streaming.cc | 1 - .../spatio_temporal_memory_streaming.hh | 2 +- 9 files changed, 7 insertions(+), 108 deletions(-) delete mode 100644 src/mem/cache/prefetch/associative_set.hh diff --git a/src/Doxyfile b/src/Doxyfile index fc95f17d62..12dff49c52 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v24.0.0.1 +PROJECT_NUMBER = [DEVELOP-FOR-v24.1] # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index ffbc7bd38d..e9960c39ed 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -32,6 +32,6 @@ namespace gem5 /** * @ingroup api_base_utils */ -const char *gem5Version = "24.0.0.1"; +const char *gem5Version = "DEVELOP-FOR-24.1"; } // namespace gem5 diff --git a/src/mem/cache/prefetch/associative_set.hh b/src/mem/cache/prefetch/associative_set.hh deleted file mode 100644 index 232844f247..0000000000 --- a/src/mem/cache/prefetch/associative_set.hh +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Copyright (c) 2018 Metempsy Technology Consulting - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer; - * redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution; - * neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__ -#define __CACHE_PREFETCH_ASSOCIATIVE_SET_HH__ - -#include - -#include "base/cache/associative_cache.hh" -#include "mem/cache/replacement_policies/base.hh" -#include "mem/cache/tags/indexing_policies/base.hh" -#include "mem/cache/tags/tagged_entry.hh" - -namespace gem5 -{ - -/** - * Associative container based on the previosuly defined Entry type - * Each element is indexed by a key of type Addr, an additional - * bool value is used as an additional tag data of the entry. - */ -template -class AssociativeSet : public AssociativeCache -{ - static_assert(std::is_base_of_v, - "Entry must derive from TaggedEntry"); - - public: - /** - * Public constructor - * @param name Name of the cache - * @param num_entries total number of entries of the container, the number - * of sets can be calculated dividing this balue by the 'assoc' - * value - * @param assoc number of elements in each associative set - * @param rpl_policy replacement policy - * @param idx_policy indexing policy - * @param init_val initial value of the elements of the set - */ - AssociativeSet(const char *name, const size_t num_entries, - const size_t associativity_, - replacement_policy::Base *repl_policy, - BaseIndexingPolicy *indexing_policy, - Entry const &init_val = Entry()); - - /** - * Find an entry within the set - * @param addr key element - * @param is_secure tag element - * @return returns a pointer to the wanted entry or nullptr if it does not - * exist. - */ - Entry* findEntry(Addr addr, bool is_secure) const; - - /** - * Indicate that an entry has just been inserted - * @param addr key of the container - * @param is_secure tag component of the container - * @param entry pointer to the container entry to be inserted - */ - void insertEntry(Addr addr, bool is_secure, Entry* entry); - - private: - // The following APIs are excluded since they lack the secure bit - using AssociativeCache::getTag; - using AssociativeCache::accessEntryByAddr; - using AssociativeCache::findEntry; - using AssociativeCache::insertEntry; - using AssociativeCache::replPolicy; - using AssociativeCache::indexingPolicy; -}; - -} // namespace gem5 - -#endif//__CACHE_PREFETCH_ASSOCIATIVE_SET_HH__ diff --git a/src/mem/cache/prefetch/indirect_memory.hh b/src/mem/cache/prefetch/indirect_memory.hh index 289c7e9566..92b010d4ab 100644 --- a/src/mem/cache/prefetch/indirect_memory.hh +++ b/src/mem/cache/prefetch/indirect_memory.hh @@ -124,7 +124,7 @@ class IndirectMemory : public Queued } }; /** Prefetch table */ - AssociativeSet prefetchTable; + AssociativeCache prefetchTable; /** Indirect Pattern Detector entrt */ struct IndirectPatternDetectorEntry : public TaggedEntry diff --git a/src/mem/cache/prefetch/pif.hh b/src/mem/cache/prefetch/pif.hh index 99984ed992..00b25c5d5a 100644 --- a/src/mem/cache/prefetch/pif.hh +++ b/src/mem/cache/prefetch/pif.hh @@ -150,7 +150,7 @@ class PIF : public Queued * The index table is a small cache-like structure that facilitates * fast search of the history buffer. */ - AssociativeSet index; + AssociativeCache index; /** * A Stream Address Buffer (SAB) tracks a window of consecutive diff --git a/src/mem/cache/prefetch/signature_path.hh b/src/mem/cache/prefetch/signature_path.hh index 888983ac41..1b3a91845e 100644 --- a/src/mem/cache/prefetch/signature_path.hh +++ b/src/mem/cache/prefetch/signature_path.hh @@ -154,7 +154,7 @@ class SignaturePath : public Queued }; /** Pattern table */ - AssociativeSet patternTable; + AssociativeCache patternTable; /** * Generates a new signature from an existing one and a new stride diff --git a/src/mem/cache/prefetch/signature_path_v2.hh b/src/mem/cache/prefetch/signature_path_v2.hh index 17bc2dab6d..8e068e341e 100644 --- a/src/mem/cache/prefetch/signature_path_v2.hh +++ b/src/mem/cache/prefetch/signature_path_v2.hh @@ -70,7 +70,7 @@ class SignaturePathV2 : public SignaturePath } }; /** Global History Register */ - AssociativeSet globalHistoryRegister; + AssociativeCache globalHistoryRegister; double calculateLookaheadConfidence(PatternEntry const &sig, PatternStrideEntry const &lookahead) const override; diff --git a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc index 6009923494..dadda26327 100644 --- a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc +++ b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.cc @@ -222,7 +222,6 @@ STeMS::reconstructSequence( // Now query the PST with the PC of each RMOB entry idx = 0; - constexpr bool is_secure = false; for (auto it = rmob_it; it != rmob.end() && (idx < reconstructionEntries); it++) { auto pst_entry = patternSequenceTable.findEntry( diff --git a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh index f814699d51..b5ee66856f 100644 --- a/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh +++ b/src/mem/cache/prefetch/spatio_temporal_memory_streaming.hh @@ -157,7 +157,7 @@ class STeMS : public Queued /** Active Generation Table (AGT) */ AssociativeCache activeGenerationTable; /** Pattern Sequence Table (PST) */ - AssociativeSet patternSequenceTable; + AssociativeCache patternSequenceTable; /** Data type of the Region Miss Order Buffer entry */ struct RegionMissOrderBufferEntry