OpenASIP
2.0
|
#include <Machine.hh>
Classes | |
class | ComponentContainer |
class | Navigator |
Static Public Member Functions | |
static Machine * | loadFromADF (const std::string &adfFileName) |
Static Public Attributes | |
static const std::string | OSNAME_MACHINE = "machine" |
ObjectState name for Machine. More... | |
static const std::string | OSKEY_ALWAYS_WRITE_BACK_RESULTS = "always-write-back" |
ObjectState attribute key for always-write-back-results. More... | |
static const std::string | OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS = "trigger-invalidates" |
ObjectState attribute key for trigger-invalidates-old-results. More... | |
static const std::string | OSKEY_FUNCTION_UNITS_ORDERED = "fu-ordered" |
ObjectState attribute key for function units ordered in order of their sequential presence in ADF. More... | |
Private Member Functions | |
Machine & | operator= (const Machine &) |
Assignment not allowed. More... | |
template<typename ContainerType , typename ComponentType > | |
void | addComponent (ContainerType &container, ComponentType &toAdd) |
template<typename ContainerType , typename ComponentType > | |
void | addRegisteredComponent (ContainerType &container, ComponentType &toAdd) |
template<typename ContainerType , typename ComponentType > | |
void | removeComponent (ContainerType &container, ComponentType &toRemove) |
template<typename ContainerType , typename ComponentType > | |
void | deleteComponent (ContainerType &container, ComponentType &toDelete) |
Static Private Member Functions | |
template<typename ContainerType > | |
static void | saveComponentStates (ContainerType &container, ObjectState *parent) |
Private Attributes | |
ComponentContainer< Bus > | busses_ |
Contains all the busses attached to the machine. More... | |
ComponentContainer< Socket > | sockets_ |
Contains all the sockets attached to the machine. More... | |
ComponentContainer< InstructionTemplate > | instructionTemplates_ |
Contains all the instruction templates of the machine. More... | |
ComponentContainer< RegisterFile > | registerFiles_ |
Contains all the register files of the machine. More... | |
ComponentContainer< ImmediateUnit > | immediateUnits_ |
Contains all the immediate units of the machine. More... | |
ComponentContainer< FunctionUnit > | functionUnits_ |
Contains all the function units of the machine. More... | |
ComponentContainer< AddressSpace > | addressSpaces_ |
Contains all the address spaces of the machine. More... | |
ComponentContainer< Bridge > | bridges_ |
Contains all the bridges of the machine. More... | |
ComponentContainer< ImmediateSlot > | immediateSlots_ |
Contains all the immediate slots of the machine. More... | |
ComponentContainer< OperationTriggeredFormat > | operationTriggeredFormats_ |
Contains all the OTA Formats of the machine. More... | |
ControlUnit * | controlUnit_ |
Global control unit. More... | |
bool | doValidityChecks_ |
Tells whether to do validity checks or not. More... | |
MachineTester * | machineTester_ |
Machine tester for the machine. More... | |
DummyMachineTester * | dummyMachineTester_ |
Dummy machine tester for the machine. More... | |
const std::string | EMPTY_ITEMP_NAME_ |
bool | alwaysWriteResults_ |
bool | triggerInvalidatesResults_ |
bool | fuOrdered_ |
bool | littleEndian_ |
bool | bitness64_ |
Represents a complete TTA processor.
Definition at line 73 of file Machine.hh.
Navigator type for AddressSpaceNavigator.
Definition at line 219 of file Machine.hh.
Navigator type for BridgeNavigator.
Definition at line 221 of file Machine.hh.
Navigator type for BusNavigator.
Definition at line 213 of file Machine.hh.
Navigator type for FunctionUnitNavigator.
Definition at line 217 of file Machine.hh.
Navigator type for ImmediateSlotNavigator.
Definition at line 229 of file Machine.hh.
Navigator type for ImmediateUnitNavigator.
Definition at line 223 of file Machine.hh.
Navigator type for InstructionTemplateNavigator.
Definition at line 225 of file Machine.hh.
Navigator type for OperationTriggeredFormatNavigator.
Definition at line 232 of file Machine.hh.
Navigator type for RegisterFileNavigator.
Definition at line 227 of file Machine.hh.
Navigator type for SocketNavigator.
Definition at line 215 of file Machine.hh.
Extension mode applied to a number when it is narrower than the place where it is placed e.g. bus.
Enumerator | |
---|---|
ZERO | Zero extension. |
SIGN | Sign extension. |
Definition at line 80 of file Machine.hh.
TTAMachine::Machine::Machine | ( | ) |
TTAMachine::Machine::Machine | ( | const Machine & | old | ) |
Copy constructor.
Creates a copy of the given machine.
old | The machine to be copied. |
Definition at line 95 of file Machine.cc.
References doValidityChecks_, loadState(), and saveState().
|
virtual |
Destructor.
Deletes all the components of the machine as well.
Definition at line 114 of file Machine.cc.
References controlUnit_, dummyMachineTester_, and machineTester_.
|
virtual |
Adds an address space into the machine.
as | AddressSpace being added. |
ComponentAlreadyExists | If an address space by the same name already exists in the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 248 of file Machine.cc.
References addRegisteredComponent(), and addressSpaces_.
Referenced by TTAMachine::AddressSpace::setMachine().
|
virtual |
Adds a bridge into the machine.
This method should be called from Bridge constructor only since bridges are added to machine at construction. Do not call this method.
bridge | Bridge being added. |
ComponentAlreadyExists | If a bridge by the same name already exists in the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 263 of file Machine.cc.
References addRegisteredComponent(), and bridges_.
Referenced by TTAMachine::Bridge::setMachine().
|
virtual |
Adds a bus into the machine.
bus | Bus being added. |
ComponentAlreadyExists | If a bus or immediate slot by the same name already exists in the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 139 of file Machine.cc.
References addComponent(), busses_, immediateSlotNavigator(), and TTAMachine::Component::name().
Referenced by ADFCombiner::addBuses(), MachineResourceModifier::addBusesByAmount(), BlocksGCU::BlocksGCU(), BlocksConnectIC::createBus(), VLIWConnectIC::createBus(), ADFCombiner::createBus(), BlocksTranslator::CreateConnection(), loadState(), and TTAMachine::Bus::setMachine().
|
private |
Referenced by addBus(), addFunctionUnit(), addImmediateUnit(), addRegisterFile(), and addSocket().
|
virtual |
Adds the given function unit to the machine.
unit | The function unit to be added. |
ComponentAlreadyExists | If a function unit by the same name exists already. |
IllegalParameters | If tried to add control unit with this method. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 202 of file Machine.cc.
References addComponent(), controlUnit(), functionUnits_, and TTAMachine::Component::name().
Referenced by ADFCombiner::addFunctionUnits(), addUnit(), BlocksFU::BlocksFU(), FUTestbenchGenerator::createMachineState(), VectorLSGenerator::explore(), MinimalOpSetCheck::fix(), MachineResourceModifier::increaseAllFUsThatDiffersByAmount(), loadState(), AddFUFromHDBDialog::onAdd(), and MachineResourceModifier::percentualFUIncrease().
|
virtual |
Adds an immediate slot to (instruction of) the machine.
slot | The immediate slot to be added. |
ComponentAlreadyExists | If an immediate slot or bus by the same name already exists in the machine. |
Definition at line 299 of file Machine.cc.
References addRegisteredComponent(), busNavigator(), immediateSlots_, and TTAMachine::Component::name().
Referenced by TTAMachine::ImmediateSlot::setMachine().
|
virtual |
Adds the given immediate unit to the machine.
unit | The immediate unit to be added. |
ComponentAlreadyExists | If an immediate unit by the same name exists already. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 224 of file Machine.cc.
References addComponent(), and immediateUnits_.
Referenced by addUnit(), BlocksIMM::BlocksIMM(), loadState(), and AddIUFromHDBDialog::onAdd().
|
virtual |
Adds an instruction template for the machine.
instructionTemplate | The instruction template to be added. |
ComponentAlreadyExists | If an instruction template by the same name already exists in the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 275 of file Machine.cc.
References addRegisteredComponent(), and instructionTemplates_.
Referenced by TTAMachine::InstructionTemplate::setMachine().
|
virtual |
Adds an OTA format for the machine.
OperationTriggeredFormat | The OTA format to be added. |
ComponentAlreadyExists | If an instruction template by the same name already exists in the machine. |
Definition at line 287 of file Machine.cc.
References addRegisteredComponent(), and operationTriggeredFormats_.
Referenced by TTAMachine::OperationTriggeredFormat::setMachine().
|
private |
Referenced by addAddressSpace(), addBridge(), addImmediateSlot(), addInstructionTemplate(), and addOperationTriggeredFormat().
|
virtual |
Adds the given register file to the machine.
unit | The register file to be added. |
ComponentAlreadyExists | If a register file by the same name exists already. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 236 of file Machine.cc.
References addComponent(), and registerFiles_.
Referenced by ComponentAdder::addRegisterFiles(), ADFCombiner::addRegisterFiles(), addUnit(), BlocksRF::BlocksRF(), RFTestbenchGenerator::createMachineState(), VLIWConnectIC::explore(), MachineResourceModifier::increaseAllRFsThatDiffersByAmount(), loadState(), AddRFFromHDBDialog::onAdd(), and MachineResourceModifier::percentualRegisterIncrease().
|
virtual |
Returns a handle to the address spaces in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 392 of file Machine.cc.
References addressSpaces_.
Referenced by MemorySystem::addAddressSpace(), ADFCombiner::addAddressSpaces(), ADFCombiner::addFunctionUnits(), TTAMachine::AddressSpace::AddressSpace(), llvm::LLVMTCEBuilder::addressSpaceById(), TTAMachine::NullMachine::addressSpaceNavigator(), TTAProgram::TPEFProgramFactory::build(), UniversalMachine::dataAddressSpace(), MachineInfo::defaultDataAddressSpace(), AddASCmd::Do(), llvm::LLVMTCEBuilder::emitOperationMacro(), InfoProcCommand::execute(), VectorLSGenerator::explore(), CodeSectionCreator::finalize(), TTAProgram::TPEFProgramFactory::findAddressSpace(), MachineResourceManager::findDataAddressSpace(), ProgramImageGenerator::generateDataImage(), llvm::LLVMTCEBuilder::initDataSections(), AddWatchDialog::initialize(), SimulatorFrontend::initializeMemorySystem(), UniversalMachine::instructionAddressSpace(), TTAMachine::FunctionUnit::loadState(), main(), AddWatchDialog::onASChoice(), printLatexAddressSpaceDescription(), TTAMachine::AddressSpace::setNumericalIds(), MemorySystem::shareMemoriesWith(), and llvm::TCETargetLowering::TCETargetLowering().
|
virtual |
Adds a socket into the machine.
socket | Socket being added. |
ComponentAlreadyExists | If a socket by the same name already exists in the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 157 of file Machine.cc.
References addComponent(), and sockets_.
Referenced by ADFCombiner::addBuses(), BlocksALUPair::BlocksALUPair(), BlocksFU::BlocksFU(), BlocksGCU::BlocksGCU(), BlocksIMM::BlocksIMM(), BlocksLSUPair::BlocksLSUPair(), BlocksMULPair::BlocksMULPair(), BlocksRF::BlocksRF(), ADFCombiner::connectVectorLSU(), ADFCombiner::createPortsAndSockets(), VLIWConnectIC::explore(), loadState(), and TTAMachine::Socket::setMachine().
void TTAMachine::Machine::addUnit | ( | Unit & | unit | ) |
Adds a unit into the machine.
Use methods intended to add particular unit types like addFunctionUnit, addRegisterFile and addImmediateUnit if possible. Global control unit must be set using setGlobalControl function.
unit | Unit being added. |
ComponentAlreadyExists | If a unit by the same name and type already exists in the machine. |
IllegalParameters | If ControlUnit is tried to add with this method. |
Definition at line 175 of file Machine.cc.
References addFunctionUnit(), addImmediateUnit(), and addRegisterFile().
Referenced by TTAMachine::Unit::setMachine().
bool TTAMachine::Machine::alwaysWriteResults | ( | ) | const |
Returns true if result value always needs to be written to GPR.
Definition at line 954 of file Machine.cc.
References alwaysWriteResults_.
Referenced by CycleLookBackSoftwareBypasser::bypassNode().
|
virtual |
Returns a handle to the bridges in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 404 of file Machine.cc.
References bridges_.
Referenced by TTAMachine::Bridge::adjustChainDirection(), TTAMachine::Bridge::Bridge(), TTAMachine::NullMachine::bridgeNavigator(), FullyConnectedCheck::canFix(), BEMValidator::checkSourceField(), AddBridgeCmd::Do(), MachineEditPartFactory::getBusChains(), loadState(), TTAMachine::Bridge::setFirstOfChain(), BEMGenerator::sourceBridge(), BEMGenerator::sourceBridgeCount(), TTAMachine::Bus::unsetMachine(), and DefaultICGenerator::verifyCompatibility().
|
virtual |
Returns a handle to the busses in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 356 of file Machine.cc.
References busses_.
Referenced by ADFCombiner::addAllGuardsToConnectionBuses(), CodeCompressorPlugin::addBitsForMoveSlot(), ADFCombiner::addBuses(), MachineResourceModifier::addBusesByAmount(), SimpleICOptimizer::addConnections(), BEMGenerator::addEncodings(), DefaultICGenerator::addICToNetlist(), addImmediateSlot(), TTAMachine::InstructionTemplate::addSlot(), ImmediateGenerator::addSplitInsTemplate(), BEMGenerator::addSubfields(), BEMGenerator::addTopLevelFields(), MachineResourceModifier::analyzeBuses(), ResourceConstraintAnalyzer::analyzeMoveNode(), TDGen::analyzeRegisters(), FullyConnectedCheck::attachSocketToAllBusses(), MachineStateBuilder::buildMachineState(), ITemplateBroker::buildResources(), BusBroker::buildResources(), TTAMachine::NullMachine::busNavigator(), llvm::TCETargetMachine::calculateSupportedImmediates(), MachineInfo::canEncodeImmediateInteger(), FullyConnectedCheck::canFix(), ProgrammabilityValidator::checkBooleanRegister(), RemoveUnconnectedComponents::checkBuses(), TTAMachine::FUPort::cleanupGuards(), TTAMachine::FunctionUnit::cleanupGuards(), CompiledSimCodeGenerator::CompiledSimCodeGenerator(), DefaultDecoderGenerator::completeDecoderBlock(), FullyConnectedCheck::connectFUPort(), ADFCombiner::connectRegisterFiles(), ADFCombiner::connectVectorLSU(), BasicBlockPass::copyRMToBB(), BlocksConnectIC::createBus(), VLIWConnectIC::createBus(), TTAProgram::ProgramWriter::createCodeSection(), BlocksTranslator::CreateConnection(), llvm::LLVMTCEBuilder::createGuard(), ProgramDependenceGraph::createJump(), DefaultICGenerator::createSignalsForIC(), BlocksTranslator::Deinitialize(), TTAMachine::RegisterFile::deleteGuards(), AddBusCmd::Do(), AddBridgeCmd::Do(), PasteComponentCmd::Do(), CodeCompressorPlugin::encodeMove(), DefaultICDecoderEstimator::estimateICArea(), DefaultICDecoderEstimator::estimateICEnergy(), InfoBussesCommand::execute(), InfoSegmentsCommand::execute(), InfoProcCommand::execute(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), CostEstimator::Estimator::findAllICPaths(), findBooleanGuard(), TTAProgram::TPEFProgramFactory::findBus(), findBus(), MachineResourceManager::findBusWidth(), ProgrammabilityValidator::findGlobalConnectionRegister(), DefaultDecoderGenerator::findGuard(), RegisterQuantityCheck::findGuardRegisters(), ADFCombiner::findGuards(), MachineConnectivityCheck::findRoutes(), RegisterCopyAdder::findTempRegisters(), SimulatorFrontend::finishSimulation(), ProGe::ProcessorGenerator::generateGlobalsPackage(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProgramImageGenerator::generateProgramImage(), DefaultICGenerator::generateSocketsAndMuxes(), MachineEditPartFactory::getBusChains(), DisassemblyGridTable::GetColLabelValue(), DisassemblyGridTable::GetNumberCols(), DisassemblyGridTable::GetValue(), BusTracker::handleEvent(), MachineConnectivityCheck::hasConditionalMoves(), TTAMachine::ControlUnit::hasLocalGuardLatencyOfZero(), MachineConnectivityCheck::immBits(), TTAMachine::ImmediateSlot::ImmediateSlot(), AlmaIFIntegrator::initAlmaifBlock(), TTAProgram::TPEFResourceUpdater::initCache(), AddWatchDialog::initialize(), MachineResourceManager::initResourceSection(), TTAMachine::RegisterFile::isUsedAsGuard(), ProgrammabilityValidator::listConnections(), TTAMachine::Bridge::loadState(), TTAMachine::Socket::loadState(), loadState(), MachineInfo::longestGuardLatency(), CostEstimator::Estimator::longestPath(), MachineAnalysis::MachineAnalysis(), MachineConnectivityCheck::maxSIMMCount(), MinimizeMachine::minimizeBuses(), BEMValidator::needsSourceField(), ProDeBusOrderDialog::onBusSelectionChanged(), ProDeBusOrderDialog::onDown(), TemplateSlotDialog::onOK(), ProDeBusOrderDialog::onUp(), TTAMachine::Bus::position(), MachineResourceModifier::reduceBuses(), MachineResourceManager::registerFileIndexReference(), ImmInfo::registerImmediateLoadWidth(), SimpleICOptimizer::removeAllConnections(), MachineResourceModifier::removeBuses(), ConnectionSweeper::removeConnection(), HDB::RFArchitecture::RFArchitecture(), MachineResourceManager::rFPortOrFUIndexReference(), ProGe::RV32MicroCodeGenerator::RV32MicroCodeGenerator(), setBusPosition(), TTAMachine::ImmediateSlot::setName(), ProximMachineStateWindow::setUtilizationHighlights(), FullyConnectedCheck::socketAttachedToAllBusses(), MachineInfo::supportsBoolRegisterGuardedJumps(), MachineInfo::supportsPortGuardedJump(), MachineInfo::supportsPortGuardedJumps(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), MachineConnectivityCheck::totalConnectionCount(), UniversalMachine::universalBus(), TTAMachine::ImmediateUnit::unsetMachine(), ProDeBusOrderDialog::updateBusList(), BEMValidator::validate(), DefaultICGenerator::verifyCompatibility(), DefaultICGenerator::writeBusDumpCode(), DefaultICGenerator::writeBustraceExportCode(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeInstructionTemplateProcedures(), DefaultICGenerator::writeInterconnectionNetwork(), TDGen::writeMoveImmediateDefs(), DefaultDecoderGenerator::writeRulesForSourceControlSignals(), DefaultDecoderGenerator::writeSocketCntrlSignals(), DefaultDecoderGenerator::writeSquashSignalGenerationProcesses(), and DefaultDecoderGenerator::writeSquashSignals().
|
virtual |
Returns the control unit of the machine.
Returns null pointer if there is no control unit in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 345 of file Machine.cc.
References controlUnit_.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), addFunctionUnit(), ADFCombiner::addFunctionUnits(), ProGe::NetlistGenerator::addGCUToNetlist(), DefaultICGenerator::addICToNetlist(), ProGe::ProcessorWrapperBlock::addInstructionMemory(), ProGe::RV32MicroCodeGenerator::addIPorts(), ImmediateAnalyzer::analyze(), MachineStateBuilder::buildMachineState(), ExecutionPipelineBroker::buildResources(), OutputFUBroker::buildResources(), InputFUBroker::buildResources(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::busConnectedToDestination(), FullyConnectedCheck::check(), MachineValidator::checkGCUExists(), MachineValidator::checkGCUHasAddressSpace(), MachineValidator::checkIMemAddrWidth(), MachineValidator::checkJumpAndCallOperandBindings(), MachineValidator::checkOperandBindings(), MachineValidator::checkProgramCounterPort(), MachineValidator::checkRAPortHasSameWidthAsPCPort(), MachineValidator::checkReturnAddressPort(), MachineResourceManager::codeAddressSpace(), CompiledSimCodeGenerator::CompiledSimCodeGenerator(), DefaultDecoderGenerator::completeDecoderBlock(), BasicBlockPass::copyRMToBB(), TTAProgram::ProgramWriter::createASpaceElement(), TTAProgram::ProgramWriter::createBinary(), TTAProgram::CodeGenerator::createBreakOperation(), TTAProgram::CodeGenerator::createForLoopBufferInit(), ProgramDependenceGraph::createJump(), TTAProgram::CodeGenerator::createSchedYieldProcedure(), TTAProgram::CodeGenerator::createTerminalFUPort(), TTAProgram::CodeGenerator::createWhileLoopBufferInit(), MachineInfo::defaultDataAddressSpace(), AddGCUCmd::Do(), PasteComponentCmd::Do(), llvm::LLVMTCEBuilder::emitReturn(), ProGe::CUOpcodeGenerator::encodings(), InfoPortsCommand::execute(), InfoFunitsCommand::execute(), InfoProcCommand::execute(), InfoStatsCommand::execute(), BasicBlockPass::executeDDGPass(), CopyingDelaySlotFiller::fillDelaySlots(), CompiledSimCodeGenerator::findBasicBlocks(), ProgrammabilityValidator::findConnections(), TTAProgram::TPEFProgramFactory::findFunctionUnit(), ITemplateBroker::findITemplates(), TTAProgram::TPEFProgramFactory::findPort(), SimulatorFrontend::findPort(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), TTASimulationController::findProgramExitPoints(), ControlFlowGraph::findRelJumpDistance(), BasicBlockScheduler::findTrigger(), SimulatorFrontend::finishSimulation(), FullyConnectedCheck::fix(), MachineConnectivityCheck::fromRfConnected(), TTAProgram::TPEFResourceUpdater::functionUnit(), TTAProgram::TPEFResourceUpdater::functionUnitPort(), MachineResourceManager::functionUnitPortResource(), CompiledSimulation::FUPortValue(), ProGe::CUOpcodeGenerator::gcuOpcodeWidth(), DefaultICDecoderGenerator::generate(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProGe::ProGeUI::generateIDF(), ProgramImageGenerator::generateProgramImage(), llvm::LLVMTCEBuilder::getHWOperation(), MachineInfo::getPortBindingsOfOperation(), BF2ScheduleFront::getPreferredLimits(), MachineEditPartFactory::getUnits(), TTAProgram::Move::guardLatency(), CallsToJumps::handleControlFlowGraph(), ProcedureTransferTracker::handleEvent(), AbsoluteToRelativeJumps::handleProcedure(), hasOperation(), ProGe::ProcessorGenerator::iMemAddressWidth(), ProGe::ProcessorGenerator::iMemWidth(), MachineResourceManager::indexResource(), llvm::LLVMTCEBuilder::initDataSections(), CopyingDelaySlotFiller::initialize(), SimulatorFrontend::initializeMemorySystem(), ProGe::NetlistGenerator::instructionMemory(), DefaultICGenerator::isGcuPort(), isInstructionMemory(), BFOptimization::jumpGuardAvailableCycle(), SimulatorFrontend::loadMachine(), loadState(), TTAMachine::RegisterGuard::loadState(), MachineInfo::longestGuardLatency(), ProGe::LoopBufferBlock::LoopBufferBlock(), main(), ProGe::RV32MicroCodeGenerator::mapFunctionUnit(), ScheduleEstimator::maximumSizeOfBB(), MachineInfo::maxLatency(), CompiledSimCodeGenerator::maxLatency(), DefaultDecoderGenerator::opcode(), DefaultDecoderGenerator::opcodeWidth(), printLatexAddressSpaceDescription(), printLatexFunctionUnitDescription(), ProgrammabilityValidator::ProgrammabilityValidator(), MachineConnectivityCheck::raConnected(), ProGe::ProGeUI::readImemParameters(), TTAMachine::RegisterGuard::RegisterGuard(), ProximPortWindow::reinitialize(), TTAProgram::Program::replaceUniversalAddressSpaces(), MachineConnectivityCheck::requiredImmediateWidth(), RegisterCopyAdder::requiredRegisterCopiesForEachFU(), DataDependenceGraph::sanityCheck(), SequentialScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), TTAMachine::RegisterFile::setGuardLatency(), CodeCompressorPlugin::setImemWidth(), CodeCompressorPlugin::setMachine(), DataDependenceGraph::setMachine(), SimpleIfConverter::SimpleIfConverter(), SimulatorFrontend::state(), MachineInfo::supportsBoolRegisterGuardedJumps(), MachineInfo::supportsPortGuardedJump(), MachineInfo::supportsPortGuardedJumps(), MachineConnectivityCheck::toRfConnected(), MachineInfo::triggerIndex(), TTAMachine::AddressSpace::unsetMachine(), ProximPortWindow::update(), BEMValidator::validate(), DefaultDecoderGenerator::verifyCompatibility(), TDGen::writeBackendCode(), TDGen::writeCondBranchDefs(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeFUCntrlSignals(), TDGen::writeHWLoopDef(), DefaultICGenerator::writeInterconnectionNetwork(), llvm::LLVMTCEIRBuilder::writeMachineFunction(), DefaultDecoderGenerator::writeRulesForDestinationControlSignals(), and DefaultDecoderGenerator::writeRulesForSourceControlSignals().
|
virtual |
Copies state from one machine to this machine. (used for object copying).
machine | machine to copy from |
Definition at line 890 of file Machine.cc.
References loadState(), machine, and saveState().
Referenced by BlocksConnectICCmd::Do(), VLIWConnectICCmd::Do(), and CallExplorerPluginWindow::onRun().
|
virtual |
Deletes the given address space.
as | The address space to be deleted. |
InstanceNotFound | If the machine does not have the given address space. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 623 of file Machine.cc.
References addressSpaces_, and deleteComponent().
Referenced by TTAMachine::AddressSpace::unsetMachine().
|
virtual |
Deletes the given bridge.
The machine will stay consistent after deletion.
bridge | Bridge to be deleted. |
InstanceNotFound | If the machine does not have the given bridge. |
Reimplemented in TTAMachine::NullMachine.
Definition at line 587 of file Machine.cc.
References bridges_, and deleteComponent().
Referenced by TTAMachine::Bridge::unsetMachine().
|
private |
|
virtual |
Deletes the given immediate slot.
slot | The immediate slot to be deleted. |
InstanceNotFound | If the machine does not have the given immediate slot. |
Definition at line 635 of file Machine.cc.
References deleteComponent(), and immediateSlots_.
Referenced by TTAMachine::ImmediateSlot::unsetMachine().
|
virtual |
Deletes the given instruction template.
instrTempl | The instruction template to be deleted. |
InstanceNotFound | If the machine does not have the given instruction template. |
Reimplemented in TTAMachine::NullMachine.
Definition at line 599 of file Machine.cc.
References deleteComponent(), and instructionTemplates_.
Referenced by VLIWConnectIC::explore(), BlocksConnectIC::explore(), ImmediateGenerator::removeInsTemplate(), and TTAMachine::InstructionTemplate::unsetMachine().
|
virtual |
Deletes the given instruction template.
instrTempl | The instruction template to be deleted. |
InstanceNotFound | If the machine does not have the given instruction template. |
Definition at line 611 of file Machine.cc.
References deleteComponent(), and operationTriggeredFormats_.
Referenced by TTAMachine::OperationTriggeredFormat::unsetMachine().
|
virtual |
Returns a handle to the function units in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 380 of file Machine.cc.
References functionUnits_.
Referenced by llvm::LLVMTCEBuilder::addCandidateLSUAnnotations(), ADFCombiner::addFunctionUnits(), ProGe::NetlistGenerator::addFUToNetlist(), ProGe::NetlistGenerator::addGeneratableFUsToNetlist(), DefaultDecoderGenerator::addGlockPortToDecoder(), DefaultDecoderGenerator::addLockReqPortToDecoder(), ImmediateAnalyzer::analyze(), MachineResourceModifier::analyzeFunctionUnits(), SimulationController::buildFUResourceConflictDetectors(), MachineStateBuilder::buildMachineState(), ControlFlowGraph::buildMBBFromBB(), MinimalOpSetCheck::buildMinimalOpSet(), ExecutionPipelineBroker::buildResources(), OutputFUBroker::buildResources(), InputFUBroker::buildResources(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::canBypassOpToDst(), OperationBindingCheck::check(), AddressSpaceCheck::check(), FullyConnectedCheck::check(), MinimalOpSetCheck::check(), MachineValidator::checkFUConnections(), IDFValidator::checkFUImplementations(), RemoveUnconnectedComponents::checkFUPorts(), MachineValidator::checkOperandBindings(), MinimalOpSetCheck::checkWithIgnore(), SimulatorFrontend::compareState(), DefaultDecoderGenerator::completeDecoderBlock(), ConflictDetectionCodeGenerator::ConflictDetectionCodeGenerator(), ADFCombiner::connectVectorLSU(), ADFCombiner::copyGuards(), MachineConnectivityCheck::copyOpFUs(), llvm::LLVMTCEPOMBuilder::createFUTerminal(), AddFUArchFromADFCmd::Do(), AddFUCmd::Do(), PasteComponentCmd::Do(), llvm::LLVMTCEBuilder::emitInstruction(), llvm::LLVMTCEBuilder::emitOperationMacro(), InfoPortsCommand::execute(), InfoFunitsCommand::execute(), InfoProcCommand::execute(), InfoStatsCommand::execute(), ProgrammabilityValidator::findConnections(), TTAProgram::TPEFProgramFactory::findFunctionUnit(), findFunctionUnit(), MachineInfo::findLockUnits(), AlmaIFIntegrator::findMemories(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), BasicBlockScheduler::findTrigger(), MachineInfo::findWidestOperand(), SimulatorFrontend::finishSimulation(), FullyConnectedCheck::fix(), MinimalOpSetCheck::fix(), MachineConnectivityCheck::fromRfConnected(), CompiledSimulation::FUMemory(), CompiledSimulation::functionUnit(), TTAMachine::NullMachine::functionUnitNavigator(), MachineResourceManager::functionUnitPortResource(), ProGeTestBenchGenerator::generate(), CompiledSimCodeGenerator::generateConstructorCode(), CompiledSimCodeGenerator::generateFUOutputUpdater(), generateHeader(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProGe::ProGeUI::generateIDF(), getFunctionUnit(), llvm::TCETargetMachine::getLoadOpcode(), MachineInfo::getOpset(), MachineInfo::getPortBindingsOfOperation(), BasicBlockScheduler::getTriggerOperand(), MachineEditPartFactory::getUnits(), DefaultDecoderGenerator::glockPortWidth(), DefaultDecoderGenerator::glockRequestWidth(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), hasOperation(), MachineResourceModifier::increaseAllFUsThatDiffersByAmount(), MachineResourceManager::indexResource(), TTAProgram::TPEFResourceUpdater::initCache(), llvm::LLVMTCEBuilder::initDataSections(), AddWatchDialog::initialize(), llvm::LLVMTCEIRBuilder::LLVMTCEIRBuilder(), TTAMachine::PortGuard::loadState(), loadState(), CostEstimator::Estimator::longestPath(), MachineAnalysis::MachineAnalysis(), main(), ProGe::RV32MicroCodeGenerator::mapFunctionUnit(), maximumLatency(), MachineInfo::maxLatency(), CompiledSimCodeGenerator::maxLatency(), MachineInfo::maxMemoryAlignment(), MinimizeMachine::minimizeFunctionUnits(), MinimalOpSetCheck::missingOperations(), MachineConnectivityCheck::needRegCopiesDueReadPortConflicts(), MachineConnectivityCheck::needsRegisterCopiesDueImmediateOperands(), AddFUFromHDBDialog::onAdd(), AddWatchDialog::onFUChoice(), PlatformIntegrator::parseDataMemories(), MachineResourceModifier::percentualFUIncrease(), BF2Scheduler::preAllocateFunctionUnitsInner(), printLatexFunctionUnitDescription(), MachineConnectivityCheck::raConnected(), ProximPortWindow::reinitialize(), BF2Scheduler::releasePortForOp(), RemoveUnconnectedComponents::removeUnconnectedFUs(), IDFValidator::removeUnknownImplementations(), ADFCombiner::renameExtraUnits(), RegisterCopyAdder::requiredRegisterCopiesForEachFU(), ComponentImplementationSelector::selectFUs(), setGlobalControl(), DataDependenceGraph::setMachine(), ProximMachineStateWindow::setUtilizationHighlights(), TDGen::supportedStackAccessOperations(), MachineConnectivityCheck::tempRegisterFiles(), ProGe::TestBenchBlock::TestBenchBlock(), MachineConnectivityCheck::toRfConnected(), CostEstimator::Estimator::totalAreaOfFunctionUnits(), CostEstimator::Estimator::totalEnergyOfFunctionUnits(), MachineInfo::triggerIndex(), UniversalMachine::universalFunctionUnit(), TTAMachine::AddressSpace::unsetMachine(), ProximPortWindow::update(), CompiledSimCodeGenerator::updateDeclaredSymbolsList(), TDGen::writeBackendCode(), TDGen::writeInstrInfo(), DefaultDecoderGenerator::writeRulesForDestinationControlSignals(), and DefaultDecoderGenerator::writeRulesForSourceControlSignals().
TCEString TTAMachine::Machine::hash | ( | ) | const |
Returns a hash string of the machine to determine quickly in case two machines are the same.
The hash consists of a 32bit hash of the .adf xml data concat with the .adf data length as a hex string.
Definition at line 932 of file Machine.cc.
References XMLSerializer::setDestinationString(), Conversion::toHexString(), and ADFSerializer::writeMachine().
Referenced by DSDBManager::addArchitecture(), DSDBManager::architectureId(), and LLVMBackend::pluginFilename().
bool TTAMachine::Machine::hasOperation | ( | const TCEString & | opName | ) | const |
Tells whether any FU in the machine has given operation or not
opName | name of the operation. |
Definition at line 1048 of file Machine.cc.
References controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), functionUnitNavigator(), TTAMachine::FunctionUnit::hasOperation(), and TTAMachine::Machine::Navigator< ComponentType >::item().
Referenced by TDGen::create32BitExtLoadPatterns(), TDGen::createBoolAndHalfLoadPatterns(), TDGen::createByteExtLoadPatterns(), TDGen::createShortExtLoadPatterns(), llvm::LLVMTCEBuilder::emitMove(), TDGen::genGeneratedTCEPlugin_getLoad(), ProGe::RV32MicroCodeGenerator::validateOperations(), DefaultDecoderGenerator::verifyCompatibility(), TDGen::writeInstrInfo(), and TDGen::writeScalarOperationExploitations().
|
virtual |
Returns a handle to the immediate slots in the machine.
Definition at line 462 of file Machine.cc.
References immediateSlots_.
Referenced by addBus(), TTAMachine::InstructionTemplate::addSlot(), BEMGenerator::addTopLevelFields(), DisassemblyGridTable::GetNumberCols(), TTAMachine::ImmediateSlot::ImmediateSlot(), TTAMachine::ImmediateSlot::setName(), and BEMValidator::validate().
|
virtual |
Returns a handle to the immediate units in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 416 of file Machine.cc.
References immediateUnits_.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), DefaultDecoderGenerator::addGlockPortToDecoder(), ProGe::NetlistGenerator::addIUToNetlist(), BEMGenerator::addLongImmDstRegisterFields(), ImmediateGenerator::addSplitInsTemplate(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), MachineStateBuilder::buildMachineState(), IUBroker::buildResources(), BusBroker::buildResources(), llvm::TCETargetMachine::calculateSupportedImmediates(), MachineInfo::canEncodeImmediateInteger(), MachineConnectivityCheck::canWriteAllImmediates(), FullyConnectedCheck::check(), IDFValidator::checkIUImplementations(), ProGe::ProcessorGenerator::checkIULatencies(), BEMValidator::checkLImmDstRegisterFields(), DefaultDecoderGenerator::completeDecoderBlock(), ADFCombiner::connectRegisterFiles(), AddIUCmd::Do(), PasteComponentCmd::Do(), InfoImmediatesCommand::execute(), InfoIunitsCommand::execute(), InfoProcCommand::execute(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), ProgrammabilityValidator::findConnections(), TTAProgram::TPEFProgramFactory::findImmediateUnit(), MachineConnectivityCheck::findPossibleSourcePorts(), FullyConnectedCheck::fix(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProGe::ProGeUI::generateIDF(), MachineEditPartFactory::getUnits(), DefaultDecoderGenerator::glockPortWidth(), TTAMachine::NullMachine::immediateUnitNavigator(), CompiledSimulation::immediateUnitRegisterValue(), MachineResourceManager::indexResource(), TTAProgram::TPEFResourceUpdater::initCache(), TTAMachine::InstructionTemplate::loadState(), loadState(), main(), MachineConnectivityCheck::maxLIMMCount(), AddIUFromHDBDialog::onAdd(), ImmInfo::registerImmediateLoadWidth(), ProximRegisterWindow::reinitialize(), IDFValidator::removeUnknownImplementations(), ADFCombiner::renameExtraUnits(), ComponentImplementationSelector::selectIUs(), TTAMachine::InstructionTemplate::supportedWidth(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), MachineConnectivityCheck::tempRegisterFiles(), MachineConnectivityCheck::toRfConnected(), ProximRegisterWindow::update(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultDecoderGenerator::writeInstructionTemplateProcedures(), DefaultDecoderGenerator::writeLongImmediateWriteProcess(), TDGen::writeMoveImmediateDefs(), DefaultDecoderGenerator::writeRFCntrlSignals(), and DefaultDecoderGenerator::writeRulesForSourceControlSignals().
|
virtual |
Returns a handle to the instruction templates in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 428 of file Machine.cc.
References instructionTemplates_.
Referenced by CodeCompressorPlugin::addBitsForImmediateSlot(), CodeCompressorPlugin::addBitsForMoveSlot(), BEMGenerator::addEncodings(), BEMGenerator::addLongImmDstRegisterFields(), BEMGenerator::addTopLevelFields(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), ITemplateBroker::buildResources(), BusBroker::buildResources(), llvm::TCETargetMachine::calculateSupportedImmediates(), MachineInfo::canEncodeImmediateInteger(), BEMValidator::checkImmediateControlField(), BEMValidator::checkLImmDstRegisterFields(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), TTAProgram::TPEFProgramFactory::findInstrTemplate(), MachineResourceModifier::hasSlot(), CodeCompressorPlugin::instructionTemplate(), TTAMachine::NullMachine::instructionTemplateNavigator(), loadState(), BEMGenerator::maxLongImmSlotWidth(), ImmediateGenerator::printImmediateTemplates(), MachineResourceModifier::reduceBuses(), ImmInfo::registerImmediateLoadWidth(), MachineResourceModifier::removeBuses(), ImmediateGenerator::removeInsTemplate(), IUBroker::setupResourceLinks(), MachineInfo::templatesUsesSlot(), MachineInfo::templatesUsingSlot(), TTAMachine::ImmediateSlot::unsetMachine(), TTAMachine::ImmediateUnit::unsetMachine(), TTAMachine::Bus::unsetMachine(), TTAMachine::ImmediateSlot::width(), DefaultDecoderGenerator::writeLongImmediateWriteProcess(), and TDGen::writeMoveImmediateDefs().
|
inline |
Definition at line 260 of file Machine.hh.
References bitness64_.
Referenced by TDGen::analyzeMachineRegisters(), TDGen::checkRequiredRegisters(), LLVMBackend::compile(), TDGen::constantNodeString(), TDGen::createBoolAndHalfLoadPatterns(), TDGen::createByteExtLoadPatterns(), TDGen::createConstShiftPatterns(), TDGen::createEndiannesQuery(), TTAProgram::CodeGenerator::createForLoopBufferInit(), TDGen::createGetMaxMemoryAlignment(), llvm::LLVMTCEBuilder::createIntDataDefinition(), TDGen::createMinMaxGenerator(), llvm::LLVMTCEBuilder::createMove(), LLVMBackend::createPlugin(), TDGen::createSelectPatterns(), TDGen::createShortExtLoadPatterns(), llvm::LLVMTCEBuilder::createTerminal(), TTAProgram::CodeGenerator::decrementRegisterAddress(), llvm::LLVMTCEBuilder::doFinalization(), llvm::LLVMTCEBuilder::emitInstruction(), llvm::LLVMTCEBuilder::emitMove(), llvm::LLVMTCEBuilder::emitSetjmp(), llvm::LLVMTCEBuilder::emitSPInitialization(), TDGen::emulatingOpNodeLLVMName(), TDGen::genGeneratedTCEPlugin_getLoad(), TDGen::genGeneratedTCEPlugin_getStore(), TDGen::genTCEInstrInfo_copyPhys64bitReg(), TTAProgram::CodeGenerator::incrementRegisterAddress(), TDGen::llvmOperationName(), TDGen::llvmOperationPattern(), SimulatorFrontend::loadMachine(), TTAProgram::CodeGenerator::loadTerminal(), TDGen::operandChar(), TDGen::operandToString(), TDGen::operationCanBeMatched(), llvm::TCETargetMachine::setTargetMachinePlugin(), TTAProgram::CodeGenerator::storeTerminal(), TDGen::TDGen(), TDGen::write1bitRegisterInfo(), TDGen::write32bitRegisterInfo(), TDGen::write64bitRegisterInfo(), TDGen::writeAddressingModeDefs(), TDGen::writeBackendCode(), TDGen::writeCallingConv(), TDGen::writeCallSeqStart(), TDGen::writeConstShiftPat(), TDGen::writeEmulationPattern(), TDGen::writeGetPointerAdjustmentQuery(), TDGen::writeGuardRegisterClassInfo(), TDGen::writeInstrInfo(), TDGen::writeIntegerImmediateDefs(), TDGen::writeMiscPatterns(), TDGen::writeMoveImmediateDefs(), TDGen::writeOperationDef(), TDGen::writeOperationDefs(), TDGen::writeRARegisterInfo(), TDGen::writeScalarOperationExploitations(), and TDGen::writeVectorLoadStoreOperationExploitations().
bool TTAMachine::Machine::isFUOrdered | ( | ) | const |
Returns true if sequential order of FUs in ADF file is significant.
In certain architectures (Cell SPU) the "relative order" of the function units matters when it comes to accessing same register by multiple operations in the same cycle.
Definition at line 977 of file Machine.cc.
References fuOrdered_.
|
inline |
Definition at line 258 of file Machine.hh.
References littleEndian_.
Referenced by Assembler::compile(), LLVMBackend::compile(), TTAProgram::ProgramWriter::createBinary(), llvm::LLVMTCEBuilder::createDataDefinition(), TTAProgram::TPEFProgramFactory::createDataMemories(), llvm::LLVMTCEBuilder::createFPDataDefinition(), llvm::LLVMTCEBuilder::createGlobalValueDataDefinition(), llvm::LLVMTCEBuilder::createIntDataDefinition(), LLVMBackend::createPlugin(), llvm::LLVMTCEBuilder::emitDataDef(), llvm::LLVMTCEBuilder::emitSPInitialization(), llvm::LLVMTCEBuilder::initDataSections(), SimulatorFrontend::initializeMemorySystem(), TTAProgram::CodeGenerator::loadTerminal(), llvm::LLVMTCEBuilder::padToAlignment(), InlineAsmParser::parse(), MachineConnectivityCheck::raConnected(), TTAProgram::CodeGenerator::storeTerminal(), MachineDialog::TransferDataToWindow(), and ProgramImageGenerator::writeDataSection().
bool TTAMachine::Machine::isRISCVMachine | ( | ) | const |
Definition at line 1063 of file Machine.cc.
References __func__, TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), operationTriggeredFormatNavigator(), and Conversion::toString().
Referenced by ProGe::NetlistGenerator::addGCUToNetlist(), DefaultICGenerator::addICToNetlist(), ProGe::ProcessorWrapperBlock::addInstructionMemory(), ProGe::ProcessorGenerator::generateProcessor(), CodeCompressorPlugin::setMachine(), DefaultDecoderGenerator::verifyCompatibility(), DefaultDecoderGenerator::writeControlRegisterMappings(), and DefaultICGenerator::writeInterconnectionNetwork().
|
virtual |
Reimplemented in UniversalMachine.
Definition at line 127 of file Machine.cc.
Referenced by POMDisassembler::createFUPort().
|
static |
Loads a Machine from the given ADF file.
adfFileName | The name of the file to load the ADF from. |
Exception | In case some error occured. |
Definition at line 905 of file Machine.cc.
References ADFSerializer::readMachine(), and XMLSerializer::setSourceFile().
Referenced by MinimalOpSetCheck::buildMinimalOpSet(), Evaluate::createConfig(), MinimalOpSet::createConfig(), llvm::LLVMTCEPOMBuilder::doInitialization(), ComponentAdder::explore(), ImplementationSelector::explore(), ADFCombiner::explore(), MinimalOpSetCheck::fix(), llvm::LLVMTCERISCVIntrinsicsLowering::LLVMTCERISCVIntrinsicsLowering(), llvm::LLVMTCEScheduler::LLVMTCEScheduler(), and main().
|
virtual |
Loads the state of the machine from the given ObjectState tree.
state | Root node of the ObjectState tree. |
ObjectStateLoadingException | If the given ObjectState tree is invalid. |
Implements Serializable.
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 728 of file Machine.cc.
References addBus(), addFunctionUnit(), addImmediateUnit(), addRegisterFile(), addressSpaces_, addSocket(), ObjectState::boolAttribute(), bridgeNavigator(), bridges_, busNavigator(), busses_, ObjectState::child(), ObjectState::childCount(), controlUnit(), controlUnit_, TTAMachine::Machine::Navigator< ComponentType >::count(), EMPTY_ITEMP_NAME_, Exception::errorMessage(), functionUnitNavigator(), functionUnits_, ObjectState::hasAttribute(), immediateSlots_, immediateUnitNavigator(), immediateUnits_, instructionTemplateNavigator(), instructionTemplates_, TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Bridge::loadState(), TTAMachine::ImmediateUnit::loadState(), TTAMachine::ControlUnit::loadState(), TTAMachine::RegisterFile::loadState(), TTAMachine::Socket::loadState(), TTAMachine::FunctionUnit::loadState(), TTAMachine::Bus::loadState(), ObjectState::name(), operationTriggeredFormats_, OSKEY_ALWAYS_WRITE_BACK_RESULTS, OSKEY_FUNCTION_UNITS_ORDERED, TTAMachine::Component::OSKEY_NAME, OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS, TTAMachine::AddressSpace::OSNAME_ADDRESS_SPACE, TTAMachine::Bridge::OSNAME_BRIDGE, TTAMachine::Bus::OSNAME_BUS, TTAMachine::ControlUnit::OSNAME_CONTROL_UNIT, TTAMachine::OperationTriggeredFormat::OSNAME_FORMAT, TTAMachine::FunctionUnit::OSNAME_FU, TTAMachine::ImmediateSlot::OSNAME_IMMEDIATE_SLOT, TTAMachine::ImmediateUnit::OSNAME_IMMEDIATE_UNIT, TTAMachine::InstructionTemplate::OSNAME_INSTRUCTION_TEMPLATE, OSNAME_MACHINE, TTAMachine::RegisterFile::OSNAME_REGISTER_FILE, TTAMachine::Socket::OSNAME_SOCKET, registerFileNavigator(), registerFiles_, set64bits(), setAlwaysWriteResults(), setFUOrdered(), setGlobalControl(), setLittleEndian(), setTriggerInvalidatesResults(), socketNavigator(), sockets_, and ObjectState::stringAttribute().
Referenced by DSDBManager::architecture(), copyFromMachine(), Machine(), MinimizeMachine::minimizeFunctionUnits(), MinimizeMachine::minimizeRegisterFiles(), and ADFSerializer::readMachine().
MachineTester & TTAMachine::Machine::machineTester | ( | ) | const |
Returns the machine tester for the machine.
Definition at line 671 of file Machine.cc.
References doValidityChecks_, dummyMachineTester_, and machineTester_.
Referenced by TTAMachine::Socket::attachBus(), TTAMachine::Port::attachSocket(), TTAMachine::Segment::attachSocket(), TTAMachine::Bridge::Bridge(), RemoveUnconnectedComponents::checkFUPorts(), RemoveUnconnectedComponents::checkRFPorts(), ControlDependenceGraphPass::handleControlDependenceGraph(), DDGPass::handleDDG(), TTAMachine::Bridge::loadState(), and TTAMachine::Socket::setDirection().
int TTAMachine::Machine::maximumLatency | ( | ) | const |
Gets the maximum latency of any operation supported by this machine.
Definition at line 1029 of file Machine.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), functionUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), and TTAMachine::FunctionUnit::maxLatency().
Referenced by BF2ScheduleFront::scheduleFrontFromMove().
|
virtual |
Returns a handle to the instruction templates in the machine.
Definition at line 439 of file Machine.cc.
References operationTriggeredFormats_.
Referenced by BEMGenerator::addTopLevelFields(), and isRISCVMachine().
|
virtual |
Returns a handle to the register files in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 450 of file Machine.cc.
References registerFiles_.
Referenced by DefaultDecoderGenerator::addGlockPortToDecoder(), ComponentAdder::addRegisterFiles(), ADFCombiner::addRegisterFiles(), ProGe::NetlistGenerator::addRFToNetlist(), TDGen::analyzeMachineRegisters(), MachineResourceModifier::analyzeRegisters(), TDGen::analyzeRegisters(), UniversalMachine::booleanRegisterFile(), MachineStateBuilder::buildMachineState(), llvm::TCETargetMachine::calculateSupportedImmediates(), RegisterQuantityCheck::canFixIntRegs(), RFPortCheck::check(), FullyConnectedCheck::check(), ProgrammabilityValidator::checkBooleanRegister(), IDFValidator::checkRFImplementations(), RemoveUnconnectedComponents::checkRFPorts(), SimulatorFrontend::compareState(), DefaultDecoderGenerator::completeDecoderBlock(), ADFCombiner::connectRegisterFiles(), ADFCombiner::copyGuards(), RegisterQuantityCheck::countIntRegisters(), TTAProgram::CodeGenerator::createTerminalRegister(), llvm::LLVMTCEBuilder::createTerminalRegister(), AddRFCmd::Do(), PasteComponentCmd::Do(), UniversalMachine::doubleRegisterFile(), llvm::LLVMTCEBuilder::emitLongjmp(), llvm::LLVMTCEBuilder::emitSetjmp(), llvm::LLVMTCEBuilder::emitSPInitialization(), InfoRegFilesCommand::execute(), InfoProcCommand::execute(), InfoStatsCommand::execute(), VLIWConnectIC::explore(), SimulatorFrontend::findBooleanRegister(), findBooleanRegisterFile(), RegisterRenamer::findConnectedRFs(), ProgrammabilityValidator::findConnections(), RegisterRenamer::findFreeRegisters(), ProgrammabilityValidator::findGlobalConnectionRegister(), RegisterRenamer::findPartiallyUsedRegistersAfterCycle(), RegisterRenamer::findPartiallyUsedRegistersBeforeCycle(), RegisterRenamer::findPartiallyUsedRegistersInRFAfterCycle(), RegisterRenamer::findPartiallyUsedRegistersInRFBeforeCycle(), SimulatorFrontend::findRegister(), findRegisterFile(), TTAProgram::TPEFProgramFactory::findRegisterFile(), ProGe::RV32MicroCodeGenerator::findRF(), SimulatorFrontend::finishSimulation(), FullyConnectedCheck::fix(), RegisterQuantityCheck::fixIntRegs(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProGe::ProGeUI::generateIDF(), getRegisterFile(), MachineEditPartFactory::getUnits(), DefaultDecoderGenerator::glockPortWidth(), MachineConnectivityCheck::hasConditionalMoves(), MachineResourceModifier::increaseAllRFsThatDiffersByAmount(), MachineResourceManager::indexResource(), TTAProgram::TPEFResourceUpdater::initCache(), AddWatchDialog::initialize(), RegisterRenamer::initialize(), UniversalMachine::integerRegisterFile(), MachineConnectivityCheck::isConnectedToDifferentlyConnectedRFs(), loadState(), TTAMachine::RegisterGuard::loadState(), CostEstimator::Estimator::longestPath(), MachineAnalysis::MachineAnalysis(), main(), MinimizeMachine::minimizeRegisterFiles(), MachineConnectivityCheck::needRegCopiesDueReadPortConflicts(), MachineInfo::numberOfRegisters(), AddRFFromHDBDialog::onAdd(), AddWatchDialog::onRFChoice(), MachineResourceModifier::percentualRegisterIncrease(), llvm::LLVMTCEIRBuilder::registerFileName(), TTAMachine::NullMachine::registerFileNavigator(), SimulationController::registerFileValue(), CompiledSimController::registerFileValue(), CompiledSimulation::registerFileValue(), ProximRegisterWindow::reinitialize(), IDFValidator::removeUnknownImplementations(), ADFCombiner::renameExtraUnits(), BFRenameLiveRange::renameLiveRange(), RegisterRenamer::renameLiveRange(), ComponentImplementationSelector::selectRFs(), BFRenameLiveRange::setTerminals(), UniversalMachine::specialRegisterFile(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), MachineConnectivityCheck::tempRegisterFiles(), CostEstimator::Estimator::totalAreaOfRegisterFiles(), CostEstimator::Estimator::totalEnergyOfRegisterFiles(), ProximRegisterWindow::update(), TDGen::writeMoveImmediateDefs(), DefaultDecoderGenerator::writeRFSRAMDecodingProcess(), DefaultDecoderGenerator::writeRulesForDestinationControlSignals(), and DefaultDecoderGenerator::writeRulesForSourceControlSignals().
|
virtual |
Removes bus from the machine.
The machine will stay consistent after removal.
bus | Bus to be removed. |
InstanceNotFound | If the machine does not have the given bus. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 477 of file Machine.cc.
References busses_, and removeComponent().
Referenced by RemoveUnconnectedComponents::checkBuses(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), MachineResourceModifier::reduceBuses(), MachineResourceModifier::removeBuses(), and TTAMachine::Bus::unsetMachine().
|
private |
Referenced by removeBus(), removeFunctionUnit(), removeImmediateUnit(), removeRegisterFile(), and removeSocket().
|
virtual |
Removes the given function unit from the machine.
unit | The function unit to be removed. |
InstanceNotFound | If the given function unit does not belong to the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 530 of file Machine.cc.
References functionUnits_, and removeComponent().
Referenced by MinimizeMachine::minimizeFunctionUnits(), RemoveUnconnectedComponents::removeUnconnectedFUs(), removeUnit(), and TTAMachine::FunctionUnit::unsetMachine().
|
virtual |
Removes the given immediate unit from the machine.
unit | The immediate unit to be removed. |
InstanceNotFound | If the given immediate unit does not belong to the machine. |
Reimplemented in TTAMachine::NullMachine.
Definition at line 542 of file Machine.cc.
References immediateUnits_, and removeComponent().
Referenced by removeUnit(), and TTAMachine::ImmediateUnit::unsetMachine().
|
virtual |
Removes the given register file from the machine.
unit | The register file to be removed. |
InstanceNotFound | If the given register file does not belong to the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 554 of file Machine.cc.
References registerFiles_, and removeComponent().
Referenced by RemoveUnconnectedComponents::checkRFPorts(), VLIWConnectIC::explore(), MinimizeMachine::minimizeRegisterFiles(), removeUnit(), and TTAMachine::RegisterFile::unsetMachine().
|
virtual |
Removes socket from the machine.
The machine will stay consistent after removal.
socket | Socket to be removed. |
InstanceNotFound | If the machine does not have the given socket. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 490 of file Machine.cc.
References removeComponent(), and sockets_.
Referenced by VLIWConnectIC::explore(), BlocksConnectIC::explore(), MachineResourceModifier::removeNotConnectedSockets(), and TTAMachine::Socket::unsetMachine().
|
virtual |
Removes unit from the machine.
The machine will stay consistent after removal. Global control unit must be removed using unsetGlobalControl method.
unit | Unit to be removed. |
InstanceNotFound | If the machine does not have the given unit. |
IllegalParameters | If ControlUnit is tried to remove. |
Reimplemented in TTAMachine::NullMachine.
Definition at line 505 of file Machine.cc.
References removeFunctionUnit(), removeImmediateUnit(), and removeRegisterFile().
|
staticprivate |
Saves the state of each component in the given container and add the created ObjectStates as children of the given parent ObjectState.
container | The container. |
parent | The parent ObjectState. |
Definition at line 1018 of file Machine.cc.
References ObjectState::addChild(), and Serializable::saveState().
Referenced by saveState().
|
virtual |
Saves the machine to ObjectState tree.
Implements Serializable.
Reimplemented in TTAMachine::NullMachine.
Definition at line 686 of file Machine.cc.
References ObjectState::addChild(), addressSpaces_, alwaysWriteResults_, bitness64_, bridges_, busses_, controlUnit_, functionUnits_, fuOrdered_, immediateSlots_, immediateUnits_, instructionTemplates_, littleEndian_, operationTriggeredFormats_, OSKEY_ALWAYS_WRITE_BACK_RESULTS, OSKEY_FUNCTION_UNITS_ORDERED, OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS, OSNAME_MACHINE, registerFiles_, saveComponentStates(), TTAMachine::ControlUnit::saveState(), ObjectState::setAttribute(), sockets_, and triggerInvalidatesResults_.
Referenced by DSDBManager::addArchitecture(), copyFromMachine(), Machine(), MinimizeMachine::minimizeFunctionUnits(), MinimizeMachine::minimizeRegisterFiles(), and ADFSerializer::writeMachine().
|
inline |
void TTAMachine::Machine::setAlwaysWriteResults | ( | bool | result | ) |
Sets whether or not result must always be written to register.
Definition at line 985 of file Machine.cc.
References alwaysWriteResults_.
Referenced by loadState().
void TTAMachine::Machine::setBusPosition | ( | const Bus & | bus, |
int | newPosition | ||
) |
Sets new position for the given bus.
bus | The bus being moved. |
newPosition | The index of the new position (the first position is 0). |
IllagalRegistration | If the given bus is not registered to the machine. |
OutOfRange | If the given position is less than 0 or not smaller than the number of buses in the machine. |
Definition at line 651 of file Machine.cc.
References busNavigator(), busses_, and TTAMachine::Component::machine().
Referenced by ProDeBusOrderDialog::onDown(), and ProDeBusOrderDialog::onUp().
void TTAMachine::Machine::setFUOrdered | ( | bool | order | ) |
|
virtual |
Sets the global control unit for the machine.
unit | The new global control unit. |
ComponentAlreadyExists | If a control unit already exists in the machine. |
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 317 of file Machine.cc.
References controlUnit_, functionUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), TTAMachine::Component::machine(), TTAMachine::Component::name(), and TTAMachine::ControlUnit::setMachine().
Referenced by ADFCombiner::addFunctionUnits(), BlocksGCU::BlocksGCU(), loadState(), and TTAMachine::ControlUnit::setMachine().
|
inline |
Definition at line 259 of file Machine.hh.
References littleEndian_.
Referenced by BlocksTranslator::BuildTTAModel(), loadState(), and MachineDialog::onOK().
void TTAMachine::Machine::setTriggerInvalidatesResults | ( | bool | trigger | ) |
Sets whether triggering invalidates register where result will be stored.
Definition at line 993 of file Machine.cc.
References triggerInvalidatesResults_.
Referenced by loadState().
|
virtual |
Returns a handle to the sockets in the machine.
Reimplemented in TTAMachine::NullMachine.
Definition at line 368 of file Machine.cc.
References sockets_.
Referenced by ADFCombiner::addBuses(), SimpleICOptimizer::addConnections(), DefaultICGenerator::addICToNetlist(), BEMGenerator::addSocketCodeTables(), TTAMachine::Port::attachSocket(), InputPSocketBroker::buildResources(), OutputPSocketBroker::buildResources(), DefaultICDecoderEstimator::busParameters(), FullyConnectedCheck::check(), RemoveUnconnectedComponents::checkBuses(), RemoveUnconnectedComponents::checkFUPorts(), RemoveUnconnectedComponents::checkRFPorts(), BEMValidator::checkSocketCodeTable(), DefaultDecoderGenerator::completeDecoderBlock(), FullyConnectedCheck::connectFUPort(), BlocksTranslator::ConnectInputs(), ADFCombiner::connectPorts(), ADFCombiner::connectVectorLSU(), TTAProgram::TPEFProgramFactory::createInstruction(), ADFCombiner::createPortsAndSockets(), FullyConnectedCheck::createSocket(), AddSocketCmd::Do(), PasteComponentCmd::Do(), UniversalFunctionUnit::ensureInputPorts(), UniversalFunctionUnit::ensureOutputPorts(), DefaultICDecoderEstimator::estimateICArea(), DefaultICDecoderEstimator::estimateICEnergy(), InfoProcCommand::execute(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), SimulatorFrontend::finishSimulation(), FullyConnectedCheck::fix(), DefaultICGenerator::generateSocketsAndMuxes(), MachineEditPartFactory::getSockets(), loadState(), CostEstimator::Estimator::longestPath(), BEMValidator::needsSocketCodeTable(), SimpleICOptimizer::removeAllConnections(), ConnectionSweeper::removeConnection(), MachineResourceModifier::removeNotConnectedSockets(), RemoveUnconnectedComponents::removeUnconnectedFUs(), ProximMachineStateWindow::setUtilizationHighlights(), TTAMachine::NullMachine::socketNavigator(), DefaultDecoderGenerator::writeControlRegisterMappings(), DefaultICGenerator::writeInterconnectionNetwork(), DefaultDecoderGenerator::writeRulesForSourceControlSignals(), and DefaultDecoderGenerator::writeSocketCntrlSignals().
bool TTAMachine::Machine::triggerInvalidatesResults | ( | ) | const |
Returns true if triggering make content of the register where result will be stored invalid.
Definition at line 964 of file Machine.cc.
References triggerInvalidatesResults_.
Referenced by DataDependenceGraph::earliestCycle(), and DataDependenceGraph::latestCycle().
|
virtual |
Removes the global control unit from the machine.
WARNING: The unit is not deleted. You should have a reference to it to be able to delete it later.
Reimplemented in UniversalMachine, and TTAMachine::NullMachine.
Definition at line 565 of file Machine.cc.
References controlUnit_, TTAMachine::Component::machine(), and TTAMachine::ControlUnit::unsetMachine().
Referenced by TTAMachine::ControlUnit::unsetMachine().
void TTAMachine::Machine::writeToADF | ( | const std::string & | adfFileName | ) | const |
Definition at line 913 of file Machine.cc.
References XMLSerializer::setDestinationFile(), and ADFSerializer::writeMachine().
Referenced by BlocksTranslator::BuildTTAModel().
|
private |
Contains all the address spaces of the machine.
Definition at line 296 of file Machine.hh.
Referenced by addAddressSpace(), addressSpaceNavigator(), deleteAddressSpace(), loadState(), and saveState().
|
private |
Definition at line 319 of file Machine.hh.
Referenced by alwaysWriteResults(), saveState(), and setAlwaysWriteResults().
|
private |
Definition at line 330 of file Machine.hh.
Referenced by is64bit(), saveState(), and set64bits().
|
private |
Contains all the bridges of the machine.
Definition at line 298 of file Machine.hh.
Referenced by addBridge(), bridgeNavigator(), deleteBridge(), loadState(), and saveState().
|
private |
Contains all the busses attached to the machine.
Definition at line 284 of file Machine.hh.
Referenced by addBus(), busNavigator(), loadState(), removeBus(), saveState(), and setBusPosition().
|
private |
Global control unit.
Definition at line 305 of file Machine.hh.
Referenced by controlUnit(), loadState(), saveState(), setGlobalControl(), unsetGlobalControl(), and ~Machine().
|
private |
Tells whether to do validity checks or not.
Definition at line 308 of file Machine.hh.
Referenced by Machine(), and machineTester().
|
private |
Dummy machine tester for the machine.
Definition at line 312 of file Machine.hh.
Referenced by machineTester(), and ~Machine().
|
private |
Definition at line 315 of file Machine.hh.
Referenced by loadState(), and Machine().
|
private |
Contains all the function units of the machine.
Definition at line 294 of file Machine.hh.
Referenced by addFunctionUnit(), functionUnitNavigator(), loadState(), removeFunctionUnit(), and saveState().
|
private |
Definition at line 326 of file Machine.hh.
Referenced by isFUOrdered(), saveState(), and setFUOrdered().
|
private |
Contains all the immediate slots of the machine.
Definition at line 300 of file Machine.hh.
Referenced by addImmediateSlot(), deleteImmediateSlot(), immediateSlotNavigator(), loadState(), and saveState().
|
private |
Contains all the immediate units of the machine.
Definition at line 292 of file Machine.hh.
Referenced by addImmediateUnit(), immediateUnitNavigator(), loadState(), removeImmediateUnit(), and saveState().
|
private |
Contains all the instruction templates of the machine.
Definition at line 288 of file Machine.hh.
Referenced by addInstructionTemplate(), deleteInstructionTemplate(), instructionTemplateNavigator(), loadState(), and saveState().
|
private |
Definition at line 328 of file Machine.hh.
Referenced by isLittleEndian(), saveState(), and setLittleEndian().
|
private |
Machine tester for the machine.
Definition at line 310 of file Machine.hh.
Referenced by machineTester(), and ~Machine().
|
private |
Contains all the OTA Formats of the machine.
Definition at line 302 of file Machine.hh.
Referenced by addOperationTriggeredFormat(), deleteOperationTriggeredFormat(), loadState(), operationTriggeredFormatNavigator(), and saveState().
|
static |
ObjectState attribute key for always-write-back-results.
Definition at line 251 of file Machine.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState attribute key for function units ordered in order of their sequential presence in ADF.
Definition at line 256 of file Machine.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState attribute key for trigger-invalidates-old-results.
Definition at line 253 of file Machine.hh.
Referenced by loadState(), and saveState().
|
static |
ObjectState name for Machine.
Definition at line 249 of file Machine.hh.
Referenced by loadState(), and saveState().
|
private |
Contains all the register files of the machine.
Definition at line 290 of file Machine.hh.
Referenced by addRegisterFile(), loadState(), registerFileNavigator(), removeRegisterFile(), and saveState().
|
private |
Contains all the sockets attached to the machine.
Definition at line 286 of file Machine.hh.
Referenced by addSocket(), loadState(), removeSocket(), saveState(), and socketNavigator().
|
private |
Definition at line 322 of file Machine.hh.
Referenced by saveState(), setTriggerInvalidatesResults(), and triggerInvalidatesResults().