OpenASIP  2.0
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TTAMachine::Component Class Referenceabstract

#include <MachinePart.hh>

Inheritance diagram for TTAMachine::Component:
Inheritance graph
Collaboration diagram for TTAMachine::Component:
Collaboration graph

Classes

class  ComponentNameComparator
 

Public Member Functions

virtual ~Component ()
 
virtual TCEString name () const
 
virtual void setName (const std::string &name)
 
virtual void setMachine (Machine &machine)=0
 
virtual void unsetMachine ()=0
 
virtual Machinemachine () const
 
virtual void ensureRegistration (const Component &component) const
 
virtual bool isRegistered () const
 
virtual ObjectStatesaveState () const
 
virtual void loadState (const ObjectState *state)
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 

Static Public Attributes

static const std::string OSNAME_COMPONENT = "component"
 ObjectState name for component. More...
 
static const std::string OSKEY_NAME = "name"
 ObjectState attribute key for the name of the component. More...
 

Protected Member Functions

 Component (const std::string &name)
 
 Component (const ObjectState *state)
 
void internalSetMachine (Machine &machine)
 
void internalUnsetMachine ()
 
- Protected Member Functions inherited from TTAMachine::MachinePart
 MachinePart ()
 
virtual ~MachinePart ()
 

Private Member Functions

 Component (const Component &)
 Copying forbidden. More...
 
Componentoperator= (const Component &)
 Assingment forbidden. More...
 

Private Attributes

std::string name_
 Name of the component. More...
 
Machinemachine_
 Machine to which the component is registered. More...
 

Detailed Description

Abstract base class for top-level machine components.

Top-level machine components, like Bus and Socket, are independently defined parts of a target machine. Components can be registered to (or unregistered from) a Machine.

Definition at line 90 of file MachinePart.hh.

Constructor & Destructor Documentation

◆ ~Component()

TTAMachine::Component::~Component ( )
virtual

Destructor.

Definition at line 115 of file MachinePart.cc.

115  {
116 }

◆ Component() [1/3]

TTAMachine::Component::Component ( const std::string &  name)
protected

Constructor.

Parameters
nameName of the component.
Exceptions
InvalidNameIf the given name is not a valid name for a component.

Definition at line 82 of file MachinePart.cc.

83  : MachinePart(), name_(name), machine_(NULL) {
85  const string procName = "Component::Component";
86  MOMTextGenerator textGen;
87  format errorMsg = textGen.text(MOMTextGenerator::TXT_INVALID_NAME);
88  errorMsg % name;
89  throw InvalidName(__FILE__, __LINE__, procName, errorMsg.str());
90  }
91 }

References MachineTester::isValidComponentName(), name(), Texts::TextGenerator::text(), and MOMTextGenerator::TXT_INVALID_NAME.

Here is the call graph for this function:

◆ Component() [2/3]

TTAMachine::Component::Component ( const ObjectState state)
protected

Constructor.

Loads the name from the given ObjectState object.

Parameters
stateThe ObjectState instance from which the name is loaded.
Exceptions
ObjectStateLoadingExceptionIf the given ObjectState instance is invalid.

Definition at line 102 of file MachinePart.cc.

102  : MachinePart(), machine_(NULL) {
103  try {
105  } catch (const Exception& e) {
106  string procName = "Component::Component";
108  __FILE__, __LINE__, procName, e.errorMessage());
109  }
110 }

References Exception::errorMessage(), OSKEY_NAME, setName(), and ObjectState::stringAttribute().

Here is the call graph for this function:

◆ Component() [3/3]

TTAMachine::Component::Component ( const Component )
private

Copying forbidden.

Member Function Documentation

◆ ensureRegistration()

void TTAMachine::Component::ensureRegistration ( const Component component) const
virtual

Ensures that the component is registered to the same machine as the given component.

Parameters
componentThe component.
Exceptions
IllegalRegistrationIf the components are not registered to the same machine.

Reimplemented in TTAMachine::NullInstructionTemplate, TTAMachine::NullAddressSpace, and TTAMachine::NullRegisterFile.

Definition at line 163 of file MachinePart.cc.

163  {
164  if (machine() == NULL || machine() != component.machine()) {
165  const string procName = "Component::ensureRegistration";
166  throw IllegalRegistration(__FILE__, __LINE__, procName);
167  }
168 }

References machine().

Referenced by TTAMachine::InstructionTemplate::addSlot(), TTAMachine::Socket::attachBus(), TTAMachine::Segment::attachSocket(), TTAMachine::Port::attachSocket(), TTAMachine::Bridge::Bridge(), TTAMachine::PortGuard::PortGuard(), TTAMachine::RegisterGuard::RegisterGuard(), and TTAMachine::FunctionUnit::setAddressSpace().

Here is the call graph for this function:

◆ internalSetMachine()

void TTAMachine::Component::internalSetMachine ( Machine machine)
protected

◆ internalUnsetMachine()

void TTAMachine::Component::internalUnsetMachine ( )
protected

◆ isRegistered()

bool TTAMachine::Component::isRegistered ( ) const
virtual

