gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
gem5::prefetch::Base::PrefetchInfo Class Reference

Class containing the information needed by the prefetch to train and generate new prefetch requests. More...

#include <base.hh>

Public Member Functions

Addr getAddr () const
 Obtains the address value of this Prefetcher address.
 
bool isSecure () const
 Returns true if the address targets the secure memory space.
 
Addr getPC () const
 Returns the program counter that generated this request.
 
bool hasPC () const
 Returns true if the associated program counter is valid.
 
RequestorID getRequestorId () const
 Gets the requestor ID that generated this address.
 
unsigned int getSize () const
 Gets the size of the request triggering this event.
 
bool isWrite () const
 Checks if the request that caused this prefetch event was a write request.
 
Addr getPaddr () const
 Gets the physical address of the request.
 
bool isCacheMiss () const
 Check if this event comes from a cache miss.
 
template<typename T>
get (ByteOrder endian) const
 Gets the associated data of the request triggering the event.
 
bool sameAddr (PrefetchInfo const &pfi) const
 Check for equality.
 
 PrefetchInfo (PacketPtr pkt, Addr addr, bool miss)
 Constructs a PrefetchInfo using a PacketPtr.
 
 PrefetchInfo (PrefetchInfo const &pfi, Addr addr)
 Constructs a PrefetchInfo using a new address value and another PrefetchInfo as a reference.
 
 ~PrefetchInfo ()
 

Private Attributes

Addr address
 The address used to train and generate prefetches.
 
Addr pc
 The program counter that generated this address.
 
RequestorID requestorId
 The requestor ID that generated this address.
 
bool validPC
 Validity bit for the PC of this address.
 
bool secure
 Whether this address targets the secure memory space.
 
unsigned int size
 Size in bytes of the request triggering this event.
 
bool write
 Whether this event comes from a write request.
 
Addr paddress
 Physical address, needed because address can be virtual.
 
bool cacheMiss
 Whether this event comes from a cache miss.
 
uint8_t * data
 Pointer to the associated request data.
 

Detailed Description

Class containing the information needed by the prefetch to train and generate new prefetch requests.

Definition at line 112 of file base.hh.

Constructor & Destructor Documentation

◆ PrefetchInfo() [1/2]

gem5::prefetch::Base::PrefetchInfo::PrefetchInfo ( PacketPtr pkt,
Addr addr,
bool miss )

Constructs a PrefetchInfo using a PacketPtr.

Parameters
pktPacketPtr used to generate the PrefetchInfo
addrthe address value of the new object, this address is used to train the prefetcher
misswhether this event comes from a cache miss

Definition at line 61 of file base.cc.

References gem5::X86ISA::addr, address, cacheMiss, getPaddr(), getPC(), getSize(), gem5::Packet::hasData(), hasPC(), isSecure(), isWrite(), paddress, pc, gem5::Packet::req, requestorId, secure, size, validPC, and write.

Referenced by PrefetchInfo(), and sameAddr().

◆ PrefetchInfo() [2/2]

gem5::prefetch::Base::PrefetchInfo::PrefetchInfo ( PrefetchInfo const & pfi,
Addr addr )

Constructs a PrefetchInfo using a new address value and another PrefetchInfo as a reference.

Parameters
pfiPrefetchInfo used to generate this new object
addrthe address value of the new object

Definition at line 77 of file base.cc.

References gem5::X86ISA::addr, address, cacheMiss, data, paddress, pc, PrefetchInfo(), requestorId, secure, size, validPC, and write.

◆ ~PrefetchInfo()

gem5::prefetch::Base::PrefetchInfo::~PrefetchInfo ( )
inline

Definition at line 271 of file base.hh.

References data.

Member Function Documentation

◆ get()

template<typename T>
T gem5::prefetch::Base::PrefetchInfo::get ( ByteOrder endian) const
inline

Gets the associated data of the request triggering the event.

Parameters
Byteordering of the stored data
Returns
the data

Definition at line 226 of file base.hh.

References gem5::betoh(), data, gem5::letoh(), and panic.

Referenced by gem5::prefetch::IndirectMemory::calculatePrefetch().

◆ getAddr()

◆ getPaddr()

Addr gem5::prefetch::Base::PrefetchInfo::getPaddr ( ) const
inline

Gets the physical address of the request.

Returns
physical address of the request

Definition at line 205 of file base.hh.

References paddress.

Referenced by gem5::prefetch::STeMS::calculatePrefetch(), and PrefetchInfo().

◆ getPC()

◆ getRequestorId()

