gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::minor::ForwardLineData Class Reference

Line fetch data in the forward direction. More...

#include <pipe_data.hh>

Public Member Functions

 ForwardLineData ()
 
 ForwardLineData (const ForwardLineData &other)
 
ForwardLineDataoperator= (const ForwardLineData &other)
 
 ~ForwardLineData ()
 
bool isFault () const
 This is a fault, not a line.
 
void setFault (Fault fault_)
 Set fault and possible clear the bubble flag.
 
void allocateLine (unsigned int width_)
 In-place initialise a ForwardLineData, freeing and overridding the line.
 
void adoptPacketData (Packet *packet)
 Use the data from a packet as line instead of allocating new space.
 
void freeLine ()
 Free this ForwardLineData line.
 
bool isBubble () const
 
void reportData (std::ostream &os) const
 ReportIF interface.
 

Static Public Member Functions

static ForwardLineData bubble ()
 BubbleIF interface.
 

Public Attributes

Addr lineBaseAddr = 0
 First byte address in the line.
 
std::unique_ptr< PCStateBasepc
 PC of the first inst within this sequence.
 
Addr fetchAddr
 Address of this line of data.
 
unsigned int lineWidth = 0
 Explicit line width, don't rely on data.size.
 
Fault fault = NoFault
 This line has a fault.
 
InstId id
 Thread, stream, prediction ... id of this line.
 
uint8_t * line = nullptr
 Line data.
 
Packetpacket = nullptr
 Packet from which the line is taken.
 

Private Attributes

bool bubbleFlag = true
 This line is a bubble.
 

Detailed Description

Line fetch data in the forward direction.

Contains a single cache line (or fragment of a line), its address, a sequence number assigned when that line was fetched and a bubbleFlag that can allow ForwardLineData to be used to represent the absence of line data in a pipeline.

Definition at line 186 of file pipe_data.hh.

Constructor & Destructor Documentation

◆ ForwardLineData() [1/2]

gem5::minor::ForwardLineData::ForwardLineData ( )
inline

Definition at line 224 of file pipe_data.hh.

Referenced by bubble().

◆ ForwardLineData() [2/2]

gem5::minor::ForwardLineData::ForwardLineData ( const ForwardLineData & other)
inline

Definition at line 225 of file pipe_data.hh.

◆ ~ForwardLineData()

gem5::minor::ForwardLineData::~ForwardLineData ( )
inline

Definition at line 246 of file pipe_data.hh.

References line.

Member Function Documentation

◆ adoptPacketData()

void gem5::minor::ForwardLineData::adoptPacketData ( Packet * packet)

Use the data from a packet as line instead of allocating new space.

On destruction of this object, the packet will be destroyed

Definition at line 186 of file pipe_data.cc.

References bubbleFlag, gem5::Packet::getPtr(), isFault(), line, lineWidth, packet, and gem5::Packet::req.

Referenced by gem5::minor::Fetch1::processResponse().

◆ allocateLine()

void gem5::minor::ForwardLineData::allocateLine ( unsigned int width_)

In-place initialise a ForwardLineData, freeing and overridding the line.

Definition at line 174 of file pipe_data.cc.

References bubbleFlag, isFault(), line, and lineWidth.

◆ bubble()

static ForwardLineData gem5::minor::ForwardLineData::bubble ( )
inlinestatic

BubbleIF interface.

Definition at line 270 of file pipe_data.hh.

References ForwardLineData().

◆ freeLine()

void gem5::minor::ForwardLineData::freeLine ( )

Free this ForwardLineData line.

Note that these are shared between line objects and so you must be careful when deallocating them. Copying of ForwardLineData can, therefore, be done by default copy constructors/assignment

Definition at line 199 of file pipe_data.cc.

References bubbleFlag, isBubble(), isFault(), line, and packet.

Referenced by gem5::minor::Fetch2::popInput().

◆ isBubble()

bool gem5::minor::ForwardLineData::isBubble ( ) const
inline

Definition at line 271 of file pipe_data.hh.

References bubbleFlag.

Referenced by gem5::minor::Fetch1::evaluate(), freeLine(), and reportData().

◆ isFault()

bool gem5::minor::ForwardLineData::isFault ( ) const
inline

This is a fault, not a line.

Definition at line 250 of file pipe_data.hh.

References fault, and gem5::NoFault.

Referenced by adoptPacketData(), allocateLine(), gem5::minor::Fetch2::evaluate(), freeLine(), and setFault().

◆ operator=()

ForwardLineData & gem5::minor::ForwardLineData::operator= ( const ForwardLineData & other)
inline

Definition at line 232 of file pipe_data.hh.

References bubbleFlag, fault, fetchAddr, id, line, lineBaseAddr, lineWidth, packet, pc, and gem5::ArmISA::set.

◆ reportData()

void gem5::minor::ForwardLineData::reportData ( std::ostream & os) const

ReportIF interface.

Definition at line 217 of file pipe_data.cc.

References fault, id, isBubble(), gem5::NoFault, and gem5::X86ISA::os.

◆ setFault()

void gem5::minor::ForwardLineData::setFault ( Fault fault_)

Set fault and possible clear the bubble flag.

Definition at line 166 of file pipe_data.cc.

References bubbleFlag, fault, and isFault().

Referenced by gem5::minor::Fetch1::processResponse().

Member Data Documentation

◆ bubbleFlag

bool gem5::minor::ForwardLineData::bubbleFlag = true
private

This line is a bubble.

No other data member is required to be valid if this is true Make lines bubbles by default

Definition at line 192 of file pipe_data.hh.

Referenced by adoptPacketData(), allocateLine(), freeLine(), isBubble(), operator=(), and setFault().

◆ fault

Fault gem5::minor::ForwardLineData::fault = NoFault

This line has a fault.

The bubble flag will be false and seqNums will be valid but no data will

Definition at line 211 of file pipe_data.hh.

Referenced by gem5::minor::Fetch2::evaluate(), isFault(), operator=(), reportData(), and setFault().

◆ fetchAddr

Addr gem5::minor::ForwardLineData::fetchAddr

Address of this line of data.

Definition at line 203 of file pipe_data.hh.

Referenced by operator=(), and gem5::minor::Fetch1::processResponse().

◆ id

InstId gem5::minor::ForwardLineData::id

Thread, stream, prediction ... id of this line.

Definition at line 214 of file pipe_data.hh.

Referenced by gem5::minor::Fetch2::evaluate(), operator=(), gem5::minor::Fetch1::processResponse(), and reportData().

◆ line

uint8_t* gem5::minor::ForwardLineData::line = nullptr

Line data.

line[0] is the byte at address pc.instAddr(). Data is only valid upto lineWidth - 1.

Definition at line 218 of file pipe_data.hh.

Referenced by adoptPacketData(), allocateLine(), gem5::minor::Fetch2::evaluate(), freeLine(), operator=(), and ~ForwardLineData().

◆ lineBaseAddr

Addr gem5::minor::ForwardLineData::lineBaseAddr = 0

First byte address in the line.

This is allowed to be <= pc.instAddr()

Definition at line 197 of file pipe_data.hh.

Referenced by gem5::minor::Fetch2::evaluate(), operator=(), and gem5::minor::Fetch1::processResponse().

◆ lineWidth

unsigned int gem5::minor::ForwardLineData::lineWidth = 0

Explicit line width, don't rely on data.size.

Definition at line 206 of file pipe_data.hh.

Referenced by adoptPacketData(), allocateLine(), gem5::minor::Fetch2::evaluate(), and operator=().

◆ packet

Packet* gem5::minor::ForwardLineData::packet = nullptr

Packet from which the line is taken.

Definition at line 221 of file pipe_data.hh.

Referenced by adoptPacketData(), freeLine(), and operator=().

◆ pc

std::unique_ptr<PCStateBase> gem5::minor::ForwardLineData::pc

PC of the first inst within this sequence.

Definition at line 200 of file pipe_data.hh.

Referenced by gem5::minor::Fetch2::evaluate(), operator=(), and gem5::minor::Fetch1::processResponse().


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

Generated on Tue Jun 18 2024 16:24:20 for gem5 by doxygen 1.11.0