◆ loadState()

void TTAMachine::Component::loadState ( const ObjectState state)
virtual

Loads the name of the component from the given ObjectState instance.

Parameters
stateThe ObjectState instance.
Exceptions
ObjectStateLoadingExceptionIf the machine already contains same type of component with the same name.

Implements Serializable.

Reimplemented in TTAMachine::Bus, TTAMachine::FunctionUnit, TTAMachine::Socket, TTAMachine::InstructionTemplate, TTAMachine::NullInstructionTemplate, TTAMachine::RegisterFile, TTAMachine::NullRegisterFile, TTAMachine::ControlUnit, TTAMachine::AddressSpace, TTAMachine::ImmediateUnit, TTAMachine::OperationTriggeredFormat, TTAMachine::Bridge, TTAMachine::Unit, TTAMachine::NullAddressSpace, TTAMachine::BaseRegisterFile, UnboundedRegisterFile, UniversalFunctionUnit, and TTAMachine::ImmediateSlot.

Definition at line 205 of file MachinePart.cc.

205  {
206  const string procName = "Component::loadState";
207 
208  try {
209  string name = state->stringAttribute(OSKEY_NAME);
210  setName(name);
211  } catch (const KeyNotFound& e) {
212  throw ObjectStateLoadingException(__FILE__, __LINE__, procName);
213  } catch (const ComponentAlreadyExists& e) {
214  MOMTextGenerator textGenerator;
215  format text = textGenerator.text(
217  text % state->stringAttribute(OSKEY_NAME);
219  __FILE__, __LINE__, procName, text.str());
220  } catch (const InvalidName& e) {
221  MOMTextGenerator textGenerator;
222  format text = textGenerator.text(
224  text % state->stringAttribute(OSKEY_NAME);
226  __FILE__, __LINE__, procName, text.str());
227  }
228 }

References name(), OSKEY_NAME, setName(), ObjectState::stringAttribute(), Texts::TextGenerator::text(), MOMTextGenerator::TXT_INVALID_NAME, and MOMTextGenerator::TXT_SAME_NAME.

Referenced by TTAMachine::ImmediateSlot::loadState(), TTAMachine::Bridge::loadState(), TTAMachine::OperationTriggeredFormat::loadState(), TTAMachine::AddressSpace::loadState(), TTAMachine::InstructionTemplate::loadState(), TTAMachine::Socket::loadState(), and TTAMachine::Bus::loadStateWithoutReferences().

Here is the call graph for this function:

◆ machine()

virtual Machine* TTAMachine::Component::machine ( ) const
virtual

