46#include "debug/MinorTiming.hh"
47#include "enums/OpClass.hh"
54 opClasses(params.opClasses),
57 capabilityList(
Num_OpClasses, (opClasses.empty() ? true : false))
64 const MinorFUTimingParams ¶ms) :
68 description(params.description),
69 suppress(params.suppress),
70 extraCommitLat(params.extraCommitLat),
71 extraCommitLatExpr(params.extraCommitLatExpr),
72 extraAssumedLat(params.extraAssumedLat),
73 srcRegsRelativeLats(params.srcRegsRelativeLats),
74 opClasses(params.opClasses)
89 description(description_),
90 timeSource(timeSource_),
111 if (debug::MinorTiming) {
112 std::ostringstream lats;
116 while (j < num_lats) {
125 "Adding extra timing decode pattern %d to FU"
126 " mask: %016x match: %016x srcRegLatencies: %s\n",
136 for (
auto i = cant_forward.begin();
i != cant_forward.end(); ++
i) {
183 uint64_t mach_inst = inst->
getEMI();
187 unsigned int num_timings = timings.size();
189 for (
unsigned int i = 0;
i < num_timings;
i++) {
193 (mach_inst & timing.
mask) == timing.
match)
196 "Found extra timing match (pattern %d '%s')"
197 " %s %16x (type %s)\n",
199 typeid(inst).name());
205 if (num_timings != 0) {
207 "No extra timing info. found for inst: %s"
208 " mach_inst: %16x\n",
#define DPRINTFS(x, s,...)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
Cycles is a wrapper class for representing cycle counts, i.e.
void addCapability(OpClass cap, unsigned oplat, bool pipelined)
Extra timing capability to allow individual ops to have their source register dependency latencies tw...
std::vector< Cycles > srcRegsRelativeLats
Cycle offsets from the scoreboard delivery times of register values for each of this instruction's so...
std::string description
Textual description of the decode's purpose.
uint64_t mask
Mask off the ExtMachInst of an instruction before comparing with match.
bool provides(OpClass op_class)
Does the extra decode in this object support the given op class.
MinorFUTiming(const MinorFUTimingParams ¶ms)
A functional unit that can execute any of opClasses operations with a single op(eration)Lat(ency) and...
Cycles issueLat
Delay after issuing an operation before the next operation can be issued.
std::vector< unsigned int > cantForwardFromFUIndices
FUs which this pipeline can't receive a forwarded (i.e.
MinorOpClassSet * opClasses
Cycles opLat
Delay from issuing the operation, to it reaching the end of the associated pipeline.
std::vector< MinorFUTiming * > timings
Extra timing info to give timings to individual ops.
std::vector< MinorOpClass * > opClasses
std::vector< bool > capabilityList
Convenience packing of opClasses into a bit vector for easier testing.
MinorOpClassSet(const MinorOpClassSetParams ¶ms)
Interface for things with names.
Abstract superclass for simulation objects.
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
virtual uint64_t getEMI() const
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
const MinorFU & description
Functional unit description that this pipeline implements.
Cycles nextInsertCycle
When can a new instruction be inserted into the pipeline? This is an absolute cycle time unless it is...
FUPipeline(const std::string &name, const MinorFU &description_, ClockedObject &timeSource_)
std::vector< bool > cantForwardFromFUIndices
FUs which this pipeline can't receive a forwarded (i.e.
Cycles cyclesBeforeInsert()
How many cycles must from curCycle before insertion into the pipeline is allowed.
bool canInsert() const
Can an instruction be inserted now?
void advance()
Step the pipeline.
MinorFUTiming * findTiming(const StaticInstPtr &inst)
Find the extra timing information for this instruction.
ClockedObject & timeSource
An FUPipeline needs access to curCycle, use this timing source.
void reportData(std::ostream &os) const
Report and bubble interfaces.
A pipeline simulating class that will stall (not advance when advance() is called) if a non-bubble va...
bool alreadyPushed()
Have we already pushed onto this pipe without advancing.
bool stalled
If true, advance will not advance the pipeline.
void advance()
Try to advance the pipeline.
Execute function unit descriptions and pipeline implementations.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
static const OpClass Num_OpClasses
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
const std::string & name()