44 #include "debug/MinorTiming.hh" 45 #include "enums/OpClass.hh" 48 MinorOpClassParams::create()
54 MinorOpClassSetParams::create()
60 MinorFUTimingParams::create()
66 MinorFUParams::create()
72 MinorFUPoolParams::create()
79 opClasses(params->opClasses),
82 capabilityList(
Num_OpClasses, (opClasses.empty() ? true : false))
89 const MinorFUTimingParams *
params) :
93 description(params->description),
94 suppress(params->suppress),
95 extraCommitLat(params->extraCommitLat),
96 extraCommitLatExpr(params->extraCommitLatExpr),
97 extraAssumedLat(params->extraAssumedLat),
98 srcRegsRelativeLats(params->srcRegsRelativeLats),
106 QueuedInst::reportData(std::ostream &
os)
const 108 inst->reportData(os);
111 FUPipeline::FUPipeline(
const std::string &
name,
const MinorFU &description_,
115 timeSource(timeSource_),
116 nextInsertCycle(
Cycles(0))
136 if (
DTRACE(MinorTiming)) {
137 std::ostringstream lats;
141 while (j < num_lats) {
149 DPRINTFS(MinorTiming, static_cast<Named *>(
this),
150 "Adding extra timing decode pattern %d to FU" 151 " mask: %016x match: %016x srcRegLatencies: %s\n",
161 for (
auto i = cant_forward.begin();
i != cant_forward.end(); ++
i) {
203 #if THE_ISA == ARM_ISA 208 uint64_t mach_inst = 0;
213 unsigned int num_timings = timings.size();
215 for (
unsigned int i = 0;
i < num_timings;
i++) {
219 (mach_inst & timing.
mask) == timing.
match)
221 DPRINTFS(MinorTiming, static_cast<Named *>(
this),
222 "Found extra timing match (pattern %d '%s')" 223 " %s %16x (type %s)\n",
225 typeid(inst).
name());
231 if (num_timings != 0) {
232 DPRINTFS(MinorTiming, static_cast<Named *>(
this),
233 "No extra timing info. found for inst: %s" 234 " mach_inst: %16x\n",
virtual const std::string & disassemble(Addr pc, const Loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
Wrapper for a matchable set of op classes.
Cycles is a wrapper class for representing cycle counts, i.e.
MinorOpClassSet * opClasses
Execute function unit descriptions and pipeline implementations.
MinorOpClassSet(const MinorOpClassSetParams *params)
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...
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
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.
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)
Cycles curCycle() const
Determine the current cycle, corresponding to a tick aligned to a clock edge.
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...
const Params * params() const
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.
const std::string & name() const
OpClass opClass() const
Operation class. Used to select appropriate function unit in issue.
bool alreadyPushed()
Have we already pushed onto this pipe without advancing.
virtual const std::string name() const
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
bool canInsert() const
Can an instruction be inserted now?
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
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.