Reimplemented in TTAMachine::NullInstructionTemplate, TTAMachine::NullAddressSpace, and TTAMachine::NullRegisterFile.

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), TTAMachine::InstructionTemplate::addSlot(), TTAMachine::Bridge::adjustChainDirection(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), TTAMachine::Socket::attachBus(), TTAMachine::Port::attachSocket(), TTAMachine::Segment::attachSocket(), FullyConnectedCheck::attachSocketToAllBusses(), TTAMachine::Bridge::Bridge(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::busConnectedToDestination(), DefaultICDecoderEstimator::busParameters(), CycleLookBackSoftwareBypasser::bypassNode(), MachineTester::canBridge(), MachineTester::canConnect(), MachineInfo::canEncodeImmediateInteger(), ProDePortEditPolicy::canHandle(), ProDeSegmentEditPolicy::canHandle(), ProDeSocketEditPolicy::canHandle(), MachineConnectivityCheck::canTransportImmediate(), MachineConnectivityCheck::canWriteAllImmediates(), TTAMachine::FUPort::cleanupGuards(), TTAMachine::FunctionUnit::cleanupGuards(), FullyConnectedCheck::connectFUPort(), FullyConnectedCheck::connectIUPort(), FullyConnectedCheck::connectRFPort(), FullyConnectedCheck::connectSpecialRegisterPort(), ADFCombiner::copyGuards(), POMDisassembler::createFUPort(), POMDisassembler::createGuard(), TTAProgram::TPEFProgramFactory::createInstruction(), POMDisassembler::createRegister(), FullyConnectedCheck::createSocket(), TTAMachine::RegisterFile::deleteGuards(), POMDisassembler::disassemble(), CopyComponent::Do(), UniversalFunctionUnit::ensureInputPorts(), UniversalFunctionUnit::ensureOutputPorts(), ensureRegistration(), MachineConnectivityCheck::findRoutes(), MachineConnectivityCheck::fromRfConnected(), TTAProgram::TPEFResourceUpdater::functionUnit(), TTAProgram::TPEFResourceUpdater::functionUnitPort(), TTAProgram::Move::guardLatency(), TTAMachine::ControlUnit::hasLocalGuardLatencyOfZero(), MachineConnectivityCheck::immBits(), MachineConnectivityCheck::isConnectedToDifferentlyConnectedRFs(), isInstructionMemory(), TTAMachine::RegisterFile::isUsedAsGuard(), TTAMachine::Bridge::loadState(), TTAMachine::InstructionTemplate::loadState(), TTAMachine::Socket::loadState(), TTAMachine::FunctionUnit::loadState(), TTAMachine::PortGuard::loadState(), TTAMachine::RegisterGuard::loadState(), TemplateSlotDialog::onOK(), TTAMachine::Bus::position(), TTAProgram::TPEFResourceUpdater::registerFile(), TTAMachine::RegisterGuard::RegisterGuard(), ImmInfo::registerImmediateLoadWidth(), ControlFlowGraph::removeJumpToTarget(), TTAProgram::Program::replaceUniversalAddressSpaces(), HDB::RFArchitecture::RFArchitecture(), DataDependenceGraph::sanityCheck(), TTAMachine::Machine::setBusPosition(), TTAMachine::Socket::setDirection(), TTAMachine::Bridge::setFirstOfChain(), TTAMachine::Machine::setGlobalControl(), TTAMachine::ControlUnit::setGlobalGuardLatency(), TTAMachine::RegisterFile::setGuardLatency(), TTAMachine::ImmediateSlot::setMachine(), TTAMachine::OperationTriggeredFormat::setMachine(), TTAMachine::InstructionTemplate::setMachine(), TTAMachine::ImmediateSlot::setName(), TTAMachine::InstructionTemplate::setName(), TTAMachine::Bridge::setName(), TTAMachine::ImmediateUnit::setName(), TTAMachine::FunctionUnit::setName(), TTAMachine::AddressSpace::setName(), TTAMachine::Socket::setName(), TTAMachine::Bus::setName(), TTAMachine::RegisterFile::setName(), TTAMachine::AddressSpace::setNumericalIds(), FullyConnectedCheck::socketAttachedToAllBusses(), BEMGenerator::sourceBridge(), BEMGenerator::sourceBridgeCount(), TTAMachine::InstructionTemplate::supportedWidth(), TTAProgram::Program::targetProcessor(), MachineConnectivityCheck::toRfConnected(), TTAMachine::Machine::unsetGlobalControl(), TTAMachine::ImmediateSlot::unsetMachine(), TTAMachine::ControlUnit::unsetMachine(), TTAMachine::Bridge::unsetMachine(), TTAMachine::Unit::unsetMachine(), TTAMachine::OperationTriggeredFormat::unsetMachine(), TTAMachine::ImmediateUnit::unsetMachine(), TTAMachine::AddressSpace::unsetMachine(), TTAMachine::RegisterFile::unsetMachine(), TTAMachine::InstructionTemplate::unsetMachine(), TTAMachine::Socket::unsetMachine(), TTAMachine::FunctionUnit::unsetMachine(), TTAMachine::Bus::unsetMachine(), and TTAMachine::ImmediateSlot::width().

◆ name()

TCEString TTAMachine::Component::name ( ) const
virtual

Returns the name of the component.

Returns
Name of the component.

Reimplemented in TTAMachine::NullAddressSpace, TTAMachine::NullRegisterFile, and TTAMachine::NullInstructionTemplate.

Definition at line 125 of file MachinePart.cc.

125  {
126  return name_;
127 }

References name_.

Referenced by MemorySystem::addAddressSpace(), ADFCombiner::addAddressSpaces(), ProGe::NetlistGenerator::addBaseRFToNetlist(), CodeCompressorPlugin::addBitsForDestinationField(), CodeCompressorPlugin::addBitsForDstRegisterField(), CodeCompressorPlugin::addBitsForGuardField(), CodeCompressorPlugin::addBitsForMoveSlot(), CodeCompressorPlugin::addBitsForSourceField(), TTAMachine::Machine::addBus(), ADFCombiner::addBuses(), MachineResourceModifier::addBusesByAmount(), llvm::LLVMTCEBuilder::addCandidateLSUAnnotations(), RegisterCopyAdder::addCandidateSetAnnotations(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), SimpleICOptimizer::addConnections(), BEMGenerator::addEncodings(), ProGe::NetlistGenerator::addFUExternalPortsToNetlist(), TTAMachine::Machine::addFunctionUnit(), ADFCombiner::addFunctionUnits(), ProGe::NetlistGenerator::addFUToNetlist(), DefaultICGenerator::addICToNetlist(), TTAMachine::Machine::addImmediateSlot(), BEMGenerator::addLongImmDstRegisterFields(), TTAProgram::Instruction::addMove(), TTAMachine::FunctionUnit::addPipelineElement(), BEMGenerator::addPortCodes(), MachineStateBuilder::addPortToFU(), TTAMachine::AddressSpace::AddressSpace(), BEMGenerator::addRiscvFormat(), BEMGenerator::addSocketCodeTables(), ImmediateGenerator::addSplitInsTemplate(), BEMGenerator::addTopLevelFields(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), TTAMachine::Bus::adjustSegmentChain(), OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), BusBroker::allAvailableResources(), BF2Scheduler::allocateFunctionUnits(), TDGen::analyzeMachineRegisters(), ResourceConstraintAnalyzer::analyzeMoveNode(), TDGen::analyzeRegisters(), ITemplateBroker::assign(), BFOptimization::assign(), BFOptimization::assignCopyToPrologEpilog(), MachineStateBuilder::bindPortsToOperands(), TTAMachine::Bridge::Bridge(), MachineTestReporter::bridgingError(), MoveNodeGroupBuilder::build(), SimulationController::buildFUResourceConflictDetectors(), MachineStateBuilder::buildMachineState(), OutputFUBroker::buildResources(), InputPSocketBroker::buildResources(), InputFUBroker::buildResources(), OutputPSocketBroker::buildResources(), IUBroker::buildResources(), BusBroker::buildResources(), DefaultDecoderGenerator::busCntrlSignalPinOfSocket(), MachineConnectivityCheck::busConnectedToAnyFU(), DefaultDecoderGenerator::busMuxCntrlSignal(), DefaultICGenerator::busMuxControlPort(), DefaultICGenerator::busMuxDataPort(), DefaultICGenerator::busMuxEnablePort(), DefaultDecoderGenerator::busMuxEnableSignal(), DefaultICGenerator::busMuxEntityName(), DefaultICGenerator::busSignal(), CompiledSimSymbolGenerator::busSymbol(), ProGe::NetlistGenerator::calculateAddressWidth(), UtilizationStats::calculateForInstruction(), BFOptimization::canAssign(), OperationBindingCheck::check(), FullyConnectedCheck::check(), ProgrammabilityValidator::checkBooleanRegister(), POMValidator::checkConnectivity(), BEMValidator::checkDestinationField(), IDFValidator::checkFUImplementations(), BEMValidator::checkGuardField(), BEMValidator::checkImmediateControlField(), CopyingDelaySlotFiller::checkImmediatesAfter(), BEMValidator::checkImmediateSlot(), IDFValidator::checkIUImplementations(), ProGe::ProcessorGenerator::checkIULatencies(), BEMValidator::checkLImmDstRegisterFields(), POMValidator::checkLongImmediates(), BEMValidator::checkMoveSlot(), FUValidator::checkOperandBindings(), FUValidator::checkOperations(), IDFValidator::checkRFImplementations(), BEMValidator::checkSocketCodeTable(), BEMValidator::checkSourceField(), MinimalOpSetCheck::checkWithIgnore(), MachineResourceManager::codeAddressSpace(), CopyingDelaySlotFiller::collectMoves(), SimulatorFrontend::compareState(), DefaultDecoderGenerator::completeDecoderBlock(), Component(), ConflictDetectionCodeGenerator::ConflictDetectionCodeGenerator(), CompiledSimSymbolGenerator::conflictDetectorSymbol(), ADFCombiner::connectPorts(), ADFCombiner::connectRegisterFiles(), ADFCombiner::connectVectorLSU(), DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), ADFCombiner::copyGuards(), BasicBlockPass::copyRMToBB(), MemoryGenerator::corePortName(), RegisterQuantityCheck::countIntRegisters(), TTAProgram::ProgramWriter::createASpaceElement(), TTAProgram::ProgramWriter::createBinary(), TTAProgram::ProgramWriter::createCodeSection(), BlocksTranslator::CreateConnection(), TTAProgram::ProgramWriter::createDataSections(), IUFactory::createEditPart(), FUFactory::createEditPart(), RFFactory::createEditPart(), GCUFactory::createEditPart(), POMDisassembler::createFUPort(), POMDisassembler::createGuard(), POMDisassembler::createImmediateRegister(), POMDisassembler::createInstruction(), ADFCombiner::createPortsAndSockets(), POMDisassembler::createRegister(), FullyConnectedCheck::createSocket(), FUTestbenchGenerator::createStimulus(), CompiledSimSymbolGenerator::DAMemorySymbol(), TTAProgram::DataMemory::dataDefinition(), TTAProgram::Program::dataMemory(), POMDisassembler::dataSectionDescription(), ConflictDetectionCodeGenerator::detectConflicts(), POMDisassembler::disassemble(), ProximBusDetailsCmd::Do(), ProximFUDetailsCmd::Do(), ProximFUPortDetailsCmd::Do(), ProximIUDetailsCmd::Do(), ProximSocketDetailsCmd::Do(), ProximRFDetailsCmd::Do(), PasteComponentCmd::Do(), MoveNodeDuplicator::duplicateMove(), llvm::LLVMTCEBuilder::emitLongjmp(), llvm::LLVMTCEBuilder::emitMove(), llvm::LLVMTCEBuilder::emitOperationMacro(), llvm::LLVMTCEBuilder::emitSetjmp(), CodeCompressorPlugin::encodeFUTerminal(), CodeCompressorPlugin::encodeIUTerminal(), CodeCompressorPlugin::encodeRFTerminal(), TTAProgram::TerminalAddress::equals(), TTAProgram::TerminalRegister::equals(), InterpolatingRFEstimator::estimateArea(), InterpolatingFUEstimator::estimateArea(), StrictMatchFUEstimator::estimateEnergy(), StrictMatchRFEstimator::estimateEnergy(), InterpolatingFUEstimator::estimateEnergy(), InterpolatingRFEstimator::estimateEnergy(), DefaultICDecoderEstimator::estimateICDelayOfPath(), DefaultICDecoderEstimator::estimateICEnergy(), InterpolatingRFEstimator::estimateMaximumComputationDelay(), InterpolatingFUEstimator::estimateMaximumComputationDelay(), InterpolatingRFEstimator::estimatePortReadDelay(), InterpolatingFUEstimator::estimatePortReadDelay(), InterpolatingRFEstimator::estimatePortWriteDelay(), InterpolatingFUEstimator::estimatePortWriteDelay(), InfoBussesCommand::execute(), InfoPortsCommand::execute(), InfoFunitsCommand::execute(), InfoProcCommand::execute(), InfoStatsCommand::execute(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), VectorLSGenerator::explore(), TTAProgram::TPEFProgramFactory::findAddressSpace(), CostEstimator::Estimator::findAllICPaths(), SimulatorFrontend::findBooleanRegister(), ProGe::RV32MicroCodeGenerator::findBusWidths(), ProgrammabilityValidator::findConnections(), ProGe::NetlistGenerator::findCorrespondingPort(), AutoSelectImplementationsDialog::findFUImplementations(), TTAProgram::TPEFProgramFactory::findFunctionUnit(), ProgrammabilityValidator::findGlobalConnectionRegister(), TTAProgram::TPEFProgramFactory::findGuard(), DefaultDecoderGenerator::findGuard(), RegisterQuantityCheck::findGuardRegisters(), TTAProgram::TPEFProgramFactory::findInstrTemplate(), AutoSelectImplementationsDialog::findIUImplementations(), MachineInfo::findLockUnits(), AlmaIFIntegrator::findMemories(), ControlFlowGraph::findNextIndex(), TTAProgram::TPEFProgramFactory::findPort(), SimulatorFrontend::findPort(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), AutoSelectImplementationsDialog::findRFImplementations(), TTAProgram::ProgramWriter::findSection(), SimulatorFrontend::finishSimulation(), MinimalOpSetCheck::fix(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), ComponentImplementationSelector::fuImplementations(), TTAProgram::TPEFResourceUpdater::functionUnit(), CostEstimator::Estimator::functionUnitArea(), CostEstimator::Estimator::functionUnitEnergy(), MachineResourceManager::functionUnitID(), CostEstimator::Estimator::functionUnitMaximumComputationDelay(), CostEstimator::Estimator::functionUnitPortReadDelay(), MachineResourceManager::functionUnitPortResource(), CostEstimator::Estimator::functionUnitPortWriteDelay(), ProGeTestBenchGenerator::generate(), CompiledSimCodeGenerator::generateAddFUResult(), CompiledSimCodeGenerator::generateLoadTrigger(), CompiledSimCodeGenerator::generateStoreTrigger(), ProximIUEditPolicy::getCommand(), ProximRFEditPolicy::getCommand(), ProximSocketEditPolicy::getCommand(), ProximBusEditPolicy::getCommand(), ProximFUEditPolicy::getCommand(), ProDeBridgeEditPolicy::getCommand(), ProDeIUEditPolicy::getCommand(), ProDeSocketEditPolicy::getCommand(), ProDeBusEditPolicy::getCommand(), ProDeFUEditPolicy::getCommand(), ProDeRFEditPolicy::getCommand(), ProDeGCUEditPolicy::getCommand(), CopyingDelaySlotFiller::getMove(), CompiledSimCodeGenerator::guardPipelineTopSymbol(), DefaultDecoderGenerator::guardPortName(), DataDependenceGraph::guardRenamed(), RFAccessTracker::handleEvent(), ProcessorImplementationWindow::handleSelectFUImplementation(), ProcessorImplementationWindow::handleSelectIUImplementation(), ProcessorImplementationWindow::handleSelectRFImplementation(), MemorySystem::hasMemory(), UniversalFunctionUnit::hasOperation(), TTAMachine::FunctionUnit::hasOperation(), TTAMachine::FunctionUnit::hasOperationLowercase(), TTAMachine::FunctionUnit::hasOperationPort(), TTAMachine::FunctionUnit::hasPipelineElement(), TTAMachine::Unit::hasPort(), TTAMachine::Bus::hasSegment(), TTAMachine::ControlUnit::hasSpecialRegisterPort(), TTAMachine::ImmediateSlot::ImmediateSlot(), CodeCompressorPlugin::immediateTerminal(), TTAProgram::TPEFResourceUpdater::immediateUnit(), ProGe::NetlistGenerator::immediateUnitWritePort(), MachineResourceManager::indexResource(), llvm::LLVMTCEBuilder::initDataSections(), SimulatorFrontend::initializeDataMemories(), SimulatorFrontend::initializeMemorySystem(), MachineResourceManager::initResourceSection(), TTAMachine::InstructionTemplate::InstructionTemplate(), CodeCompressorPlugin::instructionTemplate(), RegisterCopyAdder::isAllowedUnit(), TTAMachine::FunctionUnit::isArchitectureEqual(), BusBroker::isAvailable(), ProgramOperation::isLegalFU(), MoveNode::isSourceReg(), ComponentImplementationSelector::iuImplementations(), TTAMachine::ExecutionPipeline::latency(), ListCompareFunction(), PlatformIntegrator::loadFUExternalPorts(), ProximRegisterWindow::loadImmediateUnit(), ProximMemoryWindow::loadMemory(), ProximMemoryWindow::loadProgramMemory(), ProximRegisterWindow::loadRegisterFile(), TTAMachine::Bridge::loadState(), TTAMachine::Port::loadState(), TTAMachine::HWOperation::loadState(), TTAMachine::InstructionTemplate::loadState(), TTAMachine::ExecutionPipeline::loadState(), TTAMachine::Socket::loadState(), TTAMachine::FunctionUnit::loadState(), TTAMachine::PortGuard::loadState(), loadState(), TTAMachine::RegisterGuard::loadState(), TTAMachine::FUPort::loadStateWithoutReferences(), TTAMachine::Bus::loadStateWithoutReferences(), CostEstimator::Estimator::longestPath(), main(), MemorySystem::memory(), MemorySystem::memoryConst(), ProGe::NetlistGenerator::netlistBlock(), ProGe::NetlistGenerator::netlistPort(), BlockImplementationDialog::onHDBSelection(), RFDialog::onOK(), RFGuardDialog::onOK(), SocketDialog::onOK(), FUDialog::onOK(), IUDialog::onOK(), TemplateSlotDialog::onOK(), GCUDialog::onOK(), DefaultDecoderGenerator::opcode(), TTAProgram::TPEFResourceUpdater::operand(), UniversalFunctionUnit::operation(), TTAMachine::FunctionUnit::operation(), CompiledSimSymbolGenerator::operationContextSymbol(), TTAMachine::FunctionUnit::operationLowercase(), TTAMachine::FunctionUnit::operationPort(), CompiledSimSymbolGenerator::operationSymbol(), TTAMachine::OperationTriggeredFormat::OperationTriggeredFormat(), BFLateBypassGuard::operator()(), BFEarlyGuardBypass::operator()(), BFShareOperandWithScheduled::operator()(), BFLateBypass::operator()(), BFScheduleTD::operator()(), BFPushAntidepDown::operator()(), TTAMachine::PipelineElement::Comparator::operator()(), BFScheduleBU::operator()(), TTAMachine::Component::ComponentNameComparator::operator()(), FUTestbenchGenerator::parseFuPorts(), TTAMachine::FunctionUnit::pipelineElement(), TTAMachine::Unit::port(), TTAMachine::Port::Port(), TTAMachine::BaseRegisterFile::port(), TTAMachine::FunctionUnit::port(), TTAMachine::PortGuard::PortGuard(), CompiledSimSymbolGenerator::portSymbol(), BF2Scheduler::preAllocateFunctionUnits(), BF2Scheduler::preAllocateFunctionUnitsInner(), ProgrammabilityValidator::printConnection(), ImmediateGenerator::printImmediateTemplates(), printLatexAddressSpaceDescription(), printLatexFunctionUnitDescription(), ProgrammabilityValidator::printNotConnectedSockets(), SimProgramBuilder::processBidirTerminal(), DataDependenceGraphBuilder::processGuard(), SimProgramBuilder::processInstruction(), SimProgramBuilder::processMove(), SimProgramBuilder::processSourceTerminal(), ProgrammabilityValidator::profile(), CodeCompressorPlugin::programImmediate(), ProGe::ProGeUI::readImemParameters(), PlatformIntegrator::readLsuParameters(), FUTestbenchGenerator::readValuesFromOutPorts(), TTAProgram::TPEFResourceUpdater::registerFile(), CostEstimator::Estimator::registerFileArea(), CostEstimator::Estimator::registerFileEnergy(), MachineResourceManager::registerFileID(), CostEstimator::Estimator::registerFileMaximumComputationDelay(), llvm::LLVMTCEIRBuilder::registerFileName(), CostEstimator::Estimator::registerFilePortReadDelay(), CostEstimator::Estimator::registerFilePortWriteDelay(), TTAMachine::RegisterGuard::RegisterGuard(), DisassemblyRegister::registerName(), ProximPortWindow::reinitialize(), BF2Scheduler::releasePortForOp(), SimpleICOptimizer::removeAllConnections(), ConnectionSweeper::removeConnection(), ImmediateGenerator::removeInsTemplate(), RegisterRenamer::renameLiveRange(), BF2Scheduler::reservePreallocatedFUs(), ResourceMapper::resourceOf(), BFUnscheduleFromBody::returnOriginal(), BFUnscheduleMove::returnOriginal(), BFShareOperandLate::revert(), ComponentImplementationSelector::rfImplementations(), TTAMachine::Bridge::saveState(), TTAMachine::Port::saveState(), TTAMachine::AddressSpace::saveState(), TTAMachine::ControlUnit::saveState(), TTAMachine::FunctionUnit::saveState(), TTAMachine::PortGuard::saveState(), saveState(), TTAMachine::RegisterGuard::saveState(), ProgrammabilityValidator::searchMissingRFConnections(), TTAMachine::Bus::segment(), ComponentImplementationSelector::selectFUs(), ComponentImplementationSelector::selectIUs(), ComponentImplementationSelector::selectRFs(), TTAMachine::Socket::setDirection(), TTAMachine::Machine::setGlobalControl(), SimControlLanguageCommand::setMemoryAddress(), TTAMachine::ImmediateSlot::setName(), TTAMachine::InstructionTemplate::setName(), TTAMachine::Bridge::setName(), TTAMachine::HWOperation::setName(), TTAMachine::ImmediateUnit::setName(), TTAMachine::FunctionUnit::setName(), TTAMachine::AddressSpace::setName(), TTAMachine::Socket::setName(), TTAMachine::Bus::setName(), TTAMachine::RegisterFile::setName(), setName(), BFOptimization::setPrologDstFUAnno(), BFOptimization::setPrologSrcFUAnno(), BusBroker::setupResourceLinks(), MemorySystem::shareMemoriesWith(), DefaultICGenerator::simmSignal(), DefaultICGenerator::simmSocket(), TTAMachine::ExecutionPipeline::slack(), MachineTestReporter::socketDirectionSettingError(), MachineTestReporter::socketPortConnectionError(), MachineTestReporter::socketSegmentConnectionError(), TTAMachine::ControlUnit::specialRegisterPort(), BFRegCopyAfter::splitMove(), BFRegCopyBefore::splitMove(), SimulatorFrontend::state(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), CompiledSimSymbolGenerator::targetMemorySymbol(), TTAProgram::ProgramWriter::terminalResource(), ProGe::RV32MicroCodeGenerator::throwInputPortError(), ProGe::RV32MicroCodeGenerator::throwOutputPortError(), ProGe::RV32MicroCodeGenerator::throwTriggeringPortError(), TTAProgram::TerminalRegister::toString(), EntryKeyDataFunctionUnit::toString(), CostEstimator::Estimator::totalAreaOfFunctionUnits(), CostEstimator::Estimator::totalAreaOfRegisterFiles(), CostEstimator::Estimator::totalEnergyOfFunctionUnits(), CostEstimator::Estimator::totalEnergyOfRegisterFiles(), PreOptimizer::tryToOptimizeAddressReg(), ITemplateBroker::unassignImmediate(), TTAMachine::UnconditionalGuard::UnconditionalGuard(), BFLateBypassGuard::undoOnlyMe(), BFRescheduleMove::undoOnlyMe(), BFLateBypass::undoOnlyMe(), BFUnscheduleMove::unscheduleOriginal(), BFUnscheduleFromBody::unscheduleOriginal(), TTAMachine::ImmediateSlot::unsetMachine(), TTAMachine::Bus::unsetMachine(), ProximPortWindow::update(), GCUDialog::updateAddressSpaceChoice(), FUDialog::updateAddressSpaceChoice(), AddressSpacesDialog::updateASList(), SocketDialog::updateConnected(), CompiledSimCodeGenerator::updateDeclaredSymbolsList(), BusDialog::updateGuardLists(), TemplateListDialog::updateSlotList(), IUPortDialog::updateSocket(), FUPortDialog::updateSockets(), SRPortDialog::updateSockets(), RFPortDialog::updateSockets(), ProgrammabilityValidator::validate(), TTAMachine::ImmediateSlot::width(), DefaultDecoderGenerator::writeBusControlRulesOfOutputSocket(), DefaultDecoderGenerator::writeBusControlRulesOfSImmSocketOfBus(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), DefaultDecoderGenerator::writeControlRulesOfFUOutputPort(), DefaultDecoderGenerator::writeControlRulesOfRFReadPort(), DefaultDecoderGenerator::writeControlRulesOfRFWritePort(), DefaultDecoderGenerator::writeFUCntrlSignals(), FUTestbenchGenerator::writeInputPortStimulus(), DefaultDecoderGenerator::writeInstructionTemplateProcedures(), DefaultICGenerator::writeInterconnectionNetwork(), DefaultDecoderGenerator::writeLongImmediateWriteProcess(), DefaultDecoderGenerator::writeRFCntrlSignals(), DefaultDecoderGenerator::writeRFSRAMDecodingProcess(), DefaultDecoderGenerator::writeRulesForSourceControlSignals(), DefaultDecoderGenerator::writeSimmDataSignal(), DefaultDecoderGenerator::writeSocketCntrlSignals(), DefaultDecoderGenerator::writeSquashSignalGenerationProcess(), DefaultDecoderGenerator::writeSquashSignals(), DefaultDecoderGenerator::writeSquashSignalSubstitution(), and DataDependenceGraph::writeToXMLFile().

