Public Member Functions | Data Fields

FunctionalUnit Class Reference

Represents a functional unit in the CPU. More...

#include <FunctionalUnit.h>

Inheritance diagram for FunctionalUnit:
McPATComponent

Public Member Functions

 FunctionalUnit (ParseXML *XML_interface, int ithCore_, InputParameter *interface_ip_, const CoreDynParam &dyn_p_, enum FU_type fu_type)
void computeEnergy (bool is_tdp=true)
void displayEnergy (uint32_t indent=0, int plevel=100, bool is_tdp=true)
void SSTcomputeEnergy (bool is_tdp=true, double alu_access=0, double mul_access=0, double fpu_access=0)
void SSTleakage_feedback (double temperature)
 FunctionalUnit (FunctionalUnitTypes type, const char *name, unsigned int id)
 Constructor.
 ~FunctionalUnit ()
 Destructor.
void setNext (FunctionalUnit *other)
 Attach list link.
FunctionalUnitgetNext ()
 Retrieve list link.
FunctionalUnitTypes getType ()
 Retrieve unit type.
CycleCount occupiedUntil (CycleCount atCycle)
 Get cycle this unit is occupied until (inclusive).
int occupy (CycleCount atCycle, CycleCount numCycles)
 Assign instruction to occupy this unit for a period of time.
int updateStatus (CycleCount currentCycle)
 Update occupied status.
void flush (CycleCount atCycle)
bool isAvailable (CycleCount atCycle)
 Check if unit is available right now.
double dutyCycle ()
 Report duty cycle of unit.

Data Fields

ParseXMLXML
int ithCore
InputParameter interface_ip
CoreDynParam coredynp
double FU_height
double clockRate
double executionTime
double num_fu
double energy
double base_energy
double per_access_energy
bool is_default
enum FU_type fu_type
statsDef tdp_stats
statsDef rtp_stats
statsDef stats_t
powerDef power_t

Detailed Description

Represents a functional unit in the CPU.

This keeps track of when a functional unit is occupied, and lets an instruction occupy it for a length of time. One object of this class will represent one functional unit.


Member Function Documentation

int FunctionalUnit::updateStatus ( CycleCount  currentCycle  ) 

Update occupied status.

For an occupied functional unit, this finishes the occupation if the cycle count is reached, and tells the instruction that it is executing (because of pipelining it may not actually be done yet).


The documentation for this class was generated from the following files: