OpenASIP
2.0
|
#include <BaseFUPort.hh>
Public Member Functions | |
virtual | ~BaseFUPort () |
FunctionUnit * | parentUnit () const |
virtual int | width () const |
void | setWidth (int width) |
virtual bool | isTriggering () const =0 |
virtual bool | isOpcodeSetting () const =0 |
virtual ObjectState * | saveState () const |
virtual void | loadState (const ObjectState *state) |
Public Member Functions inherited from TTAMachine::Port | |
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 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 bool | isOutput () const |
virtual bool | isInput () const |
Public Member Functions inherited from Serializable | |
virtual | ~Serializable () |
Static Public Attributes | |
static const std::string | OSKEY_WIDTH = "width" |
ObjectState attribute key for bit width of the port. More... | |
Static Public Attributes inherited from TTAMachine::Port | |
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 | |
BaseFUPort (const std::string &name, int width, FunctionUnit &parent) | |
BaseFUPort (const ObjectState *state, Unit &parent) | |
Protected Member Functions inherited from TTAMachine::Port | |
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 | |
void | loadStateWithoutReferences (const ObjectState *state) |
Private Attributes | |
int | width_ |
Bit width of the port. More... | |
BaseFUPort is an abstract base class for FUPort and SpecialRegisterPort classes.
Definition at line 44 of file BaseFUPort.hh.
|
virtual |
|
protected |
The constructor.
name | Name of the port. |
width | Bit width of the port. |
parent | The function unit to which the port belongs. |
InvalidName | If the given name is not a valid component name. |
ComponentAlreadyExists | If the function unit already has another port by the same name or another port that sets operation code. |
OutOfRange | If the given bit width is less or equal to zero. |
Definition at line 58 of file BaseFUPort.cc.
References width().
|
protected |
The constructor.
Loads the state of the object from the given ObjectState tree.
state | The ObjectState tree. |
Unit | The parent unit of the port. |
ObjectStateLoadingException | If an error occurs while loading the state. |
Definition at line 76 of file BaseFUPort.cc.
References loadStateWithoutReferences().
|
pure virtual |
Implemented in TTAMachine::SpecialRegisterPort, and TTAMachine::FUPort.
Referenced by BEMGenerator::addPortCodes(), MachineStateBuilder::addPortToFU(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), BEMValidator::checkSocketCodeTable(), TTAProgram::TerminalFUPort::equals(), HDBToHtml::fuArchToHtml(), TTAMachine::FUPort::FUPort(), TTAProgram::TerminalFUPort::isOpcodeSetting(), TTAMachine::FUPort::loadStateWithoutReferences(), BEMValidator::needsSocketCodeTable(), TTAProgram::TerminalFUPort::operation(), FUTestbenchGenerator::parseFuPorts(), SimProgramBuilder::processBidirTerminal(), TTAProgram::TerminalFUPort::TerminalFUPort(), and DefaultDecoderGenerator::writeControlRulesOfFUInputPort().
|
pure virtual |
Implemented in TTAMachine::SpecialRegisterPort, and TTAMachine::FUPort.
Referenced by ProgrammabilityValidator::addConnectionToProgram(), MachineStateBuilder::addPortToFU(), UtilizationStats::calculateForInstruction(), DefaultDecoderGenerator::completeDecoderBlock(), ProgrammabilityValidator::findConnections(), HDBToHtml::fuArchToHtml(), TTAProgram::TerminalFUPort::isTriggering(), ProgrammabilityValidator::printConnection(), TTAMachine::FUPort::setTriggering(), ExecutionPipelineBroker::setupResourceLinks(), ProgramOperation::triggeringMove(), GCUDialog::updatePortList(), and DefaultDecoderGenerator::writeControlRegisterMappings().
|
virtual |
Loads the state of the function unit port from the given ObjectState instance.
state | The ObjectState instance. |
ObjectStateLoadingException | If the given ObjectState instance is invalid or if connections to socket cannot be made. |
Reimplemented from TTAMachine::Port.
Reimplemented in TTAMachine::FUPort, TTAMachine::SpecialRegisterPort, and UniversalFUPort.
Definition at line 153 of file BaseFUPort.cc.
References TTAMachine::Port::loadState(), and loadStateWithoutReferences().
Referenced by TTAMachine::SpecialRegisterPort::loadState(), and TTAMachine::FUPort::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 167 of file BaseFUPort.cc.
References Exception::errorMessage(), ObjectState::intAttribute(), OSKEY_WIDTH, and setWidth().
Referenced by BaseFUPort(), and loadState().
FunctionUnit * TTAMachine::BaseFUPort::parentUnit | ( | ) | const |
Returns the parent function unit of the port.
Returns NULL in case not registered to a function unit.
Definition at line 96 of file BaseFUPort.cc.
References TTAMachine::Port::parentUnit().
Referenced by BEMGenerator::addEncodings(), MachineStateBuilder::addPortToFU(), MachineStateBuilder::addVirtualOpcodeSettingPortsToFU(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), TTAMachine::HWOperation::bindPort(), MachineStateBuilder::buildMachineState(), UtilizationStats::calculateForInstruction(), BEMValidator::checkGuardField(), TTAMachine::FunctionUnit::cleanupGuards(), TTAMachine::FUPort::cleanupOperandBindings(), FullyConnectedCheck::connectFUPort(), FullyConnectedCheck::connectSpecialRegisterPort(), ADFCombiner::copyGuards(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createGuard(), ProximFUPortDetailsCmd::Do(), InterpolatingFUEstimator::estimatePortReadDelay(), InterpolatingFUEstimator::estimatePortWriteDelay(), DefaultDecoderGenerator::findGuard(), TTAProgram::TerminalFUPort::findNewOperationIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), ProgramOperation::fuFromOutMove(), TTAProgram::TerminalFUPort::functionUnit(), CostEstimator::Estimator::functionUnitPortReadDelay(), CostEstimator::Estimator::functionUnitPortWriteDelay(), CompiledSimCodeGenerator::generateAddFUResult(), DefaultDecoderGenerator::guardPortName(), TTAMachine::FUPort::loadStateWithoutReferences(), CostEstimator::Estimator::longestPath(), BEMGenerator::needsSocketCodeTable(), OperationDialog::onBindOperand(), OperationDialog::onOperandSelection(), BFLateBypassGuard::operator()(), BFEarlyGuardBypass::operator()(), TTAMachine::PortGuard::PortGuard(), BF2Scheduler::preAllocateFunctionUnits(), BF2Scheduler::releasePortForOp(), BF2Scheduler::reservePreallocatedFUs(), TTAMachine::PortGuard::saveState(), TTAMachine::ControlUnit::setReturnAddressPort(), TTAMachine::FUPort::setTriggering(), MachineInfo::supportsPortGuardedJump(), ProGe::RV32MicroCodeGenerator::throwInputPortError(), ProGe::RV32MicroCodeGenerator::throwOutputPortError(), ProGe::RV32MicroCodeGenerator::throwTriggeringPortError(), ProgramOperation::triggeringMove(), TTAMachine::FUPort::updateBindingString(), BusDialog::updateGuardLists(), OperationDialog::updateOperandList(), DefaultDecoderGenerator::writeControlRulesOfFUInputPort(), and DefaultDecoderGenerator::writeControlRulesOfFUOutputPort().
|
virtual |
Saves the contents of the function unit port to an ObjectState object.
Reimplemented from TTAMachine::Port.
Reimplemented in TTAMachine::FUPort, and TTAMachine::SpecialRegisterPort.
Definition at line 136 of file BaseFUPort.cc.
References OSKEY_WIDTH, TTAMachine::Port::saveState(), ObjectState::setAttribute(), and width_.
Referenced by TTAMachine::SpecialRegisterPort::saveState(), and TTAMachine::FUPort::saveState().
void TTAMachine::BaseFUPort::setWidth | ( | int | width | ) |
Sets the bit width of the port.
width | The new bit width. |
OutOfRange | If the given bit width is less or equal to zero. |
Definition at line 121 of file BaseFUPort.cc.
References width(), and width_.
Referenced by ProGe::NetlistGenerator::addFUToNetlist(), ProGe::ProcessorGenerator::iMemAddressWidth(), and loadStateWithoutReferences().
|
virtual |
Returns the bit width of the port.
Implements TTAMachine::Port.
Definition at line 109 of file BaseFUPort.cc.
References width_.
Referenced by HDB::HDBManager::addFUArchitecture(), ProGe::NetlistGenerator::addFUToNetlist(), MachineStateBuilder::addPortToFU(), BaseFUPort(), OpsetDialog::bindPorts(), CostDatabase::buildFunctionUnits(), MachineValidator::checkIMemAddrWidth(), MachineValidator::checkRAPortHasSameWidthAsPCPort(), FUGen::createMandatoryPorts(), OpsetDialog::createOperation(), InterpolatingFUEstimator::createSearch(), FUGen::createShadowRegisters(), FUTestbenchGenerator::createStimulusArrays(), FUTestbenchGenerator::createTbInstantiation(), UniversalFunctionUnit::ensureInputPorts(), UniversalFunctionUnit::ensureOutputPorts(), ComponentImplementationSelector::fuArchsByOpSetWithMinLatency(), HDBToHtml::fuArchToHtml(), ProGeTestBenchGenerator::generate(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), CompiledSimCodeGenerator::handleOperationWithoutDag(), ProGe::ProcessorGenerator::iMemAddressWidth(), TTAMachine::FUPort::isArchitectureEqual(), HDB::HDBManager::isMatchingArchitecture(), HDB::FUArchitecture::operator==(), UniversalFunctionUnit::portWithWidth(), ProGe::ProGeUI::readImemParameters(), PlatformIntegrator::readLsuParameters(), FUGen::scheduleOperations(), setWidth(), GCUDialog::updatePortList(), and FUDialog::updatePortList().
|
static |
ObjectState attribute key for bit width of the port.
Definition at line 60 of file BaseFUPort.hh.
Referenced by loadStateWithoutReferences(), and saveState().
|
private |
Bit width of the port.
Definition at line 70 of file BaseFUPort.hh.
Referenced by saveState(), setWidth(), and width().