OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CostEstimator::ICDecoderEstimatorPlugin Class Reference

#include <ICDecoderEstimatorPlugin.hh>

Inheritance diagram for CostEstimator::ICDecoderEstimatorPlugin:
Inheritance graph
Collaboration diagram for CostEstimator::ICDecoderEstimatorPlugin:
Collaboration graph

Public Member Functions

 ICDecoderEstimatorPlugin (const std::string &name)
 
virtual ~ICDecoderEstimatorPlugin ()
 
virtual bool estimateICDelayOfPath (HDB::HDBRegistry &hdbRegistry, const TransportPath &path, const IDF::MachineImplementation &machineImplementation, const IDF::SocketImplementationLocation &sourceSocketImplementation, const IDF::BusImplementationLocation &busImplementation, const IDF::SocketImplementationLocation &destinationSocketImplementation, DelayInNanoSeconds &delay)
 
virtual bool estimateICArea (HDB::HDBRegistry &hdbRegistry, const TTAMachine::Machine &machine, const IDF::MachineImplementation &machineImplementation, AreaInGates &area)
 
virtual bool estimateICEnergy (HDB::HDBRegistry &hdbRegistry, const TTAMachine::Machine &machine, const IDF::MachineImplementation &machineImplementation, const TTAProgram::Program &program, const ExecutionTrace &traceDB, EnergyInMilliJoules &energy)
 
virtual TTAMachine::ControlUnitgenerateControlUnit ()
 
- Public Member Functions inherited from CostEstimator::CostEstimationPlugin
 CostEstimationPlugin (const std::string &name)
 
virtual ~CostEstimationPlugin ()
 
virtual std::string name () const
 
virtual std::string description () const
 

Additional Inherited Members

- Protected Attributes inherited from CostEstimator::CostEstimationPlugin
std::string name_
 the name of the plugin class in the HDB; used to identify cost data
 

Detailed Description

Base class for plugins that are able to estimate costs of a IC and decoder combination.

Definition at line 64 of file ICDecoderEstimatorPlugin.hh.

Constructor & Destructor Documentation

◆ ICDecoderEstimatorPlugin()

CostEstimator::ICDecoderEstimatorPlugin::ICDecoderEstimatorPlugin ( const std::string &  name)

Constructor.

Parameters
nameThe name of the cost estimation plugin in the HDB.
dataSourceThe HDB that stores the cost estimation data of the plugin. This reference can also be used to add new data, in case required by the algorithm.

Definition at line 49 of file ICDecoderEstimatorPlugin.cc.

50 :
52}
CostEstimationPlugin(const std::string &name)

◆ ~ICDecoderEstimatorPlugin()

CostEstimator::ICDecoderEstimatorPlugin::~ICDecoderEstimatorPlugin ( )
virtual

Destructor.

Definition at line 57 of file ICDecoderEstimatorPlugin.cc.

57 {
58}

Member Function Documentation

◆ estimateICArea()

bool CostEstimator::ICDecoderEstimatorPlugin::estimateICArea ( HDB::HDBRegistry hdbRegistry,
const TTAMachine::Machine machine,
const IDF::MachineImplementation machineImplementation,
AreaInGates area 
)
virtual

Estimates the area of the IC of the given machine.

Parameters
hdbRegistryThe registry for accessing HDBs.
machineArchitecture of the machine.
machineImplementationThe implementation of the machine.
areaThe calculated area should be stored in this argument.
Returns
True in case the area can be estimated, false if it cannot.

Reimplemented in DefaultICDecoderEstimator.

Definition at line 102 of file ICDecoderEstimatorPlugin.cc.

106 {
107
108 return false;
109}

Referenced by CostEstimator::Estimator::icArea().

◆ estimateICDelayOfPath()

bool CostEstimator::ICDecoderEstimatorPlugin::estimateICDelayOfPath ( HDB::HDBRegistry hdbRegistry,
const TransportPath path,
const IDF::MachineImplementation machineImplementation,
const IDF::SocketImplementationLocation sourceSocketImplementation,
const IDF::BusImplementationLocation busImplementation,
const IDF::SocketImplementationLocation destinationSocketImplementation,
DelayInNanoSeconds delay 
)
virtual

