50#ifndef __CPU_MINOR_PIPE_DATA_HH__
51#define __CPU_MINOR_PIPE_DATA_HH__
180std::ostream &
operator <<(std::ostream &
os,
const BranchData &branch);
200 std::unique_ptr<PCStateBase>
pc;
Classes for buffer, queue and FIFO behaviour.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Forward data betwen Execute and Fetch1 carrying change-of-address/stream information.
MinorDynInstPtr inst
Instruction which caused this branch.
InstSeqNum newStreamSeqNum
Sequence number of new stream/prediction to be adopted.
@ BadlyPredictedBranchTarget
@ CorrectlyPredictedBranch
Reason reason
Explanation for this branch.
BranchData & operator=(const BranchData &other)
InstSeqNum newPredictionSeqNum
ThreadID threadId
ThreadID associated with branch.
bool isStreamChange() const
As static isStreamChange but on this branch data.
bool isBranch() const
As static isBranch but on this branch data.
BranchData(const BranchData &other)
void reportData(std::ostream &os) const
ReportIF interface.
static BranchData bubble()
BubbleIF interface.
std::unique_ptr< PCStateBase > target
Starting PC of that stream.
BranchData(Reason reason_, ThreadID thread_id, InstSeqNum new_stream_seq_num, InstSeqNum new_prediction_seq_num, const PCStateBase &_target, MinorDynInstPtr inst_)
Forward flowing data between Fetch2,Decode,Execute carrying a packet of instructions of a width appro...
ForwardInstData(unsigned int width=0, ThreadID tid=InvalidThreadID)
ForwardInstData & operator=(const ForwardInstData &src)
Copy the inst array only as far as numInsts.
ThreadID threadId
Thread associated with these instructions.
void resize(unsigned int width)
Resize a bubble/empty ForwardInstData and fill with bubbles.
bool isBubble() const
BubbleIF interface.
unsigned int numInsts
The number of insts slots that can be expected to be valid insts.
void reportData(std::ostream &os) const
ReportIF interface.
MinorDynInstPtr insts[MAX_FORWARD_INSTS]
Array of carried insts, ref counted.
void bubbleFill()
Fill with bubbles from 0 to width() - 1.
unsigned int width() const
Number of instructions carried by this object.
Line fetch data in the forward direction.
static ForwardLineData bubble()
BubbleIF interface.
void setFault(Fault fault_)
Set fault and possible clear the bubble flag.
void adoptPacketData(Packet *packet)
Use the data from a packet as line instead of allocating new space.
unsigned int lineWidth
Explicit line width, don't rely on data.size.
Addr fetchAddr
Address of this line of data.
bool bubbleFlag
This line is a bubble.
void freeLine()
Free this ForwardLineData line.
Packet * packet
Packet from which the line is taken.
void reportData(std::ostream &os) const
ReportIF interface.
InstId id
Thread, stream, prediction ... id of this line.
std::unique_ptr< PCStateBase > pc
PC of the first inst within this sequence.
bool isFault() const
This is a fault, not a line.
void allocateLine(unsigned int width_)
In-place initialise a ForwardLineData, freeing and overridding the line.
ForwardLineData & operator=(const ForwardLineData &other)
ForwardLineData(const ForwardLineData &other)
Fault fault
This line has a fault.
Addr lineBaseAddr
First byte address in the line.
Id for lines and instructions.
static MinorDynInstPtr bubble()
There is a single bubble inst.
The dynamic instruction and instruction/line id (sequence numbers) definition for Minor.
const unsigned int MAX_FORWARD_INSTS
Maximum number of instructions that can be carried by the pipeline.
std::ostream & operator<<(std::ostream &os, const InstId &id)
Print this id in the usual slash-separated format expected by MinorTrace.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
const ThreadID InvalidThreadID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
constexpr decltype(nullptr) NoFault
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.