RequestorID gem5::prefetch::Base::PrefetchInfo::getRequestorId ( ) const
inline

Gets the requestor ID that generated this address.

Returns
the requestor ID that generated this address

Definition at line 177 of file base.hh.

References requestorId.

Referenced by gem5::prefetch::Stride::calculatePrefetch().

◆ getSize()

unsigned int gem5::prefetch::Base::PrefetchInfo::getSize ( ) const
inline

Gets the size of the request triggering this event.

Returns
the size in bytes of the request triggering this event

Definition at line 186 of file base.hh.

References size.

Referenced by gem5::prefetch::IndirectMemory::calculatePrefetch(), and PrefetchInfo().

◆ hasPC()

bool gem5::prefetch::Base::PrefetchInfo::hasPC ( ) const
inline

◆ isCacheMiss()

bool gem5::prefetch::Base::PrefetchInfo::isCacheMiss ( ) const
inline

Check if this event comes from a cache miss.

Returns
true if this event comes from a cache miss

Definition at line 214 of file base.hh.

References cacheMiss.

Referenced by gem5::prefetch::IndirectMemory::calculatePrefetch(), and gem5::prefetch::STeMS::calculatePrefetch().

◆ isSecure()

◆ isWrite()

bool gem5::prefetch::Base::PrefetchInfo::isWrite ( ) const
inline

Checks if the request that caused this prefetch event was a write request.

Returns
true if the request causing this event is a write request

Definition at line 196 of file base.hh.

References write.

Referenced by gem5::prefetch::IndirectMemory::calculatePrefetch(), and PrefetchInfo().

◆ sameAddr()

bool gem5::prefetch::Base::PrefetchInfo::sameAddr ( PrefetchInfo const & pfi) const
inline

Check for equality.

Parameters
pfiPrefetchInfo to compare against
Returns
True if this object and the provided one are equal

Definition at line 248 of file base.hh.

References getAddr(), isSecure(), and PrefetchInfo().

Member Data Documentation

◆ address

Addr gem5::prefetch::Base::PrefetchInfo::address
private

The address used to train and generate prefetches.

Definition at line 115 of file base.hh.

Referenced by getAddr(), PrefetchInfo(), and PrefetchInfo().

◆ cacheMiss

bool gem5::prefetch::Base::PrefetchInfo::cacheMiss
private

Whether this event comes from a cache miss.

Definition at line 131 of file base.hh.

Referenced by isCacheMiss(), PrefetchInfo(), and PrefetchInfo().

◆ data

uint8_t* gem5::prefetch::Base::PrefetchInfo::data
private

Pointer to the associated request data.

Definition at line 133 of file base.hh.

Referenced by get(), PrefetchInfo(), and ~PrefetchInfo().

◆ paddress

Addr gem5::prefetch::Base::PrefetchInfo::paddress
private

Physical address, needed because address can be virtual.

Definition at line 129 of file base.hh.

Referenced by getPaddr(), PrefetchInfo(), and PrefetchInfo().

◆ pc

Addr gem5::prefetch::Base::PrefetchInfo::pc
private

The program counter that generated this address.

Definition at line 117 of file base.hh.

Referenced by getPC(), PrefetchInfo(), and PrefetchInfo().

◆ requestorId

RequestorID gem5::prefetch::Base::PrefetchInfo::requestorId
private

The requestor ID that generated this address.

Definition at line 119 of file base.hh.

Referenced by getRequestorId(), PrefetchInfo(), and PrefetchInfo().

◆ secure

bool gem5::prefetch::Base::PrefetchInfo::secure
private

Whether this address targets the secure memory space.

Definition at line 123 of file base.hh.

Referenced by isSecure(), PrefetchInfo(), and PrefetchInfo().

◆ size

unsigned int gem5::prefetch::Base::PrefetchInfo::size
private

Size in bytes of the request triggering this event.

Definition at line 125 of file base.hh.

Referenced by getSize(), PrefetchInfo(), and PrefetchInfo().

◆ validPC

bool gem5::prefetch::Base::PrefetchInfo::validPC
private

Validity bit for the PC of this address.

Definition at line 121 of file base.hh.

Referenced by hasPC(), PrefetchInfo(), and PrefetchInfo().

◆ write

bool gem5::prefetch::Base::PrefetchInfo::write
private

Whether this event comes from a write request.

Definition at line 127 of file base.hh.

Referenced by isWrite(), PrefetchInfo(), and PrefetchInfo().


The documentation for this class was generated from the following files:

Generated on Mon May 26 2025 09:19:34 for gem5 by doxygen 1.13.2