◆ operator=()

Component& TTAMachine::Component::operator= ( const Component )
private

Assingment forbidden.

◆ saveState()

ObjectState * TTAMachine::Component::saveState ( ) const
virtual

◆ setMachine()

virtual void TTAMachine::Component::setMachine ( Machine machine)
pure virtual

◆ setName()

void TTAMachine::Component::setName ( const std::string &  name)
virtual

Sets the name of the component.

Parameters
nameThe new name.
Exceptions
ComponentAlreadExistsSub class implementations may throw the exception if there exists another component by the same name in the machine already.
InvalidNameIf the given name is not a valid name for a component.

Reimplemented in TTAMachine::NullAddressSpace, TTAMachine::NullRegisterFile, TTAMachine::RegisterFile, TTAMachine::Bus, TTAMachine::Socket, TTAMachine::AddressSpace, TTAMachine::FunctionUnit, TTAMachine::ImmediateUnit, TTAMachine::Bridge, TTAMachine::InstructionTemplate, UnboundedRegisterFile, TTAMachine::ImmediateSlot, and TTAMachine::NullInstructionTemplate.

Definition at line 142 of file MachinePart.cc.

142  {
144  const string procName = "Component::setName";
145  MOMTextGenerator textGen;
146  format errorMsg = textGen.text(MOMTextGenerator::TXT_INVALID_NAME);
147  errorMsg % name;
148  throw InvalidName(__FILE__, __LINE__, procName, errorMsg.str());
149  }
150 
151  name_ = name;
152 }

