46 #include "debug/MinorTiming.hh"
47 #include "enums/OpClass.hh"
50 MinorOpClassParams::create()
56 MinorOpClassSetParams::create()
62 MinorFUTimingParams::create()
68 MinorFUParams::create()
74 MinorFUPoolParams::create()
81 opClasses(params->opClasses),
84 capabilityList(
Num_OpClasses, (opClasses.empty() ? true : false))
91 const MinorFUTimingParams *params) :
95 description(params->description),
96 suppress(params->suppress),
97 extraCommitLat(params->extraCommitLat),
98 extraCommitLatExpr(params->extraCommitLatExpr),
99 extraAssumedLat(params->extraAssumedLat),
100 srcRegsRelativeLats(params->srcRegsRelativeLats),
101 opClasses(params->opClasses)
110 inst->reportData(os);
116 description(description_),
117 timeSource(timeSource_),
118 nextInsertCycle(
Cycles(0))
138 if (
DTRACE(MinorTiming)) {
139 std::ostringstream lats;
143 while (j < num_lats) {
151 DPRINTFS(MinorTiming, static_cast<Named *>(
this),
152 "Adding extra timing decode pattern %d to FU"
153 " mask: %016x match: %016x srcRegLatencies: %s\n",
163 for (
auto i = cant_forward.begin();
i != cant_forward.end(); ++
i) {
205 #if THE_ISA == ARM_ISA
210 uint64_t mach_inst = 0;
215 unsigned int num_timings = timings.size();
217 for (
unsigned int i = 0;
i < num_timings;
i++) {
221 (mach_inst & timing.
mask) == timing.
match)
223 DPRINTFS(MinorTiming, static_cast<Named *>(
this),
224 "Found extra timing match (pattern %d '%s')"
225 " %s %16x (type %s)\n",
227 typeid(inst).
name());
233 if (num_timings != 0) {
234 DPRINTFS(MinorTiming, static_cast<Named *>(
this),
235 "No extra timing info. found for inst: %s"
236 " mach_inst: %16x\n",
Wrapper for a matchable set of op classes.
const std::string & name() const
Cycles is a wrapper class for representing cycle counts, i.e.
MinorOpClassSet * opClasses
const std::string & name()
Execute function unit descriptions and pipeline implementations.
MinorOpClassSet(const MinorOpClassSetParams *params)
virtual const std::string & disassemble(Addr pc, const SymbolTable *symtab=0) const
Return string representation of disassembled instruction.
A collection of MinorFUs.
void addCapability(OpClass cap, unsigned oplat, bool pipelined)
Cycles nextInsertCycle
When can a new instruction be inserted into the pipeline? This is an absolute cycle time unless it is...
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
A functional unit that can execute any of opClasses operations with a single op(eration)Lat(ency) and...
Cycles opLat
Delay from issuing the operation, to it reaching the end of the associated pipeline.
const MinorFU & description
Functional unit description that this pipeline implements.
void advance()
Try to advance the pipeline.
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
const ExtMachInst machInst
The binary machine instruction.
std::vector< MinorFUTiming * > timings
Extra timing info to give timings to individual ops.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
ClockedObject & timeSource
An FUPipeline needs access to curCycle, use this timing source.
MinorFUTiming(const MinorFUTimingParams *params)
void reportData(std::ostream &os) const
Report and bubble interfaces.
std::vector< Cycles > srcRegsRelativeLats
Cycle offsets from the scoreboard delivery times of register values for each of this instruction's so...
Extra timing capability to allow individual ops to have their source register dependency latencies tw...
MinorFUTiming * findTiming(const StaticInstPtr &inst)
Find the extra timing information for this instruction.
std::vector< bool > capabilityList
Convenience packing of opClasses into a bit vector for easier testing.
std::vector< unsigned int > cantForwardFromFUIndices
FUs which this pipeline can't receive a forwarded (i.e.
bool alreadyPushed()
Have we already pushed onto this pipe without advancing.
bool provides(OpClass op_class)
Does the extra decode in this object support the given op class.
Cycles cyclesBeforeInsert()
How many cycles must from curCycle before insertion into the pipeline is allowed. ...
Boxing for MinorOpClass to get around a build problem with C++11 but also allow for future additions ...
void advance()
Step the pipeline.
static const OpClass Num_OpClasses
uint64_t mask
Mask off the ExtMachInst of an instruction before comparing with match.
A pipeline simulating class that will stall (not advance when advance() is called) if a non-bubble va...
std::vector< MinorOpClass * > opClasses
FUPipeline(const std::string &name, const MinorFU &description_, ClockedObject &timeSource_)
bool canInsert() const
Can an instruction be inserted now?
bool stalled
If true, advance will not advance the pipeline.
std::vector< bool > cantForwardFromFUIndices
FUs which this pipeline can't receive a forwarded (i.e.
Cycles issueLat
Delay after issuing an operation before the next operation can be issued.
Abstract superclass for simulation objects.
std::string description
Textual description of the decode's purpose.