misc: Revert bad merge

Merge 78db0e2 was bad and cause problems. This commit reverts it.
This commit is contained in:
Bobby R. Bruce
2024-11-19 14:38:15 -08:00
parent c54132bdd9
commit 2d8a2eab70
9 changed files with 7 additions and 108 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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 <type_traits>
#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 Entry>
class AssociativeSet : public AssociativeCache<Entry>
{
static_assert(std::is_base_of_v<TaggedEntry, Entry>,
"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<Entry>::getTag;
using AssociativeCache<Entry>::accessEntryByAddr;
using AssociativeCache<Entry>::findEntry;
using AssociativeCache<Entry>::insertEntry;
using AssociativeCache<Entry>::replPolicy;
using AssociativeCache<Entry>::indexingPolicy;
};
} // namespace gem5
#endif//__CACHE_PREFETCH_ASSOCIATIVE_SET_HH__

View File

@@ -124,7 +124,7 @@ class IndirectMemory : public Queued
}
};
/** Prefetch table */
AssociativeSet<PrefetchTableEntry> prefetchTable;
AssociativeCache<PrefetchTableEntry> prefetchTable;
/** Indirect Pattern Detector entrt */
struct IndirectPatternDetectorEntry : public TaggedEntry

View File

@@ -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<IndexEntry> index;
AssociativeCache<IndexEntry> index;
/**
* A Stream Address Buffer (SAB) tracks a window of consecutive

View File

@@ -154,7 +154,7 @@ class SignaturePath : public Queued
};
/** Pattern table */
AssociativeSet<PatternEntry> patternTable;
AssociativeCache<PatternEntry> patternTable;
/**
* Generates a new signature from an existing one and a new stride

View File

@@ -70,7 +70,7 @@ class SignaturePathV2 : public SignaturePath
}
};
/** Global History Register */
AssociativeSet<GlobalHistoryEntry> globalHistoryRegister;
AssociativeCache<GlobalHistoryEntry> globalHistoryRegister;
double calculateLookaheadConfidence(PatternEntry const &sig,
PatternStrideEntry const &lookahead) const override;

View File

@@ -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(

View File

@@ -157,7 +157,7 @@ class STeMS : public Queued
/** Active Generation Table (AGT) */
AssociativeCache<ActiveGenerationTableEntry> activeGenerationTable;
/** Pattern Sequence Table (PST) */
AssociativeSet<ActiveGenerationTableEntry> patternSequenceTable;
AssociativeCache<ActiveGenerationTableEntry> patternSequenceTable;
/** Data type of the Region Miss Order Buffer entry */
struct RegionMissOrderBufferEntry