References MachineTester::isValidComponentName(), name(), name_, Texts::TextGenerator::text(), and MOMTextGenerator::TXT_INVALID_NAME.

Referenced by Component(), loadState(), TTAMachine::ImmediateSlot::setName(), TTAMachine::InstructionTemplate::setName(), TTAMachine::Bridge::setName(), TTAMachine::ImmediateUnit::setName(), TTAMachine::FunctionUnit::setName(), TTAMachine::AddressSpace::setName(), TTAMachine::Socket::setName(), TTAMachine::Bus::setName(), and TTAMachine::RegisterFile::setName().

Here is the call graph for this function:

◆ unsetMachine()

virtual void TTAMachine::Component::unsetMachine ( )
pure virtual

Member Data Documentation

◆ machine_

Machine* TTAMachine::Component::machine_
private

Machine to which the component is registered.

Definition at line 155 of file MachinePart.hh.

Referenced by isRegistered().

◆ name_

std::string TTAMachine::Component::name_
private

Name of the component.

Definition at line 153 of file MachinePart.hh.

Referenced by name(), and setName().

◆ OSKEY_NAME

const string TTAMachine::Component::OSKEY_NAME = "name"
static

ObjectState attribute key for the name of the component.

Definition at line 137 of file MachinePart.hh.