Estimates the delay of the given path in the interconnection network.

The estimated path starts from source socket and traverses through a bus to a target socket. The delay caused by reading and writing from ports are not included in this value. The default implementation returns false to signal that the estimation functionality is not implemented by the plugin.

Parameters
hdbRegistryThe registry for accessing HDBs.
pathThe path.
machineImplementationThe implementation of the machine.
sourceSocketImplementationThe implementation identification of the source socket.
busImplementationThe implementation identification of the bus.
destinationSocketImplementationThe implementation identification of the destination socket.
delayThe calculated delay should be stored in this argument.
Returns
True in case the delay can be estimated, false if it cannot.

Reimplemented in DefaultICDecoderEstimator.

Definition at line 80 of file ICDecoderEstimatorPlugin.cc.

87 {
88
89 return false;
90}

Referenced by CostEstimator::Estimator::estimateSocketToSocketDelayOfPath().

◆ estimateICEnergy()

bool CostEstimator::ICDecoderEstimatorPlugin::estimateICEnergy ( HDB::HDBRegistry hdbRegistry,
const TTAMachine::Machine machine,
const IDF::MachineImplementation machineImplementation,
const TTAProgram::Program program,
const ExecutionTrace traceDB,
EnergyInMilliJoules energy 
)
virtual

Estimates the energy consumed by the IC of the given machine by running the given program.

Parameters
hdbRegistryThe registry for accessing HDBs.
machineArchitecture of the processor.
machineImplementationImplementation defintions of the processor.
traceDBThe simulation trace database obtained from running the program.
energyThe calculated energy should be stored in this argument.
Returns
True in case energy can be estimated, false if it cannot.

Reimplemented in DefaultICDecoderEstimator.

Definition at line 124 of file ICDecoderEstimatorPlugin.cc.

130 {
131
132 return false;
133}

Referenced by CostEstimator::Estimator::icEnergy().

◆ generateControlUnit()

TTAMachine::ControlUnit * CostEstimator::ICDecoderEstimatorPlugin::generateControlUnit ( )
virtual

Generates a control unit.

Returns
The control unit.

Definition at line 141 of file ICDecoderEstimatorPlugin.cc.

141 {
142
143 const std::string RA_PORT_NAME = "ra";
144 const std::string OP_PORT_NAME = "pc";
145 const std::string OPNAME_JUMP = "jump";
146 const std::string OPNAME_CALL = "call";
147 const std::string COMP_DEFAULT_NAME_GCU = "gcu";
148
149 // Add default ports.
151 COMP_DEFAULT_NAME_GCU, 3, 1);
152
153 TTAMachine::FUPort* opPort =
154 new TTAMachine::FUPort(OP_PORT_NAME, 32, *gcu, true, true);
156 new TTAMachine::SpecialRegisterPort(RA_PORT_NAME, 32, *gcu);
157
158 gcu->setReturnAddressPort(*raPort);
159
160 // Add default operations.
162 new TTAMachine::HWOperation(OPNAME_JUMP, *gcu);
163 jump->bindPort(1, *opPort);
164 jump->pipeline()->addPortRead(1, 0, 1);
165
167 new TTAMachine::HWOperation(OPNAME_CALL, *gcu);
168 call->bindPort(1, *opPort);
169 call->pipeline()->addPortRead(1, 0, 1);
170
171 return gcu;
172}
void setReturnAddressPort(const SpecialRegisterPort &port)
void addPortRead(int operand, int start, int duration)
ExecutionPipeline * pipeline() const
virtual void bindPort(int operand, const FUPort &port)

References TTAMachine::ExecutionPipeline::addPortRead(), TTAMachine::HWOperation::bindPort(), TTAMachine::HWOperation::pipeline(), and TTAMachine::ControlUnit::setReturnAddressPort().

Here is the call graph for this function:

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