OpenASIP
2.0
|
#include <Port.hh>
Classes | |
struct | PairComparator |
Public Member Functions | |
Port (const std::string &name, Unit &parentUnit) | |
Port (const ObjectState *state, Unit &parentUnit) | |
virtual | ~Port () |
virtual std::string | name () const |
virtual void | setName (const std::string &name) |
virtual int | width () const =0 |
virtual void | attachSocket (Socket &socket) |
virtual void | detachSocket (Socket &socket) |
virtual void | detachAllSockets () |
Unit * | parentUnit () const |
virtual Socket * | inputSocket () const |
virtual Socket * | outputSocket () const |
virtual Socket * | unconnectedSocket (int index) const |
virtual int | socketCount () const |
virtual bool | isConnectedTo (const Socket &socket) const |
virtual ObjectState * | saveState () const |
virtual void | loadState (const ObjectState *state) |
virtual bool | isOutput () const |
virtual bool | isInput () const |
Public Member Functions inherited from Serializable | |
virtual | ~Serializable () |
Static Public Attributes | |
static const std::string | OSNAME_PORT = "port" |
ObjectState name for Port. More... | |
static const std::string | OSKEY_NAME = "name" |
ObjectState attribute key for the name of the port. More... | |
static const std::string | OSKEY_FIRST_SOCKET = "1_socket" |
ObjectState attribute key for the name of the connected socket. More... | |
static const std::string | OSKEY_SECOND_SOCKET = "2_socket" |
ObjectState attribute key for the name of the other connected socket. More... | |
Protected Member Functions | |
Port (const std::string &name, FunctionUnit &parentUnit) | |
Protected Member Functions inherited from TTAMachine::SubComponent | |
SubComponent () | |
virtual | ~SubComponent () |
Protected Member Functions inherited from TTAMachine::MachinePart | |
MachinePart () | |
virtual | ~MachinePart () |
Private Member Functions | |
Port (const Port &) | |
Copying forbidden. More... | |
Port & | operator= (const Port &) |
Assingment forbidden. More... | |
void | loadStateWithoutReferences (const ObjectState *state) |
void | attachSocket (const std::string &socketName) |
Private Attributes | |
std::string | name_ |
Name of the port. More... | |
Unit * | parentUnit_ |
Parent unit. More... | |
Socket * | socket1_ |
Connection to the first socket. More... | |
Socket * | socket2_ |
Connection to the second socket. More... | |
TTAMachine::Port::Port | ( | const std::string & | name, |
Unit & | parentUnit | ||
) |
Constructor.
name | Name of the port. |
parentUnit | Unit to which the port is connected. |
ComponentAlreadyExists | If the parent unit already has another port by the same name. |
InvalidName | If the given name is not a valid name for a component. |
Definition at line 67 of file Port.cc.
References TTAMachine::Unit::addPort(), MachineTester::isValidComponentName(), name(), parentUnit(), and parentUnit_.
TTAMachine::Port::Port | ( | const ObjectState * | state, |
Unit & | parentUnit | ||
) |
Constructor.
Loads its state from the given ObjectState instance but does not create connections to sockets.
state | The ObjectState instance. |
parentUnit | The unit which contains the port. |
ObjectStateLoadingException | If the given ObjectState instance is invalid. |
Definition at line 93 of file Port.cc.
References TTAMachine::Unit::addPort(), loadStateWithoutReferences(), name(), TTAMachine::Component::name(), parentUnit(), parentUnit_, Texts::TextGenerator::text(), and MOMTextGenerator::TXT_PORT_EXISTS_BY_NAME.
|
virtual |
Destructor.
Definition at line 117 of file Port.cc.
References assert, detachSocket(), parentUnit_, TTAMachine::Unit::removePort(), socket1_, and socket2_.
|
protected |
|
private |
Copying forbidden.
|
private |
Attaches the socket by the given name to the port.
The given socket must be registered to the same machine as the parent unit.
socketName | Name of the socket to be attached. |
InstanceNotFound | If the given socket is not found from the machine. |
IllegalRegistration | If the parent unit is not registered to a machine. |
ComponentAlreadyExists | If a socket by the given name is already attached. |
IllegalConnectivity | If the socket cannot be attached because of connectivity reasons. |
Definition at line 516 of file Port.cc.
References attachSocket(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), parentUnit(), and TTAMachine::Machine::socketNavigator().
|
virtual |
Attaches a socket to this port.
NOTE! If the parent unit is a register file, attaching a socket may affect to the maximum simultaneous reads of the register file.
socket | Socket to be attached. |
IllegalRegistration | If the port and socket are not in the same machine. |
ComponentAlreadyExists | If the given socket is already attached. |
IllegalConnectivity | If the socket cannot be attached because of connectivity reasons. |
Definition at line 191 of file Port.cc.
References assert, TTAMachine::Socket::attachPort(), MachineTester::canConnect(), MachineTester::connectionExists(), TTAMachine::Socket::direction(), TTAMachine::Component::ensureRegistration(), TTAMachine::Component::machine(), TTAMachine::Machine::machineTester(), parentUnit(), socket1_, socket2_, MachineTestReporter::socketPortConnectionError(), and TTAMachine::Socket::UNKNOWN.
Referenced by attachSocket(), BlocksFU::BlocksFU(), RemoveUnconnectedComponents::checkFUPorts(), RemoveUnconnectedComponents::checkRFPorts(), FullyConnectedCheck::connectFUPort(), FullyConnectedCheck::connectIUPort(), ADFCombiner::connectPorts(), FullyConnectedCheck::connectRFPort(), FullyConnectedCheck::connectSpecialRegisterPort(), ADFCombiner::connectVectorLSU(), UniversalMachine::construct(), ADFCombiner::createPortsAndSockets(), SocketPortConnCmd::Do(), UniversalFunctionUnit::ensureInputPorts(), UniversalFunctionUnit::ensureOutputPorts(), VLIWConnectIC::explore(), and loadState().
|
virtual |
Detaches all the sockets connected to the port.
NOTE! If the parent unit is a register file, detaching sockets may affect to the maximum simultaneous reads of the register file.
Definition at line 536 of file Port.cc.
References TTAMachine::Socket::detachPort(), socket1_, and socket2_.
Referenced by loadState(), and TTAMachine::Unit::unsetMachine().
|
virtual |
Detaches a socket from this port.
NOTE! If the parent unit is a register file, detaching a socket may affect to the maximum simultaneous reads of the register file.
socket | Socket to be detached. |
InstanceNotFound | If the given socket is not connected to the port. |
Definition at line 237 of file Port.cc.
References TTAMachine::Socket::detachPort(), socket1_, and socket2_.
Referenced by SocketPortConnCmd::Do(), and ~Port().
|
virtual |
Returns the input socket of the port.
If the port does not have input socket (socket whose direction is Socket::INPUT), returns NULL.
Definition at line 261 of file Port.cc.
References TTAMachine::Socket::direction(), TTAMachine::Socket::INPUT, socket1_, and socket2_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), MachineStateBuilder::addPortToFU(), InputPSocketBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), BusBroker::allAvailableResources(), MachineConnectivityCheck::appendConnectedSourceBuses(), InputPSocketBroker::assign(), MachineConnectivityCheck::busConnectedToPort(), MachineTester::canConnect(), MachineConnectivityCheck::canWriteAllImmediates(), OperationBindingCheck::check(), POMValidator::checkConnectivity(), FullyConnectedCheck::connectFUPort(), ADFCombiner::connectPorts(), ProGe::RV32MicroCodeGenerator::connectRF(), UnitPortFactory::createEditPart(), OpsetDialog::createOperation(), ADFCombiner::createPortsAndSockets(), TTAProgram::Move::destinationSocket(), CodeCompressorPlugin::encodeFUTerminal(), CodeCompressorPlugin::encodeIUTerminal(), CodeCompressorPlugin::encodeRFTerminal(), UniversalFunctionUnit::ensureInputPorts(), ProgrammabilityValidator::findConnections(), TTAMachine::RegisterFile::firstWritePort(), FullyConnectedCheck::fix(), MachineConnectivityCheck::fromRfConnected(), InputPSocketBroker::isAlreadyAssigned(), BusBroker::isAvailable(), MachineConnectivityCheck::isConnected(), isInput(), MachineTester::legalPortConnections(), MachineAnalysis::MachineAnalysis(), MachineConnectivityCheck::needsRegisterCopiesDueImmediateOperands(), BlockImplementationDialog::onHDBSelection(), SmartHWOperation::port(), ProgrammabilityValidator::printConnection(), MachineResourceManager::registerFileIndexReference(), HDB::RFArchitecture::RFArchitecture(), ComponentImplementationSelector::rfImplementations(), MachineResourceManager::rFPortOrFUIndexReference(), ExecutionPipelineBroker::setupResourceLinks(), InputFUBroker::setupResourceLinks(), MachineConnectivityCheck::toRfConnected(), InputPSocketBroker::unassign(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), DefaultDecoderGenerator::writeControlRulesOfRFReadPort(), DefaultDecoderGenerator::writeControlRulesOfRFWritePort(), DefaultDecoderGenerator::writeFUCntrlSignals(), and DefaultDecoderGenerator::writeRulesForDestinationControlSignals().
|
virtual |
Checks whether the port is connected to the given socket.
socket | The socket. |
Definition at line 393 of file Port.cc.
References socket1_, and socket2_.
Referenced by MachineTester::canConnect(), ProDePortEditPolicy::canHandle(), ProDeSocketEditPolicy::canHandle(), ADFCombiner::connectVectorLSU(), SocketPortConnCmd::Do(), and ConnectTool::figure().
|
virtual |
Returns true if this port can be used to read data from bus to the unit.
Definition at line 298 of file Port.cc.
References inputSocket().
Referenced by ProGe::RV32MicroCodeGenerator::addBPorts(), RegisterCopyAdder::addConnectionRegisterCopies(), ProGe::NetlistGenerator::addGCUToNetlist(), ProGe::NetlistGenerator::addGeneratableFUsToNetlist(), ProGe::RV32MicroCodeGenerator::addRPorts(), ProGe::RV32MicroCodeGenerator::addSPorts(), TDGen::analyzeMachineRegisters(), TDGen::analyzeRegisters(), TTAMachine::Unit::bidirPortCount(), RFPortCheck::check(), DefaultDecoderGenerator::completeDecoderBlock(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), FUGen::createMandatoryPorts(), FUGen::createShadowRegisters(), TTAProgram::CodeGenerator::createTerminalRegister(), MachineConnectivityCheck::findWritePorts(), CompiledSimCodeGenerator::generateTriggerCode(), TTAMachine::Unit::inputPortCount(), ProGe::NetlistGenerator::netlistPort(), TTAMachine::HWOperation::numberOfInputs(), TTAMachine::Unit::outputPortCount(), PlatformIntegrator::readLsuParameters(), TTAMachine::RegisterFile::updateMaxReadsAndWrites(), and DefaultDecoderGenerator::writeControlRegisterMappings().
|
virtual |
Returns true if this port can be used to write data from unit to bus.
Definition at line 308 of file Port.cc.
References outputSocket().
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProGe::NetlistGenerator::addGCUToNetlist(), ProGe::RV32MicroCodeGenerator::addIPorts(), ProGe::RV32MicroCodeGenerator::addRPorts(), ProGe::RV32MicroCodeGenerator::addUJPorts(), TDGen::analyzeMachineRegisters(), TDGen::analyzeRegisters(), TTAMachine::Unit::bidirPortCount(), FUGen::checkForValidity(), SimulatorFrontend::compareState(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), TTAProgram::CodeGenerator::createTerminalRegister(), llvm::LLVMTCEBuilder::createTerminalRegister(), llvm::LLVMTCEBuilder::emitSPInitialization(), MachineConnectivityCheck::findPossibleSourcePorts(), MachineConnectivityCheck::findReadPorts(), CompiledSimCodeGenerator::fuOutputPorts(), CompiledSimCodeGenerator::generateTriggerCode(), getOutputPort(), CompiledSimCodeGenerator::handleOperationWithoutDag(), TTAMachine::Unit::inputPortCount(), ProGe::NetlistGenerator::netlistPort(), TTAMachine::HWOperation::numberOfOutputs(), TTAMachine::Unit::outputPortCount(), FUGen::parseOperations(), TTAMachine::RegisterFile::updateMaxReadsAndWrites(), and DefaultDecoderGenerator::writeRFCntrlSignals().
|
virtual |
Loads its state from the given ObjectState instance.
state | The ObjectState instance. |
ObjectStateLoadingException | If the parent unit has a port by the same name as the coming name of this unit or if loading the references to sockets fails. |
Implements Serializable.
Reimplemented in TTAMachine::FUPort, TTAMachine::SpecialRegisterPort, UniversalFUPort, TTAMachine::BaseFUPort, and TTAMachine::RFPort.
Definition at line 459 of file Port.cc.
References attachSocket(), detachAllSockets(), Exception::errorMessage(), ObjectState::hasAttribute(), loadStateWithoutReferences(), name(), TTAMachine::Component::name(), OSKEY_FIRST_SOCKET, OSKEY_SECOND_SOCKET, parentUnit(), ObjectState::stringAttribute(), Texts::TextGenerator::text(), MOMTextGenerator::TXT_PORT_EXISTS_BY_NAME, and MOMTextGenerator::TXT_PORT_REF_LOAD_ERR_SOCKET.
Referenced by TTAMachine::RFPort::loadState(), TTAMachine::BaseFUPort::loadState(), and TTAMachine::Unit::loadState().
|
private |
Loads its state from the given ObjectState instance but does not create connections to sockets.
state | The ObjectState instance. |
ObjectStateLoadingException | If the given ObjectState instance is invalid. |
Definition at line 434 of file Port.cc.
References Exception::errorMessage(), MachineTester::isValidComponentName(), name(), name_, OSKEY_NAME, and ObjectState::stringAttribute().
Referenced by loadState(), and Port().
|
virtual |
Returns the name of the port.
Definition at line 141 of file Port.cc.
References name_.
Referenced by CodeCompressorPlugin::addBitsForGuardField(), BEMGenerator::addEncodings(), HDB::HDBManager::addFUArchitecture(), ProGe::NetlistGenerator::addGCUToNetlist(), TTAMachine::Unit::addPort(), BEMGenerator::addPortCodes(), MachineStateBuilder::addPortToFU(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), BusBroker::allAvailableResources(), MachineStateBuilder::bindPortsToOperands(), CostDatabase::buildFunctionUnits(), MachineStateBuilder::buildMachineState(), UtilizationStats::calculateForInstruction(), FullyConnectedCheck::check(), POMValidator::checkConnectivity(), BEMValidator::checkGuardField(), ExecutionPipelineResource::checkOperandAllowed(), BEMValidator::checkSocketCodeTable(), SimulatorFrontend::compareState(), DefaultDecoderGenerator::completeDecoderBlock(), ADFCombiner::connectVectorLSU(), TTAProgram::ProgramWriter::createCodeSection(), UnitPortFactory::createEditPart(), POMDisassembler::createFUPort(), POMDisassembler::createGuard(), FUGen::createMandatoryPorts(), ADFCombiner::createPortsAndSockets(), FUGen::createShadowRegisters(), TTAMachine::Unit::deleteOtherPorts(), AddFUImplementationCmd::Do(), ProximFUDetailsCmd::Do(), ProximFUPortDetailsCmd::Do(), CodeCompressorPlugin::encodeFUTerminal(), InterpolatingRFEstimator::estimatePortReadDelay(), InterpolatingFUEstimator::estimatePortReadDelay(), InterpolatingRFEstimator::estimatePortWriteDelay(), InterpolatingFUEstimator::estimatePortWriteDelay(), InfoPortsCommand::execute(), BlocksConnectIC::explore(), CostEstimator::Estimator::findAllICPaths(), DefaultDecoderGenerator::findGuard(), SimulatorFrontend::findPort(), HDBToHtml::fuArchToHtml(), TTAProgram::TPEFResourceUpdater::functionUnitPort(), CostEstimator::Estimator::functionUnitPortReadDelay(), CostEstimator::Estimator::functionUnitPortWriteDelay(), CompiledSimCodeGenerator::generateAddFUResult(), ProximPortEditPolicy::getCommand(), ProDePortEditPolicy::getCommand(), getOutputPort(), DefaultDecoderGenerator::guardPortName(), TTAMachine::HWOperation::io(), BusBroker::isAvailable(), HDB::HDBManager::isMatchingArchitecture(), loadState(), TTAMachine::HWOperation::loadState(), TTAMachine::FUPort::loadStateWithoutReferences(), loadStateWithoutReferences(), CostEstimator::Estimator::longestPath(), main(), ProGe::NetlistGenerator::netlistPort(), GCUDialog::onEditPort(), AddWatchDialog::onFUChoice(), FUGuardDialog::onFUChoice(), RFPortDialog::onOK(), IUPortDialog::onOK(), FUArchitectureDialog::onOK(), SRPortDialog::onOK(), FUPortDialog::onOK(), OperationDialog::onOperandSelection(), ExecutionPipelineResource::operandAllowedAtCycle(), operandBindingsString(), ExecutionPipelineResource::operandOverwritten(), HDB::FUArchitecture::operator==(), FUTestbenchGenerator::parseFuPorts(), FUGen::parseOperations(), Port(), TTAMachine::PortGuard::PortGuard(), CompiledSimSymbolGenerator::portSymbol(), BF2Scheduler::preAllocateFunctionUnits(), SimProgramBuilder::processBidirTerminal(), CostEstimator::Estimator::registerFilePortReadDelay(), CostEstimator::Estimator::registerFilePortWriteDelay(), BF2Scheduler::releasePortForOp(), HDB::HDBManager::resolveArchitecturePort(), MachineResourceManager::rFPortOrFUIndexReference(), saveState(), TTAMachine::PortGuard::saveState(), FUGen::scheduleOperations(), setName(), MachineTestReporter::socketDirectionSettingError(), MachineTestReporter::socketPortConnectionError(), MachineTestReporter::socketSegmentConnectionError(), SimulatorFrontend::state(), ProGe::RV32MicroCodeGenerator::throwInputPortError(), ProGe::RV32MicroCodeGenerator::throwOutputPortError(), ProGe::RV32MicroCodeGenerator::throwTriggeringPortError(), ProximPortWindow::update(), FUArchitectureDialog::update(), BusDialog::updateGuardLists(), GCUDialog::updatePortList(), FUDialog::updatePortList(), GCUDialog::updateRAPortChoice(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), DefaultDecoderGenerator::writeControlRulesOfFUOutputPort(), DefaultDecoderGenerator::writeControlRulesOfRFReadPort(), DefaultDecoderGenerator::writeControlRulesOfRFWritePort(), DefaultDecoderGenerator::writeFUCntrlSignals(), DefaultDecoderGenerator::writeRFCntrlSignals(), and DefaultDecoderGenerator::writeRFSRAMDecodingProcess().
|
virtual |
Returns the output socket of the port.
If the port does not have output socket (socket whose direction is Socket::OUTPUT), returns NULL.
Definition at line 281 of file Port.cc.
References TTAMachine::Socket::direction(), TTAMachine::Socket::OUTPUT, socket1_, and socket2_.
Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), MachineStateBuilder::addPortToFU(), OutputPSocketBroker::allAvailableResources(), BusBroker::allAvailableResources(), MachineConnectivityCheck::appendConnectedDestinationBuses(), OutputFUBroker::assign(), OutputPSocketBroker::assign(), MachineTester::canConnect(), OperationBindingCheck::check(), POMValidator::checkConnectivity(), FullyConnectedCheck::connectFUPort(), ADFCombiner::connectPorts(), ProGe::RV32MicroCodeGenerator::connectRF(), UnitPortFactory::createEditPart(), OpsetDialog::createOperation(), ADFCombiner::createPortsAndSockets(), CodeCompressorPlugin::encodeFUTerminal(), CodeCompressorPlugin::encodeIUTerminal(), CodeCompressorPlugin::encodeRFTerminal(), UniversalFunctionUnit::ensureOutputPorts(), VLIWConnectIC::explore(), ProgrammabilityValidator::findConnections(), TTAMachine::RegisterFile::firstReadPort(), FullyConnectedCheck::fix(), MachineConnectivityCheck::fromRfConnected(), MachineConnectivityCheck::immBits(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAnyResourceAvailable(), BusBroker::isAvailable(), MachineConnectivityCheck::isConnected(), isOutput(), MachineTester::legalPortConnections(), MachineAnalysis::MachineAnalysis(), BlockImplementationDialog::onHDBSelection(), SmartHWOperation::port(), ProgrammabilityValidator::printConnection(), MachineResourceManager::registerFileIndexReference(), HDB::RFArchitecture::RFArchitecture(), ComponentImplementationSelector::rfImplementations(), MachineResourceManager::rFPortOrFUIndexReference(), ExecutionPipelineBroker::setupResourceLinks(), OutputFUBroker::setupResourceLinks(), IUBroker::setupResourceLinks(), TTAProgram::Move::sourceSocket(), MachineConnectivityCheck::toRfConnected(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeControlRulesOfFUOutputPort(), DefaultDecoderGenerator::writeControlRulesOfRFReadPort(), DefaultDecoderGenerator::writeRFCntrlSignals(), DefaultDecoderGenerator::writeRFSRAMDecodingProcess(), and DefaultDecoderGenerator::writeRulesForSourceControlSignals().
Unit* TTAMachine::Port::parentUnit | ( | ) | const |
Referenced by CodeCompressorPlugin::addBitsForGuardField(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), ProgrammabilityValidator::addConnectionToProgram(), ProgrammabilityValidator::addDirectConnection(), ProgrammabilityValidator::addGlobalRegisterConnection(), TTAMachine::Unit::addPort(), BEMGenerator::addPortCodes(), BusBroker::allAvailableResources(), InputPSocketBroker::assign(), OutputPSocketBroker::assign(), attachSocket(), MachineConnectivityCheck::busConnectedToDestination(), OutputPSocketResource::canAssign(), MachineTester::canConnect(), ProDeSocketEditPolicy::canHandle(), MachineConnectivityCheck::canWriteAllImmediates(), POMValidator::checkConnectivity(), BEMValidator::checkSocketCodeTable(), TTAMachine::FUPort::cleanupGuards(), TTAMachine::FUPort::cleanupOperandBindings(), TTAProgram::TPEFProgramFactory::createInstruction(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), CostEstimator::Estimator::findAllICPaths(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), MachineConnectivityCheck::findRoutes(), TTAProgram::TPEFResourceUpdater::functionUnitPort(), BF2Scheduler::getDstUnit(), ProgramOperation::hwopFromOutMove(), BusBroker::isAvailable(), MachineConnectivityCheck::isPortApplicableToWidths(), MachineTester::legalPortConnections(), loadState(), TTAMachine::FUPort::loadStateWithoutReferences(), CostEstimator::Estimator::longestPath(), main(), BEMValidator::needsSocketCodeTable(), ProGe::NetlistGenerator::netlistPort(), ProgramOperation::outputIndexFromGuard(), TTAMachine::BaseFUPort::parentUnit(), TTAMachine::RFPort::parentUnit(), ExecutionPipelineResource::poConflictsWithInputPort(), Port(), CompiledSimSymbolGenerator::portSymbol(), ProgrammabilityValidator::printConnection(), SimProgramBuilder::processBidirTerminal(), SimpleICOptimizer::removeAllConnections(), TTAMachine::Unit::removePort(), RegisterRenamer::renameLiveRange(), TTAProgram::TPEFProgramFactory::resolveSocketAllocations(), setName(), InputPSocketBroker::setupResourceLinks(), OutputPSocketBroker::setupResourceLinks(), MachineTestReporter::socketDirectionSettingError(), MachineTestReporter::socketPortConnectionError(), MachineTestReporter::socketSegmentConnectionError(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), and TTAProgram::ProgramWriter::terminalResource().
|
virtual |
Saves the contents to an ObjectState tree.
Implements Serializable.
Reimplemented in TTAMachine::FUPort, TTAMachine::SpecialRegisterPort, TTAMachine::BaseFUPort, and TTAMachine::RFPort.
Definition at line 404 of file Port.cc.
References name(), TTAMachine::Component::name(), OSKEY_FIRST_SOCKET, OSKEY_NAME, OSKEY_SECOND_SOCKET, OSNAME_PORT, ObjectState::setAttribute(), socket1_, and socket2_.
Referenced by TTAMachine::RFPort::saveState(), TTAMachine::BaseFUPort::saveState(), and TTAMachine::Unit::saveState().
|
virtual |
Sets the name of the port.
name | The new name. |
ComponentAlreadyExists | If a port with the given name already exists in the same unit. |
InvalidName | If the given name is not a valid component name. |
Reimplemented in UniversalFUPort.
Definition at line 155 of file Port.cc.
References MachineTester::isValidComponentName(), name(), name_, parentUnit(), TTAMachine::Unit::port(), and TTAMachine::Unit::portCount().
Referenced by AddFUFromHDBDialog::onAdd().
|
virtual |
Returns the number of sockets attached to the port.
Definition at line 375 of file Port.cc.
References socket1_, and socket2_.
Referenced by MachineTester::canConnect(), FullyConnectedCheck::check(), MachineValidator::checkFUConnections(), RemoveUnconnectedComponents::checkFUPorts(), RemoveUnconnectedComponents::checkRFPorts(), FullyConnectedCheck::connectControlUnit(), ADFCombiner::connectVectorLSU(), FullyConnectedCheck::fix(), RemoveUnconnectedComponents::removeUnconnectedFUs(), and unconnectedSocket().
|
virtual |
Returns the first or the second unconnected socket attached to this port. If there is no such socket, returns NULL.
index | The index which indicates which of the unconnected sockets is returned. If there is only one unconnected socket, the index value 0 returns it and value 1 returns NULL. |
OutOfRange | If the given index is not 0 or 1. |
Definition at line 323 of file Port.cc.
References Application::abortProgram(), TTAMachine::Socket::segmentCount(), socket1_, socket2_, socketCount(), and Application::writeToErrorLog().
Referenced by MachineTester::canConnect(), ADFCombiner::connectPorts(), and UnitPortFactory::createEditPart().
|
pure virtual |
Implemented in TTAMachine::RFPort, and TTAMachine::BaseFUPort.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProGe::NetlistGenerator::addGCUToNetlist(), DefaultICDecoderEstimator::busParameters(), BusResource::canAssign(), MachineConnectivityCheck::canWriteAllImmediates(), UnitPortFactory::createEditPart(), llvm::LLVMTCEBuilder::createMove(), DefaultICDecoderGenerator::dataPortWidth(), llvm::LLVMTCEBuilder::emitMove(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), MachineResourceManager::functionUnitPortResource(), CompiledSimCodeGenerator::generateInstruction(), DefaultICGenerator::inputSocketDataPortWidth(), DefaultICGenerator::maxOutputSocketDataPortWidth(), DefaultICGenerator::outputSocketDataPortWidth(), SimProgramBuilder::processMove(), MachineResourceManager::rFPortOrFUIndexReference(), DefaultICDecoderEstimator::socketParameters(), MachineConnectivityCheck::toRfConnected(), and DefaultICGenerator::writeInterconnectionNetwork().
|
private |
Name of the port.
Definition at line 107 of file Port.hh.
Referenced by loadStateWithoutReferences(), name(), and setName().
|
static |
ObjectState attribute key for the name of the connected socket.
Definition at line 84 of file Port.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState attribute key for the name of the port.
Definition at line 82 of file Port.hh.
Referenced by TTAMachine::Unit::loadState(), TTAMachine::Unit::loadStateWithoutReferences(), loadStateWithoutReferences(), TTAMachine::Unit::portNames(), and saveState().
|
static |
ObjectState attribute key for the name of the other connected socket.
Definition at line 86 of file Port.hh.
Referenced by loadState(), and saveState().
|
static |
|
private |
|
private |
Connection to the first socket.
Definition at line 111 of file Port.hh.
Referenced by attachSocket(), detachAllSockets(), detachSocket(), inputSocket(), isConnectedTo(), outputSocket(), saveState(), socketCount(), unconnectedSocket(), and ~Port().
|
private |
Connection to the second socket.
Definition at line 113 of file Port.hh.
Referenced by attachSocket(), detachAllSockets(), detachSocket(), inputSocket(), isConnectedTo(), outputSocket(), saveState(), socketCount(), unconnectedSocket(), and ~Port().