Referenced by Component(), loadState(), TTAMachine::Machine::loadState(), TTAMachine::AddressSpace::saveState(), and saveState().

◆ OSNAME_COMPONENT

const string TTAMachine::Component::OSNAME_COMPONENT = "component"
static

ObjectState name for component.

Definition at line 135 of file MachinePart.hh.

Referenced by saveState().


The documentation for this class was generated from the following files:
TTAMachine::Component::setName
virtual void setName(const std::string &name)
Definition: MachinePart.cc:142
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
ObjectState::stringAttribute
std::string stringAttribute(const std::string &name) const
Definition: ObjectState.cc:249
ObjectStateLoadingException
Definition: Exception.hh:551
ObjectState
Definition: ObjectState.hh:59
MOMTextGenerator::TXT_INVALID_NAME
@ TXT_INVALID_NAME
Definition: MOMTextGenerator.hh:84
Texts::TextGenerator::text
virtual boost::format text(int textId)
Definition: TextGenerator.cc:94
TTAMachine::MachinePart::MachinePart
MachinePart()
Definition: MachinePart.cc:55
TTAMachine::Component::machine_
Machine * machine_
Machine to which the component is registered.
Definition: MachinePart.hh:155
InvalidName
Definition: Exception.hh:827
MOMTextGenerator::TXT_SAME_NAME
@ TXT_SAME_NAME
Definition: MOMTextGenerator.hh:83
TTAMachine::Component::OSKEY_NAME
static const std::string OSKEY_NAME
ObjectState attribute key for the name of the component.
Definition: MachinePart.hh:137
Exception
Definition: Exception.hh:54
MachineTester::isValidComponentName
static bool isValidComponentName(const std::string &name)
Definition: MachineTester.cc:312
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
IllegalRegistration
Definition: Exception.hh:532
TTAMachine::Component::OSNAME_COMPONENT
static const std::string OSNAME_COMPONENT
ObjectState name for component.
Definition: MachinePart.hh:135
TTAMachine::Component::machine
virtual Machine * machine() const
MOMTextGenerator
Definition: MOMTextGenerator.hh:40
ComponentAlreadyExists
Definition: Exception.hh:510
KeyNotFound
Definition: Exception.hh:285
TTAMachine::Component::name_
std::string name_
Name of the component.
Definition: MachinePart.hh:153
ObjectState::setAttribute
void setAttribute(const std::string &name, const std::string &value)
Definition: ObjectState.cc:100