Go to the documentation of this file.
45 #ifndef __CPU_MINOR_FETCH1_HH__
46 #define __CPU_MINOR_FETCH1_HH__
178 request = std::make_shared<Request>();
383 Fetch1(
const std::string &name_,
385 MinorCPUParams ¶ms,
IcachePort icachePort
IcachePort to pass to the CPU.
MinorCPU & cpu
The enclosing cpu.
std::vector< InputBuffer< ForwardLineData > > & nextStageReserve
Interface to reserve space in the next stage.
void evaluate()
Pass on input/buffer data to the output if you can.
int16_t ThreadID
Thread index/ID type.
IcacheState icacheState
Retry state of icache_port.
FetchQueue requests
Queue of address translated requests from Fetch1.
Fault fault
Fill in a fault if one happens during fetch, check this by picking apart the response packet.
Line fetch data in the forward direction.
bool recvTimingResp(PacketPtr pkt)
Receive a timing response from the peer.
InstSeqNum predictionSeqNum
Prediction sequence number.
InstSeqNum streamSeqNum
Stream sequence number.
void handleTLBResponse(FetchRequestPtr response)
Handle pushing a TLB response onto the right queue.
virtual void recvReqRetry()
MinorCPU & cpu
Construction-assigned data members.
bool isComplete() const
Is this a complete read line or fault.
void processResponse(FetchRequestPtr response, ForwardLineData &line)
Convert a response to a ForwardLineData.
std::shared_ptr< Request > RequestPtr
unsigned int numFetchesInITLB
Number of requests inside the ITLB rather than in the queues.
Fetch1 & fetch
Owning fetch unit.
FetchState
Cycle-by-cycle state.
Latch< BranchData >::Output prediction
Input port carrying branch predictions from Fetch2.
A similar adaptor but for elements held by pointer ElemType should implement ReportIF.
void popAndDiscard(FetchQueue &queue)
Pop a request from the given queue and correctly deallocate and discard it.
void changeStream(const BranchData &branch)
Start fetching from a new address.
void makePacket()
Make a packet to use with the memory transaction.
bool blocked
Blocked indication for report.
A stage responsible for fetching "lines" from memory and passing them to Fetch2.
void moveFromRequestsToTransfers(FetchRequestPtr request)
Move a request between queues.
void wakeupFetch(ThreadID tid)
Initiate fetch1 fetching.
unsigned int fetchLimit
Maximum number of fetches allowed in flight (in queues or memory)
MinorCPU::MinorCPUPort & getIcachePort()
Returns the IcachePort owned by this Fetch1.
FetchRequestState
Progress of this request through address translation and memory.
virtual bool recvTimingResp(PacketPtr pkt)
Memory interface.
Latch< ForwardLineData >::Input out
Output port carrying read lines to Fetch2.
RequestPtr request
The underlying request that this fetch represents.
PacketPtr packet
FetchRequests carry packets while they're in the requests and transfers responses queues.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Latch< BranchData >::Output inp
Input port carrying branch requests from Execute.
void reportData(std::ostream &os) const
Report interface.
A virtual base opaque structure used to hold state associated with the packet (e.g....
MinorCPU is an in-order CPU model with four fixed pipeline stages:
InstSeqNum lineSeqNum
Sequence number for line fetch used for ordering lines to flush.
Wrapper for a queue type to act as a pipeline stage input queue.
Fetch1ThreadInfo(const Fetch1ThreadInfo &other)
unsigned int numInFlightFetches()
Returns the total number of queue occupancy, in-ITLB and in-memory system fetches.
friend std::ostream & operator<<(std::ostream &os, Fetch1::FetchState state)
std::shared_ptr< FaultBase > Fault
bool isDiscardable() const
Is this line out of date with the current stream/prediction sequence and can it be discarded without ...
MinorCPUPort(const std::string &name_, MinorCPU &cpu_)
Provide a non-protected base class for Minor's Ports as derived classes are created by Fetch1 and Exe...
bool tryToSend(FetchRequestPtr request)
Try to send (or resend) a memory request's next/only packet to the memory system.
ThreadID getScheduledThread()
Use the current threading policy to determine the next thread to fetch from.
constexpr decltype(nullptr) NoFault
Fetch1(const std::string &name_, MinorCPU &cpu_, MinorCPUParams ¶ms, Latch< BranchData >::Output inp_, Latch< ForwardLineData >::Input out_, Latch< BranchData >::Output prediction_, std::vector< InputBuffer< ForwardLineData >> &next_stage_input_buffer)
const std::string name() const
Return port name (for DPRINTF).
void fetchLine(ThreadID tid)
Insert a line fetch into the requests.
Stage cycle-by-cycle state.
std::vector< Fetch1ThreadInfo > fetchInfo
void tryToSendToTransfers(FetchRequestPtr request)
Try and issue a fetch for a translated request at the head of the requests queue.
void stepQueues()
Step requests along between requests and transfers queues.
TheISA::PCState pc
PC to fixup with line address.
Forward data betwen Execute and Fetch1 carrying change-of-address/stream information.
TheISA::PCState pc
Fetch PC value.
void updateExpectedSeqNums(const BranchData &branch)
Update streamSeqNum and predictionSeqNum from the given branch (and assume these have changed and dis...
FetchQueue transfers
Queue of in-memory system requests and responses.
GenericISA::DelaySlotPCState< MachInst > PCState
unsigned int numFetchesInMemorySystem
Count of the number fetches which have left the transfers queue and are in the 'wild' in the memory s...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void finish(const Fault &fault_, const RequestPtr &request_, ThreadContext *tc, BaseTLB::Mode mode)
Interface for ITLB responses.
bool isDrained()
Is this stage drained? For Fetch1, draining is initiated by Execute signalling a branch with the reas...
unsigned int lineSnap
Line snap size in bytes.
void minorTraceResponseLine(const std::string &name, FetchRequestPtr response) const
Print the appropriate MinorLine line for a fetch response.
unsigned int maxLineWidth
Maximum fetch width in bytes.
FetchRequest(Fetch1 &fetch_, InstId id_, TheISA::PCState pc_)
const std::string & name() const
void markDelayed()
BaseTLB::Translation interface.
InstId id
Identity of the line that this request will generate.
void recvReqRetry()
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
FetchRequest * FetchRequestPtr
IcachePort(std::string name, Fetch1 &fetch_, MinorCPU &cpu)
Id for lines and instructions.
Fetch1ThreadInfo()
Consturctor to initialize all fields.
bool wakeupGuard
Signal to guard against sleeping first cycle of wakeup.
Queue< FetchRequestPtr, ReportTraitsPtrAdaptor< FetchRequestPtr >, NoBubbleTraits< FetchRequestPtr > > FetchQueue
IcacheState
State of memory access for head instruction fetch.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17