OpenASIP
2.0
|
#include <HWOperation.hh>
Public Member Functions | |
HWOperation (const std::string &name, FunctionUnit &parent) | |
HWOperation (const ObjectState *state, FunctionUnit &parent) | |
~HWOperation () | |
const std::string & | name () const |
virtual void | setName (const std::string &name) |
FunctionUnit * | parentUnit () const |
ExecutionPipeline * | pipeline () const |
int | latency () const |
int | latency (int output) const |
int | slack (int input) const |
virtual void | bindPort (int operand, const FUPort &port) |
virtual void | unbindPort (const FUPort &port) |
int | operandCount () const |
virtual FUPort * | port (int operand) const |
bool | isBound (const FUPort &port) const |
bool | isBound (int operand) const |
int | io (const FUPort &port) const |
int | numberOfInputs () const |
int | numberOfOutputs () const |
virtual ObjectState * | saveState () const |
virtual void | loadState (const ObjectState *state) |
Public Member Functions inherited from Serializable | |
virtual | ~Serializable () |
Static Public Attributes | |
static const std::string | OSNAME_OPERATION = "operation" |
ObjectState name for HWOperation. More... | |
static const std::string | OSKEY_NAME = "name" |
ObjectState attribute key for name of the operation. More... | |
static const std::string | OSNAME_OPERAND_BINDING = "binding" |
ObjectState name for an operand binding. More... | |
static const std::string | OSKEY_OPERAND = "operand" |
ObjectState attribute key for operand index. More... | |
static const std::string | OSKEY_PORT = "port" |
ObjectState attribute key for port name. More... | |
Private Types | |
typedef std::map< int, const FUPort * > | OperandBindingMap |
Map for mapping operand indexes to FUPorts. More... | |
Private Attributes | |
std::string | name_ |
Name of the operation. More... | |
ExecutionPipeline * | pipeline_ |
Pipeline of the operation. More... | |
FunctionUnit * | parent_ |
The parent unit. More... | |
OperandBindingMap | operandBinding_ |
Maps operands of operation to particular ports of the parent unit. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from TTAMachine::SubComponent | |
SubComponent () | |
virtual | ~SubComponent () |
Protected Member Functions inherited from TTAMachine::MachinePart | |
MachinePart () | |
virtual | ~MachinePart () |
Represents an operation of the function unit.
Definition at line 52 of file HWOperation.hh.
|
private |
Map for mapping operand indexes to FUPorts.
Definition at line 94 of file HWOperation.hh.
TTAMachine::HWOperation::HWOperation | ( | const std::string & | name, |
FunctionUnit & | parent | ||
) |
Constructor.
name | Name of the operation. |
parent | The parent unit. |
ComponentAlreadyExists | If there is already an operation by the same name in the given function unit. |
InvalidName | If the given name is not valid for a component. |
Definition at line 67 of file HWOperation.cc.
References TTAMachine::FunctionUnit::addOperation(), MachineTester::isValidComponentName(), name(), name_, parent_, pipeline_, StringTools::stringToLower(), Texts::TextGenerator::text(), and MOMTextGenerator::TXT_INVALID_NAME.
TTAMachine::HWOperation::HWOperation | ( | const ObjectState * | state, |
FunctionUnit & | parent | ||
) |
Constructor.
Loads the state of the operation from the given ObjectState instance.
state | The ObjectState instance. |
parent | The parent unit. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 95 of file HWOperation.cc.
References TTAMachine::FunctionUnit::addOperation(), Exception::errorMessage(), loadState(), OSKEY_NAME, parent_, pipeline_, setName(), and ObjectState::stringAttribute().
TTAMachine::HWOperation::~HWOperation | ( | ) |
Destructor.
Definition at line 127 of file HWOperation.cc.
References TTAMachine::FunctionUnit::deleteOperation(), parent_, parentUnit(), and pipeline_.
|
virtual |
Binds the given operand of the operation to the given port of the function unit.
If the given operand is already bound to another port, the old binding is replaced with the new one.
operand | Index of the operand. |
port | The port. |
IllegalRegistration | If the given port does not belong to the same function unit as this operation. |
ComponentAlreadyExists | If the given port is already reserved for another operand. |
OutOfRange | If the given operand is less than 1. |
Reimplemented in SmartHWOperation.
Definition at line 269 of file HWOperation.cc.
References MapTools::containsValue(), operandBinding_, TTAMachine::BaseFUPort::parentUnit(), parentUnit(), port(), and TTAMachine::FUPort::updateBindingString().
Referenced by VectorLSGenerator::addOperation(), HDB::HDBManager::addPortsAndBindingsToFUArchitecture(), BlocksMUL::BindPorts(), BlocksALU::BindPorts(), BlocksLSU::BindPorts(), OpsetDialog::bindPorts(), BlocksGCU::BindPorts(), UniversalMachine::construct(), AddGCUCmd::Do(), CostEstimator::ICDecoderEstimatorPlugin::generateControlUnit(), and loadState().
int TTAMachine::HWOperation::io | ( | const FUPort & | port | ) | const |
Returns the index of the input or output that is bound to the given port.
port | The port. |
InstanceNotFound | If no io is bound to the given port. |
Definition at line 364 of file HWOperation.cc.
References isBound(), name(), TTAMachine::Port::name(), operandBinding_, and port().
Referenced by ProgrammabilityValidator::addConnectionToProgram(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createFUPort(), llvm::LLVMTCEPOMBuilder::createFUTerminal(), createTerminalFUPort(), SocketBusConnCmd::Do(), ProGe::NetlistGenerator::findCorrespondingPort(), TTAProgram::TerminalFUPort::findNewOperationIndex(), ProgramOperation::findTriggerFromUnit(), BasicBlockScheduler::findTriggerFromUnit(), MachineResourceManager::functionUnitPortResource(), HDB::HDBManager::isMatchingArchitecture(), ExecutionPipelineResource::nodeOfInputPort(), MachineInfo::operandFromPort(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), HDB::FUArchitecture::operator==(), ProgramOperation::outputIndexFromGuard(), TTAProgram::TerminalFUPort::TerminalFUPort(), TTAProgram::ProgramWriter::terminalResource(), FUPortImplementationDialog::TransferDataToWindow(), MachineInfo::triggerIndex(), and FUImplementationDialog::update().
bool TTAMachine::HWOperation::isBound | ( | const FUPort & | port | ) | const |
Checks whether the given port is bound to one of the operands of the operation.
port | The port. |
Definition at line 338 of file HWOperation.cc.
References MapTools::containsValue(), operandBinding_, and port().
Referenced by HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), VectorLSGenerator::addOperation(), MachineStateBuilder::addPortToFU(), TTAProgram::ProgramWriter::createCodeSection(), SocketBusConnCmd::Do(), ProGe::NetlistGenerator::findCorrespondingPort(), MachineInfo::getBoundPort(), io(), HDB::HDBManager::isMatchingArchitecture(), loadState(), HDB::FUArchitecture::operator==(), SmartHWOperation::port(), FUPortImplementationDialog::TransferDataToWindow(), FUImplementationDialog::update(), and TTAMachine::FUPort::updateBindingString().
bool TTAMachine::HWOperation::isBound | ( | int | operand | ) | const |
Checks whetever the given operand is bound to some port.
operand | The operand. |
Definition at line 349 of file HWOperation.cc.
References MapTools::containsKey(), operandBinding_, and THROW_EXCEPTION.
int TTAMachine::HWOperation::latency | ( | ) | const |
Returns the number of cycles used during execution of the operation.
Different results may have different latencies, thus this is the longest latency of any result produced by the operation. After this latency the operation execution has been finished and no results will be produced.
Definition at line 216 of file HWOperation.cc.
References TTAMachine::ExecutionPipeline::latency(), and pipeline_.
Referenced by AddFUFromHDBDialog::acceptToList(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), MultiLatencyOperationExecutor::advanceClock(), ControlFlowGraph::buildMBBFromBB(), ExecutionPipelineResource::canAssignSource(), FUGen::checkForValidity(), FullyConnectedCheck::connectFUPort(), FUTestbenchGenerator::createStimulus(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), MoveNode::earliestResultReadCycle(), ExecutionPipelineResourceTable::ExecutionPipelineResourceTable(), HDBBrowserWindow::fuArchLabel(), HDBToHtml::fuArchToHtml(), CompiledSimCodeGenerator::generateLoadTrigger(), ProGe::RV32MicroCodeGenerator::generateOperationLatencyLogic(), CompiledSimCodeGenerator::generateTriggerCode(), CompiledSimCodeGenerator::handleOperation(), CompiledSimCodeGenerator::handleOperationWithoutDag(), HDB::HDBManager::isMatchingArchitecture(), DataDependenceEdge::latencySt(), ExecutionPipelineBroker::latestFromDestination(), MoveNode::latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), AddFUFromHDBDialog::loadHDB(), TTAMachine::FunctionUnit::maxLatency(), MultiLatencyOperationExecutor::MultiLatencyOperationExecutor(), TTAMachine::FunctionUnit::needsConflictDetection(), AddFUFromHDBDialog::onAdd(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), HDB::FUArchitecture::operator==(), FUGen::parseOperations(), HDB::FUArchitecture::portDirection(), BF2ScheduleFront::prefResultCycle(), printLatexFunctionUnitDescription(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultReadyCycle(), DataDependenceEdge::saveState(), BUBasicBlockScheduler::scheduleMove(), DataDependenceGraph::setMachine(), ExecutionPipelineResource::setResultWriten(), MultiLatencyOperationExecutor::startOperation(), ExecutionPipelineResource::testTriggerResult(), FUPortImplementationDialog::TransferDataToWindow(), and ExecutionPipelineResource::unsetResultWriten().
int TTAMachine::HWOperation::latency | ( | int | output | ) | const |
Returns the latency for the given output.
output | The number of the output. |
IllegalParameters | If the given output is not written in the pipeline. |
Definition at line 230 of file HWOperation.cc.
References TTAMachine::ExecutionPipeline::latency(), and pipeline_.
|
virtual |
Loads the state of the operation from the given ObjectState tree.
state | The ObjectState tree. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Implements Serializable.
Reimplemented in SmartHWOperation.
Definition at line 454 of file HWOperation.cc.
References bindPort(), ObjectState::child(), ObjectState::childByName(), ObjectState::childCount(), Exception::errorMessage(), ObjectState::intAttribute(), isBound(), TTAMachine::ExecutionPipeline::loadState(), name(), TTAMachine::Port::name(), ObjectState::name(), TTAMachine::Component::name(), operandBinding_, TTAMachine::FunctionUnit::operationPort(), OSKEY_NAME, OSKEY_OPERAND, OSKEY_PORT, OSNAME_OPERAND_BINDING, OSNAME_OPERATION, TTAMachine::ExecutionPipeline::OSNAME_PIPELINE, parentUnit(), pipeline(), pipeline_, port(), setName(), ObjectState::stringAttribute(), Texts::TextGenerator::text(), MOMTextGenerator::TXT_OPERAND_ALREADY_BOUND, MOMTextGenerator::TXT_OPERAND_BOUND_TO_PORT, and MOMTextGenerator::TXT_OPERATION_REF_LOAD_ERR_PORT.
Referenced by HWOperation().
const string & TTAMachine::HWOperation::name | ( | ) | const |
Returns the name of the operation.
Definition at line 141 of file HWOperation.cc.
References name_.
Referenced by AddFUFromHDBDialog::acceptToList(), HDB::HDBManager::addFUArchitecture(), HDB::HDBManager::addFUImplementation(), TTAMachine::FunctionUnit::addOperation(), BEMGenerator::addPortCodes(), UniversalFunctionUnit::addSupportedOperation(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), MachineStateBuilder::bindPortsToOperands(), ControlFlowGraph::buildMBBFromBB(), OperationBindingCheck::check(), AddressSpaceCheck::check(), FUValidator::checkOperandBindings(), BEMValidator::checkSocketCodeTable(), FUFactory::createEditPart(), GCUFactory::createEditPart(), FUGen::createFUHeaderComment(), POMDisassembler::createFUPort(), FUTestbenchGenerator::createStimulus(), ConflictDetectionCodeGenerator::detectConflicts(), SocketBusConnCmd::Do(), ProximFUDetailsCmd::Do(), CodeCompressorPlugin::encodeFUTerminal(), InfoProcCommand::execute(), InfoStatsCommand::execute(), ExecutionPipelineResourceTable::ExecutionPipelineResourceTable(), ProGe::NetlistGenerator::findCorrespondingPort(), AlmaIFIntegrator::findMemories(), TTAProgram::TerminalFUPort::findNewOperationIndex(), SimulatorFrontend::finishSimulation(), HDBBrowserWindow::fuArchLabel(), ComponentImplementationSelector::fuArchsByOpSetWithMinLatency(), HDBToHtml::fuArchToHtml(), HDB::HDBManager::fuEntriesByArchitecture(), FUFiniteStateAutomaton::FUFiniteStateAutomaton(), CompiledSimCodeGenerator::generateConstructorCode(), generateHeader(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), CompiledSimCodeGenerator::generateInstruction(), CompiledSimCodeGenerator::generateLoadTrigger(), CompiledSimCodeGenerator::generateStoreTrigger(), CompiledSimCodeGenerator::generateTriggerCode(), MachineInfo::getOpset(), CompiledSimCodeGenerator::handleJump(), CompiledSimCodeGenerator::handleOperation(), CompiledSimCodeGenerator::handleOperationWithoutDag(), HWOperation(), llvm::LLVMTCEBuilder::initDataSections(), io(), HDB::HDBManager::isMatchingArchitecture(), TTAMachine::ExecutionPipeline::latency(), llvm::LLVMTCEIRBuilder::LLVMTCEIRBuilder(), AddFUFromHDBDialog::loadHDB(), loadState(), TTAMachine::ExecutionPipeline::loadState(), MachineInfo::maxMemoryAlignment(), MultiLatencyOperationExecutor::MultiLatencyOperationExecutor(), AddFUFromHDBDialog::onAdd(), DefaultDecoderGenerator::opcode(), ProGe::NetlistGenerator::opcodePortWidth(), TTAProgram::TPEFResourceUpdater::operand(), operandBindingsString(), MachineInfo::operandFromPort(), MachineConnectivityCheck::operandWidth(), DCMFUResourceConflictDetector::operationID(), ReservationTableFUResourceConflictDetector::operationID(), HDB::FUArchitecture::operator==(), MachineInfo::osalOperation(), PlatformIntegrator::parseDataMemories(), ProgrammabilityValidator::printConnection(), printLatexFunctionUnitDescription(), TTAMachine::ResourceVectorSet::ResourceVectorSet(), saveState(), DataDependenceGraph::setMachine(), setName(), TTAProgram::TerminalFUPort::setOperation(), TTAMachine::ExecutionPipeline::slack(), TTAProgram::TerminalFUPort::TerminalFUPort(), TTAProgram::TerminalFUPort::toString(), EntryKeyDataFunctionUnit::toString(), OTAOperationDialog::TransferDataToWindow(), FUPortImplementationDialog::TransferDataToWindow(), FUImplementationDialog::update(), TTAMachine::FUPort::updateBindingString(), TDGen::writeBackendCode(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), and TDGen::writeInstrInfo().
int TTAMachine::HWOperation::numberOfInputs | ( | ) | const |
Returns the number of input ports tied to the operation
Definition at line 384 of file HWOperation.cc.
References TTAMachine::Port::isInput(), operandCount(), and port().
Referenced by UniversalFunctionUnit::addSupportedOperation(), and OTAOperationDialog::TransferDataToWindow().
int TTAMachine::HWOperation::numberOfOutputs | ( | ) | const |
Returns the number of output ports tied to the operation
Definition at line 404 of file HWOperation.cc.
References TTAMachine::Port::isOutput(), operandCount(), and port().
Referenced by UniversalFunctionUnit::addSupportedOperation(), and OTAOperationDialog::TransferDataToWindow().
int TTAMachine::HWOperation::operandCount | ( | ) | const |
Returns number of operands for this operation.
Definition at line 306 of file HWOperation.cc.
References operandBinding_.
Referenced by ProGe::RV32MicroCodeGenerator::addBPorts(), ProGe::RV32MicroCodeGenerator::addIPorts(), ProGe::RV32MicroCodeGenerator::addRPorts(), ProGe::RV32MicroCodeGenerator::addSPorts(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), FUGen::checkForValidity(), getOutputPort(), MachineInfo::getPortBindingsOfOperation(), numberOfInputs(), numberOfOutputs(), FUGen::parseOperations(), and FUGen::scheduleOperations().
FunctionUnit * TTAMachine::HWOperation::parentUnit | ( | ) | const |
Returns the parent unit of the operation.
Definition at line 190 of file HWOperation.cc.
References parent_.
Referenced by TTAMachine::FunctionUnit::addOperation(), TTAMachine::ExecutionPipeline::addPipelineElement(), bindPort(), ControlFlowGraph::buildMBBFromBB(), TTAMachine::FunctionUnit::deleteOperation(), ConflictDetectionCodeGenerator::detectConflicts(), CompiledSimCodeGenerator::generateLoadTrigger(), CompiledSimCodeGenerator::generateStoreTrigger(), CompiledSimCodeGenerator::handleOperation(), CompiledSimCodeGenerator::handleOperationWithoutDag(), TTAMachine::ExecutionPipeline::internalRemoveResourceUse(), TTAMachine::ExecutionPipeline::latency(), loadState(), TTAMachine::ExecutionPipeline::loadState(), DefaultDecoderGenerator::opcode(), TTAProgram::TPEFResourceUpdater::operand(), TTAMachine::ExecutionPipeline::pipelineElement(), TTAMachine::ExecutionPipeline::removeAllResourceUses(), TTAMachine::ExecutionPipeline::removeResourceUse(), ReservationTable::ReservationTable(), setName(), TTAMachine::ExecutionPipeline::slack(), and ~HWOperation().
ExecutionPipeline * TTAMachine::HWOperation::pipeline | ( | ) | const |
Returns the pipeline used by this operation.
Definition at line 201 of file HWOperation.cc.
References pipeline_.
Referenced by HDB::HDBManager::addFUArchitecture(), VectorLSGenerator::addOperation(), HDB::HDBManager::addOperationPipelinesToFUArchitecture(), MachineStateBuilder::addPortToFU(), OperationBindingCheck::check(), FUValidator::checkOperandBindings(), FUValidator::checkOperations(), TTAMachine::FunctionUnit::cleanup(), FullyConnectedCheck::connectFUPort(), ADFCombiner::connectVectorLSU(), UniversalMachine::construct(), BlocksLSU::CreateHWLoadOp(), BlocksALU::CreateHWOp(), BlocksMUL::CreateHWOp(), BlocksGCU::CreateHWOp(), BlocksLSU::CreateHWStoreOp(), OpsetDialog::createOperation(), AddGCUCmd::Do(), llvm::LLVMTCEBuilder::emitOperationMacro(), TTAMachine::ExecutionPipeline::ExecutionPipeline(), ExecutionPipelineResourceTable::ExecutionPipelineResourceTable(), HDBToHtml::fuArchToHtml(), CostEstimator::ICDecoderEstimatorPlugin::generateControlUnit(), HDB::HDBManager::isMatchingArchitecture(), loadState(), AddFUFromHDBDialog::onAdd(), HDB::FUArchitecture::operator==(), HDB::FUArchitecture::portDirection(), ReservationTable::ReservationTable(), TTAMachine::ResourceVectorSet::ResourceVectorSet(), SmartHWOperation::SmartHWOperation(), FUPortImplementationDialog::TransferDataToWindow(), and TTAMachine::PipelineElement::~PipelineElement().
|
virtual |
Returns the port of the function unit that is bound to the given operand.
Returns NULL if no port is bound to the given operand.
operand | Index of the operand. |
Reimplemented in SmartHWOperation.
Definition at line 320 of file HWOperation.cc.
References operandBinding_.
Referenced by ProGe::RV32MicroCodeGenerator::addBPorts(), RegisterCopyAdder::addConnectionRegisterCopies(), ProGe::RV32MicroCodeGenerator::addIPorts(), ProGe::RV32MicroCodeGenerator::addRPorts(), ProGe::RV32MicroCodeGenerator::addSPorts(), ProGe::RV32MicroCodeGenerator::addUJPorts(), OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), bindPort(), MachineStateBuilder::bindPortsToOperands(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToFU(), ExecutionPipelineResource::canAssignDestination(), ExecutionPipelineResource::canAssignSource(), MachineConnectivityCheck::canBypassOpToDst(), OperationBindingCheck::check(), FUGen::checkForValidity(), MachineValidator::checkIMemAddrWidth(), MachineValidator::checkJumpAndCallOperandBindings(), FUValidator::checkOperandBindings(), FUValidator::checkOperations(), MachineValidator::checkProgramCounterPort(), MachineValidator::checkRAPortHasSameWidthAsPCPort(), ADFCombiner::connectVectorLSU(), MachineConnectivityCheck::copyOpFUs(), ExecutionPipelineBroker::earliestFromSource(), ProGe::NetlistGenerator::findCorrespondingPort(), TTAProgram::TPEFProgramFactory::findGuard(), TTAProgram::TPEFProgramFactory::findPort(), SimulatorFrontend::findPort(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), HDBToHtml::fuArchToHtml(), ProGeTestBenchGenerator::generate(), CompiledSimCodeGenerator::generateLoadTrigger(), CompiledSimCodeGenerator::generateStoreTrigger(), CompiledSimCodeGenerator::generateTriggerCode(), MachineInfo::getBoundPort(), getOutputPort(), MachineInfo::getPortBindingsOfOperation(), BasicBlockScheduler::getTriggerOperand(), CompiledSimCodeGenerator::handleJump(), CompiledSimCodeGenerator::handleOperationWithoutDag(), ProGe::ProcessorGenerator::iMemAddressWidth(), BFOptimization::immCountPreventsScheduling(), io(), isBound(), HDB::HDBManager::isMatchingArchitecture(), TTAMachine::ExecutionPipeline::isOperandBound(), BF2Scheduler::isTrigger(), ExecutionPipelineBroker::latestFromSource(), loadState(), numberOfInputs(), numberOfOutputs(), operandBindingsString(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandPort(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandTooLate(), BFShareOperands::operator()(), HDB::FUArchitecture::operator==(), FUGen::parseOperations(), ExecutionPipelineResource::poConflictsWithInputPort(), BF2Scheduler::preAllocateFunctionUnits(), MachineConnectivityCheck::raConnected(), BF2Scheduler::releasePortForOp(), HDB::HDBManager::resolveArchitecturePort(), TTAMachine::ResourceVector::ResourceVector(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), ExecutionPipelineResource::resultReadyCycle(), MachineResourceManager::rFPortOrFUIndexReference(), BFOptimization::RFReadPortCountPreventsScheduling(), FUGen::scheduleOperations(), ExecutionPipelineResource::setOperandsUsed(), ExecutionPipelineResource::setResultWriten(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::triggerAllowedAtCycle(), unbindPort(), ExecutionPipelineResource::unsetOperandsUsed(), ExecutionPipelineResource::unsetResultWriten(), DefaultDecoderGenerator::writeControlRegisterMappings(), and DefaultDecoderGenerator::writeControlRulesOfFUInputPort().
|
virtual |
Saves the contents to an ObjectState tree.
Implements Serializable.
Definition at line 424 of file HWOperation.cc.
References ObjectState::addChild(), name(), operandBinding_, OSKEY_NAME, OSKEY_OPERAND, OSKEY_PORT, OSNAME_OPERAND_BINDING, OSNAME_OPERATION, pipeline_, TTAMachine::ExecutionPipeline::saveState(), and ObjectState::setAttribute().
Referenced by TTAMachine::FunctionUnit::saveState().
|
virtual |
Sets the name of the operation.
name | The new name. |
ComponentAlreadyExists | If another operation exists by the same name in the function unit. |
InvalidName | If the given name is not valid. |
Reimplemented in SmartHWOperation.
Definition at line 155 of file HWOperation.cc.
References MachineTester::isValidComponentName(), name(), TTAMachine::Component::name(), name_, parentUnit(), StringTools::stringToLower(), Texts::TextGenerator::text(), MOMTextGenerator::TXT_INVALID_NAME, and MOMTextGenerator::TXT_OPERATION_EXISTS_BY_SAME_NAME.
Referenced by HWOperation(), and loadState().
int TTAMachine::HWOperation::slack | ( | int | input | ) | const |
Returns the slack of the given input.
The slack tells how many cycles AFTER the trigger, opcode-setting move is scheduled, can the operand be scheduled (and still affect correctly the result of the operation).
input | The number of the input. |
IllegalParameters | If the given input is not read in the pipeline. |
Definition at line 248 of file HWOperation.cc.
References pipeline_, and TTAMachine::ExecutionPipeline::slack().
Referenced by ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandTooLate(), ExecutionPipelineResource::setOperandsUsed(), ExecutionPipelineResource::triggerTooEarly(), and ExecutionPipelineResource::unsetOperandsUsed().
|
virtual |
Unbinds the operand bound to the given port.
port | The port. |
Reimplemented in SmartHWOperation.
Definition at line 296 of file HWOperation.cc.
References operandBinding_, port(), MapTools::removeItemsByValue(), and TTAMachine::FUPort::updateBindingString().
Referenced by TTAMachine::FUPort::cleanupOperandBindings().
|
private |
Name of the operation.
Definition at line 97 of file HWOperation.hh.
Referenced by HWOperation(), name(), and setName().
|
private |
Maps operands of operation to particular ports of the parent unit.
Definition at line 103 of file HWOperation.hh.
Referenced by bindPort(), io(), isBound(), loadState(), operandCount(), port(), saveState(), and unbindPort().
|
static |
ObjectState attribute key for name of the operation.
Definition at line 84 of file HWOperation.hh.
Referenced by HWOperation(), loadState(), and saveState().
|
static |
ObjectState attribute key for operand index.
Definition at line 88 of file HWOperation.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState attribute key for port name.
Definition at line 90 of file HWOperation.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState name for an operand binding.
Definition at line 86 of file HWOperation.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState name for HWOperation.
Definition at line 82 of file HWOperation.hh.
Referenced by loadState(), TTAMachine::FunctionUnit::loadStateWithoutReferences(), and saveState().
|
private |
The parent unit.
Definition at line 101 of file HWOperation.hh.
Referenced by HWOperation(), parentUnit(), and ~HWOperation().
|
private |
Pipeline of the operation.
Definition at line 99 of file HWOperation.hh.
Referenced by HWOperation(), latency(), loadState(), pipeline(), saveState(), slack(), and ~HWOperation().