OpenASIP  2.0
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
TTAMachine::Machine Class Reference

#include <Machine.hh>

Inheritance diagram for TTAMachine::Machine:
Inheritance graph
Collaboration diagram for TTAMachine::Machine:
Collaboration graph

Classes

class  ComponentContainer
 
class  Navigator
 

Public Types

enum  Extension { ZERO, SIGN }
 
typedef Navigator< BusBusNavigator
 Navigator type for BusNavigator. More...
 
typedef Navigator< SocketSocketNavigator
 Navigator type for SocketNavigator. More...
 
typedef Navigator< FunctionUnitFunctionUnitNavigator
 Navigator type for FunctionUnitNavigator. More...
 
typedef Navigator< AddressSpaceAddressSpaceNavigator
 Navigator type for AddressSpaceNavigator. More...
 
typedef Navigator< BridgeBridgeNavigator
 Navigator type for BridgeNavigator. More...
 
typedef Navigator< ImmediateUnitImmediateUnitNavigator
 Navigator type for ImmediateUnitNavigator. More...
 
typedef Navigator< InstructionTemplateInstructionTemplateNavigator
 Navigator type for InstructionTemplateNavigator. More...
 
typedef Navigator< RegisterFileRegisterFileNavigator
 Navigator type for RegisterFileNavigator. More...
 
typedef Navigator< ImmediateSlotImmediateSlotNavigator
 Navigator type for ImmediateSlotNavigator. More...
 
typedef Navigator< OperationTriggeredFormatOperationTriggeredFormatNavigator
 Navigator type for OperationTriggeredFormatNavigator. More...
 

Public Member Functions

 Machine ()
 
 Machine (const Machine &old)
 
virtual ~Machine ()
 
virtual bool isUniversalMachine () const
 
virtual void addBus (Bus &bus)
 
virtual void addSocket (Socket &socket)
 
void addUnit (Unit &unit)
 
virtual void addFunctionUnit (FunctionUnit &unit)
 
virtual void addImmediateUnit (ImmediateUnit &unit)
 
virtual void addRegisterFile (RegisterFile &unit)
 
virtual void addAddressSpace (AddressSpace &as)
 
virtual void addBridge (Bridge &bridge)
 
virtual void addInstructionTemplate (InstructionTemplate &instrTempl)
 
virtual void addOperationTriggeredFormat (OperationTriggeredFormat &format)
 
virtual void addImmediateSlot (ImmediateSlot &slot)
 
virtual void setGlobalControl (ControlUnit &unit)
 
virtual void unsetGlobalControl ()
 
virtual ControlUnitcontrolUnit () const
 
virtual void removeBus (Bus &bus)
 
virtual void removeSocket (Socket &socket)
 
virtual void removeUnit (Unit &unit)
 
virtual void removeFunctionUnit (FunctionUnit &unit)
 
virtual void removeImmediateUnit (ImmediateUnit &unit)
 
virtual void removeRegisterFile (RegisterFile &unit)
 
virtual void deleteBridge (Bridge &bridge)
 
virtual void deleteInstructionTemplate (InstructionTemplate &instrTempl)
 
virtual void deleteOperationTriggeredFormat (OperationTriggeredFormat &format)
 
virtual void deleteImmediateSlot (ImmediateSlot &slot)
 
virtual void deleteAddressSpace (AddressSpace &as)
 
void setBusPosition (const Bus &bus, int newPosition)
 
MachineTestermachineTester () const
 
bool alwaysWriteResults () const
 
bool triggerInvalidatesResults () const
 
bool isFUOrdered () const
 
void setAlwaysWriteResults (bool)
 
void setTriggerInvalidatesResults (bool)
 
void setFUOrdered (bool)
 
int maximumLatency () const
 
virtual void loadState (const ObjectState *state)
 
virtual ObjectStatesaveState () const
 
virtual void copyFromMachine (Machine &machine)
 
void writeToADF (const std::string &adfFileName) const
 
TCEString hash () const
 
bool hasOperation (const TCEString &opName) const
 
bool isRISCVMachine () const
 
virtual BusNavigator busNavigator () const
 
virtual SocketNavigator socketNavigator () const
 
virtual FunctionUnitNavigator functionUnitNavigator () const
 
virtual AddressSpaceNavigator addressSpaceNavigator () const
 
virtual BridgeNavigator bridgeNavigator () const
 
virtual ImmediateUnitNavigator immediateUnitNavigator () const
 
virtual InstructionTemplateNavigator instructionTemplateNavigator () const
 
virtual RegisterFileNavigator registerFileNavigator () const
 
virtual ImmediateSlotNavigator immediateSlotNavigator () const
 
virtual OperationTriggeredFormatNavigator operationTriggeredFormatNavigator () const
 
bool isLittleEndian () const
 
void setLittleEndian (bool flag)
 
bool is64bit () const
 
void set64bits (bool flag)
 
- Public Member Functions inherited from Serializable
virtual ~Serializable ()
 

Static Public Member Functions

static MachineloadFromADF (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

Machineoperator= (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< Busbusses_
 Contains all the busses attached to the machine. More...
 
ComponentContainer< Socketsockets_
 Contains all the sockets attached to the machine. More...
 
ComponentContainer< InstructionTemplateinstructionTemplates_
 Contains all the instruction templates of the machine. More...
 
ComponentContainer< RegisterFileregisterFiles_
 Contains all the register files of the machine. More...
 
ComponentContainer< ImmediateUnitimmediateUnits_
 Contains all the immediate units of the machine. More...
 
ComponentContainer< FunctionUnitfunctionUnits_
 Contains all the function units of the machine. More...
 
ComponentContainer< AddressSpaceaddressSpaces_
 Contains all the address spaces of the machine. More...
 
ComponentContainer< Bridgebridges_
 Contains all the bridges of the machine. More...
 
ComponentContainer< ImmediateSlotimmediateSlots_
 Contains all the immediate slots of the machine. More...
 
ComponentContainer< OperationTriggeredFormatoperationTriggeredFormats_
 Contains all the OTA Formats of the machine. More...
 
ControlUnitcontrolUnit_
 Global control unit. More...
 
bool doValidityChecks_
 Tells whether to do validity checks or not. More...
 
MachineTestermachineTester_
 Machine tester for the machine. More...
 
DummyMachineTesterdummyMachineTester_
 Dummy machine tester for the machine. More...
 
const std::string EMPTY_ITEMP_NAME_
 
bool alwaysWriteResults_
 
bool triggerInvalidatesResults_
 
bool fuOrdered_
 
bool littleEndian_
 
bool bitness64_
 

Detailed Description

Represents a complete TTA processor.

Definition at line 73 of file Machine.hh.

Member Typedef Documentation

◆ AddressSpaceNavigator

Navigator type for AddressSpaceNavigator.

Definition at line 219 of file Machine.hh.

◆ BridgeNavigator

Navigator type for BridgeNavigator.

Definition at line 221 of file Machine.hh.

◆ BusNavigator

Navigator type for BusNavigator.

Definition at line 213 of file Machine.hh.

◆ FunctionUnitNavigator

Navigator type for FunctionUnitNavigator.

Definition at line 217 of file Machine.hh.

◆ ImmediateSlotNavigator

Navigator type for ImmediateSlotNavigator.

Definition at line 229 of file Machine.hh.

◆ ImmediateUnitNavigator

Navigator type for ImmediateUnitNavigator.

Definition at line 223 of file Machine.hh.

◆ InstructionTemplateNavigator

Navigator type for InstructionTemplateNavigator.

Definition at line 225 of file Machine.hh.

◆ OperationTriggeredFormatNavigator

Navigator type for OperationTriggeredFormatNavigator.

Definition at line 232 of file Machine.hh.

◆ RegisterFileNavigator

Navigator type for RegisterFileNavigator.

Definition at line 227 of file Machine.hh.

◆ SocketNavigator

Navigator type for SocketNavigator.

Definition at line 215 of file Machine.hh.

Member Enumeration Documentation

◆ Extension

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.

80  {
81  ZERO, ///< Zero extension.
82  SIGN ///< Sign extension.
83  };

Constructor & Destructor Documentation

◆ Machine() [1/2]

TTAMachine::Machine::Machine ( )

Constructor.

Definition at line 76 of file Machine.cc.

76  :
77  controlUnit_(NULL), doValidityChecks_(true),
78  machineTester_(new MachineTester(*this)),
80  EMPTY_ITEMP_NAME_("no_limm"), alwaysWriteResults_(false),
82  littleEndian_(true), bitness64_(false) {
83 
84  new InstructionTemplate(EMPTY_ITEMP_NAME_, *this);
85 }

References EMPTY_ITEMP_NAME_.

◆ Machine() [2/2]

TTAMachine::Machine::Machine ( const Machine old)

Copy constructor.

Creates a copy of the given machine.

Parameters
oldThe machine to be copied.

Definition at line 95 of file Machine.cc.

95  :
97  machineTester_(new MachineTester(*this)),
99  littleEndian_(old.littleEndian_),
100  bitness64_(old.bitness64_) {
101 
102  ObjectState* state = old.saveState();
103  loadState(state);
104  delete state;
105  doValidityChecks_ = true;
106 }

References doValidityChecks_, loadState(), and saveState().

Here is the call graph for this function:

◆ ~Machine()

TTAMachine::Machine::~Machine ( )
virtual

Destructor.

Deletes all the components of the machine as well.

Definition at line 114 of file Machine.cc.

114  {
115 
116  if (controlUnit_ != NULL) {
117  delete controlUnit_;
118  }
119 
120  delete machineTester_;
121  delete dummyMachineTester_;
122 
123  // NOTE! other components are deleted in ComponentContainer's destructor
124 }

References controlUnit_, dummyMachineTester_, and machineTester_.

Member Function Documentation

◆ addAddressSpace()

void TTAMachine::Machine::addAddressSpace ( AddressSpace as)
virtual

Adds an address space into the machine.

Parameters
asAddressSpace being added.
Exceptions
ComponentAlreadyExistsIf 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.

248  {
250 }

References addRegisteredComponent(), and addressSpaces_.

Referenced by TTAMachine::AddressSpace::setMachine().

Here is the call graph for this function:

◆ addBridge()

void TTAMachine::Machine::addBridge ( Bridge bridge)
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.

Parameters
bridgeBridge being added.
Exceptions
ComponentAlreadyExistsIf 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.

263  {
265 }

References addRegisteredComponent(), and bridges_.

Referenced by TTAMachine::Bridge::setMachine().

Here is the call graph for this function:

◆ addBus()

void TTAMachine::Machine::addBus ( Bus bus)
virtual

Adds a bus into the machine.

Parameters
busBus being added.
Exceptions
ComponentAlreadyExistsIf 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.

139  {
140  // check that the name is unique among immediate slots
141  if (immediateSlotNavigator().hasItem(bus.name())) {
142  const string procName = "Machine::addBus";
143  throw ComponentAlreadyExists(__FILE__, __LINE__, procName);
144  }
145 
146  addComponent(busses_, bus);
147 }

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().

Here is the call graph for this function:

◆ addComponent()

template<typename ContainerType , typename ComponentType >
void TTAMachine::Machine::addComponent ( ContainerType &  container,
ComponentType &  toAdd 
)
private

◆ addFunctionUnit()

void TTAMachine::Machine::addFunctionUnit ( FunctionUnit unit)
virtual

Adds the given function unit to the machine.

Parameters
unitThe function unit to be added.
Exceptions
ComponentAlreadyExistsIf a function unit by the same name exists already.
IllegalParametersIf tried to add control unit with this method.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 202 of file Machine.cc.

202  {
203  const string procName = "Machine::addFunctionUnit";
204 
205  if (dynamic_cast<ControlUnit*>(&unit) != NULL) {
206  throw IllegalParameters(__FILE__, __LINE__, procName);
207  }
208 
209  if (controlUnit() != NULL && controlUnit()->name() == unit.name()) {
210  throw ComponentAlreadyExists(__FILE__, __LINE__, procName);
211  }
212 
214 }

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().

Here is the call graph for this function:

◆ addImmediateSlot()

void TTAMachine::Machine::addImmediateSlot ( ImmediateSlot slot)
virtual

Adds an immediate slot to (instruction of) the machine.

Parameters
slotThe immediate slot to be added.
Exceptions
ComponentAlreadyExistsIf an immediate slot or bus by the same name already exists in the machine.

Definition at line 299 of file Machine.cc.

299  {
300  // check that the name is unique among buses
301  if (busNavigator().hasItem(slot.name())) {
302  const string procName = "Machine::addImmediateSlot";
303  throw ComponentAlreadyExists(__FILE__, __LINE__, procName);
304  }
305 
307 }

References addRegisteredComponent(), busNavigator(), immediateSlots_, and TTAMachine::Component::name().

Referenced by TTAMachine::ImmediateSlot::setMachine().

Here is the call graph for this function:

◆ addImmediateUnit()

void TTAMachine::Machine::addImmediateUnit ( ImmediateUnit unit)
virtual

Adds the given immediate unit to the machine.

Parameters
unitThe immediate unit to be added.
Exceptions
ComponentAlreadyExistsIf an immediate unit by the same name exists already.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 224 of file Machine.cc.

224  {
226 }

References addComponent(), and immediateUnits_.

Referenced by addUnit(), BlocksIMM::BlocksIMM(), loadState(), and AddIUFromHDBDialog::onAdd().

Here is the call graph for this function:

◆ addInstructionTemplate()

void TTAMachine::Machine::addInstructionTemplate ( InstructionTemplate instrTempl)
virtual

Adds an instruction template for the machine.

Parameters
instructionTemplateThe instruction template to be added.
Exceptions
ComponentAlreadyExistsIf 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.

275  {
277 }

References addRegisteredComponent(), and instructionTemplates_.

Referenced by TTAMachine::InstructionTemplate::setMachine().

Here is the call graph for this function:

◆ addOperationTriggeredFormat()

void TTAMachine::Machine::addOperationTriggeredFormat ( OperationTriggeredFormat format)
virtual

Adds an OTA format for the machine.

Parameters
OperationTriggeredFormatThe OTA format to be added.
Exceptions
ComponentAlreadyExistsIf an instruction template by the same name already exists in the machine.

Definition at line 287 of file Machine.cc.

287  {
289 }

References addRegisteredComponent(), and operationTriggeredFormats_.

Referenced by TTAMachine::OperationTriggeredFormat::setMachine().

Here is the call graph for this function:

◆ addRegisteredComponent()

template<typename ContainerType , typename ComponentType >
void TTAMachine::Machine::addRegisteredComponent ( ContainerType &  container,
ComponentType &  toAdd 
)
private

◆ addRegisterFile()

void TTAMachine::Machine::addRegisterFile ( RegisterFile unit)
virtual

Adds the given register file to the machine.

Parameters
unitThe register file to be added.
Exceptions
ComponentAlreadyExistsIf a register file by the same name exists already.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 236 of file Machine.cc.

236  {
238 }

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().

Here is the call graph for this function:

◆ addressSpaceNavigator()

Machine::AddressSpaceNavigator TTAMachine::Machine::addressSpaceNavigator ( ) const
virtual

◆ addSocket()

void TTAMachine::Machine::addSocket ( Socket socket)
virtual

Adds a socket into the machine.

Parameters
socketSocket being added.
Exceptions
ComponentAlreadyExistsIf 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.

157  {
158  addComponent(sockets_, socket);
159 }

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().

Here is the call graph for this function:

◆ addUnit()

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.

Parameters
unitUnit being added.
Exceptions
ComponentAlreadyExistsIf a unit by the same name and type already exists in the machine.
IllegalParametersIf ControlUnit is tried to add with this method.

Definition at line 175 of file Machine.cc.

175  {
176  FunctionUnit* fu = dynamic_cast<FunctionUnit*>(&unit);
177  ImmediateUnit* iu = dynamic_cast<ImmediateUnit*>(&unit);
178  RegisterFile* rf = dynamic_cast<RegisterFile*>(&unit);
179 
180  if (fu != NULL) {
181  addFunctionUnit(*fu);
182  } else if (iu != NULL) {
183  addImmediateUnit(*iu);
184  } else if (rf != NULL) {
185  addRegisterFile(*rf);
186  } else {
187  const string procName = "Machine::addUnit";
188  throw IllegalParameters(__FILE__, __LINE__, procName);
189  }
190 }

References addFunctionUnit(), addImmediateUnit(), and addRegisterFile().

Referenced by TTAMachine::Unit::setMachine().

Here is the call graph for this function:

◆ alwaysWriteResults()

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.

954  {
955  return alwaysWriteResults_;
956 }

References alwaysWriteResults_.

Referenced by CycleLookBackSoftwareBypasser::bypassNode().

◆ bridgeNavigator()

Machine::BridgeNavigator TTAMachine::Machine::bridgeNavigator ( ) const
virtual

◆ busNavigator()

Machine::BusNavigator TTAMachine::Machine::busNavigator ( ) const
virtual

Returns a handle to the busses in the machine.

Returns
Handle to the busses in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 356 of file Machine.cc.

356  {
357  BusNavigator navigator(busses_);
358  return navigator;
359 }

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().

◆ controlUnit()

ControlUnit * TTAMachine::Machine::controlUnit ( ) const
virtual

Returns the control unit of the machine.

Returns null pointer if there is no control unit in the machine.

Returns
The control unit of the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 345 of file Machine.cc.

345  {
346  return controlUnit_;
347 }

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().

◆ copyFromMachine()

void TTAMachine::Machine::copyFromMachine ( Machine machine)
virtual

Copies state from one machine to this machine. (used for object copying).

Parameters
machinemachine to copy from

Definition at line 890 of file Machine.cc.

890  {
891  ObjectState* state = machine.saveState();
892  loadState(state);
893  delete state;
894 }

References loadState(), machine, and saveState().

Referenced by BlocksConnectICCmd::Do(), VLIWConnectICCmd::Do(), and CallExplorerPluginWindow::onRun().

Here is the call graph for this function:

◆ deleteAddressSpace()

void TTAMachine::Machine::deleteAddressSpace ( AddressSpace as)
virtual

Deletes the given address space.

Parameters
asThe address space to be deleted.
Exceptions
InstanceNotFoundIf the machine does not have the given address space.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 623 of file Machine.cc.

623  {
625 }

References addressSpaces_, and deleteComponent().

Referenced by TTAMachine::AddressSpace::unsetMachine().

Here is the call graph for this function:

◆ deleteBridge()

void TTAMachine::Machine::deleteBridge ( Bridge bridge)
virtual

Deletes the given bridge.

The machine will stay consistent after deletion.

Parameters
bridgeBridge to be deleted.
Exceptions
InstanceNotFoundIf the machine does not have the given bridge.

Reimplemented in TTAMachine::NullMachine.

Definition at line 587 of file Machine.cc.

587  {
588  deleteComponent(bridges_, bridge);
589 }

References bridges_, and deleteComponent().

Referenced by TTAMachine::Bridge::unsetMachine().

Here is the call graph for this function:

◆ deleteComponent()

template<typename ContainerType , typename ComponentType >
void TTAMachine::Machine::deleteComponent ( ContainerType &  container,
ComponentType &  toDelete 
)
private

◆ deleteImmediateSlot()

void TTAMachine::Machine::deleteImmediateSlot ( ImmediateSlot slot)
virtual

Deletes the given immediate slot.

Parameters
slotThe immediate slot to be deleted.
Exceptions
InstanceNotFoundIf the machine does not have the given immediate slot.

Definition at line 635 of file Machine.cc.

635  {
637 }

References deleteComponent(), and immediateSlots_.

Referenced by TTAMachine::ImmediateSlot::unsetMachine().

Here is the call graph for this function:

◆ deleteInstructionTemplate()

void TTAMachine::Machine::deleteInstructionTemplate ( InstructionTemplate instrTempl)
virtual

Deletes the given instruction template.

Parameters
instrTemplThe instruction template to be deleted.
Exceptions
InstanceNotFoundIf the machine does not have the given instruction template.

Reimplemented in TTAMachine::NullMachine.

Definition at line 599 of file Machine.cc.

599  {
601 }

References deleteComponent(), and instructionTemplates_.

Referenced by VLIWConnectIC::explore(), BlocksConnectIC::explore(), ImmediateGenerator::removeInsTemplate(), and TTAMachine::InstructionTemplate::unsetMachine().

Here is the call graph for this function:

◆ deleteOperationTriggeredFormat()

void TTAMachine::Machine::deleteOperationTriggeredFormat ( OperationTriggeredFormat format)
virtual

Deletes the given instruction template.

Parameters
instrTemplThe instruction template to be deleted.
Exceptions
InstanceNotFoundIf the machine does not have the given instruction template.

Definition at line 611 of file Machine.cc.

611  {
613 }

References deleteComponent(), and operationTriggeredFormats_.

Referenced by TTAMachine::OperationTriggeredFormat::unsetMachine().

Here is the call graph for this function:

◆ functionUnitNavigator()

Machine::FunctionUnitNavigator TTAMachine::Machine::functionUnitNavigator ( ) const
virtual

Returns a handle to the function units in the machine.

Returns
Handle to the function units in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 380 of file Machine.cc.

380  {
382  return navigator;
383 }

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().

◆ hash()

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.

Note
The hash string is done based on the ADF XML format, thus does not account for changes that have the different XML output, but in reality are the same architecture (in the point of view of the programmer).

Definition at line 932 of file Machine.cc.

932  {
933  ADFSerializer serializer;
934  std::string buffer;
935  serializer.setDestinationString(buffer);
936  serializer.writeMachine(*this);
937 
938  boost::hash<std::string> string_hasher;
939  size_t h = string_hasher(buffer);
940 
941  TCEString hash =
942  (Conversion::toHexString(buffer.length())).substr(2);
943 
944  hash += "_";
945  hash += (Conversion::toHexString(h)).substr(2);
946  return hash;
947 }

References XMLSerializer::setDestinationString(), Conversion::toHexString(), and ADFSerializer::writeMachine().

Referenced by DSDBManager::addArchitecture(), DSDBManager::architectureId(), and LLVMBackend::pluginFilename().

Here is the call graph for this function:

◆ hasOperation()

bool TTAMachine::Machine::hasOperation ( const TCEString opName) const

Tells whether any FU in the machine has given operation or not

Parameters
opNamename of the operation.

Definition at line 1048 of file Machine.cc.

1048  {
1050  for (int i = 0; i < fuNav.count(); i++) {
1051  FunctionUnit* fu = fuNav.item(i);
1052  if (fu->hasOperation(opName)) {
1053  return true;
1054  }
1055  }
1056  if (controlUnit()->hasOperation(opName)) {
1057  return true;
1058  }
1059  return false;
1060 }

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().

Here is the call graph for this function:

◆ immediateSlotNavigator()

Machine::ImmediateSlotNavigator TTAMachine::Machine::immediateSlotNavigator ( ) const
virtual

Returns a handle to the immediate slots in the machine.

Returns
Handle to the immediate slots in the machine.

Definition at line 462 of file Machine.cc.

462  {
464  return navigator;
465 }

References immediateSlots_.

Referenced by addBus(), TTAMachine::InstructionTemplate::addSlot(), BEMGenerator::addTopLevelFields(), DisassemblyGridTable::GetNumberCols(), TTAMachine::ImmediateSlot::ImmediateSlot(), TTAMachine::ImmediateSlot::setName(), and BEMValidator::validate().

◆ immediateUnitNavigator()

Machine::ImmediateUnitNavigator TTAMachine::Machine::immediateUnitNavigator ( ) const
virtual

Returns a handle to the immediate units in the machine.

Returns
Handle to the immediate units in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 416 of file Machine.cc.

416  {
418  return navigator;
419 }

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().

◆ instructionTemplateNavigator()

Machine::InstructionTemplateNavigator TTAMachine::Machine::instructionTemplateNavigator ( ) const
virtual

Returns a handle to the instruction templates in the machine.

Returns
Handle to the instruction templates in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 428 of file Machine.cc.

428  {
430  return navigator;
431 }

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().

◆ is64bit()

bool TTAMachine::Machine::is64bit ( ) const
inline

Definition at line 260 of file Machine.hh.

260 { return bitness64_; }

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().

◆ isFUOrdered()

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.

977  {
978  return fuOrdered_;
979 }

References fuOrdered_.

◆ isLittleEndian()

bool TTAMachine::Machine::isLittleEndian ( ) const
inline

◆ isRISCVMachine()

bool TTAMachine::Machine::isRISCVMachine ( ) const

Definition at line 1063 of file Machine.cc.

1063  {
1066  int fCount = fNav.count();
1067  if (fCount == 0) {
1068  return false;
1069  } else if (fCount != 6) {
1070  throw InvalidData(
1071  __FILE__, __LINE__, __func__,
1072  TCEString("Only Instruction format count 6 or 0 valid") +
1073  "Given machine has " + Conversion::toString(fCount) +
1074  " formats");
1075  }
1076  const std::vector<std::string> requiredFormats = {
1077  "riscv_r_type", "riscv_i_type", "riscv_s_type",
1078  "riscv_b_type", "riscv_u_type", "riscv_j_type"};
1079 
1080  for (const std::string& f : requiredFormats) {
1081  if (!fNav.hasItem(f)) {
1082  throw InvalidData(
1083  __FILE__, __LINE__, __func__,
1084  TCEString("Missing required instruction format: ") + f);
1085  }
1086  }
1087  return true;
1088 }

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().

Here is the call graph for this function:

◆ isUniversalMachine()

bool TTAMachine::Machine::isUniversalMachine ( ) const
virtual

Reimplemented in UniversalMachine.

Definition at line 127 of file Machine.cc.

127  {
128  return false;
129 }

Referenced by POMDisassembler::createFUPort().

◆ loadFromADF()

TTAMachine::Machine * TTAMachine::Machine::loadFromADF ( const std::string &  adfFileName)
static

Loads a Machine from the given ADF file.

Parameters
adfFileNameThe name of the file to load the ADF from.
Returns
A machine instance.
Exceptions
ExceptionIn case some error occured.

Definition at line 905 of file Machine.cc.

905  {
906  ADFSerializer serializer;
907  serializer.setSourceFile(adfFileName);
908 
909  return serializer.readMachine();
910 }

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().

Here is the call graph for this function:

◆ loadState()

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

Loads the state of the machine from the given ObjectState tree.

Parameters
stateRoot node of the ObjectState tree.
Exceptions
ObjectStateLoadingExceptionIf the given ObjectState tree is invalid.

Implements Serializable.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 728 of file Machine.cc.

728  {
729  string procName = "Machine::loadState";
730 
731  if (state->name() != OSNAME_MACHINE) {
732  throw ObjectStateLoadingException(__FILE__, __LINE__, procName);
733  }
734 
735  // delete all the old components
736  busses_.deleteAll();
737  sockets_.deleteAll();
738  instructionTemplates_.deleteAll();
739  registerFiles_.deleteAll();
740  immediateUnits_.deleteAll();
741  functionUnits_.deleteAll();
742  addressSpaces_.deleteAll();
743  bridges_.deleteAll();
744  immediateSlots_.deleteAll();
745  operationTriggeredFormats_.deleteAll();
746 
747  if (controlUnit_ != NULL) {
748  delete controlUnit_;
749  controlUnit_ = NULL;
750  }
751 
752  Component* toAdd = NULL;
753 
760  setFUOrdered(
764  state->hasAttribute("little-endian") &&
765  state->boolAttribute("little-endian"));
766  set64bits(
767  state->hasAttribute("bitness64") &&
768  state->boolAttribute("bitness64"));
769 
770  try {
771  // create skeletons
772  for (int i = 0; i < state->childCount(); i++) {
773  toAdd = NULL;
774  ObjectState* child = state->child(i);
775  if (child->name() == Bus::OSNAME_BUS) {
776  Bus* bus = new Bus(child);
777  toAdd = bus;
778  addBus(*bus);
779  } else if (child->name() == Socket::OSNAME_SOCKET) {
780  Socket* socket = new Socket(child);
781  toAdd = socket;
782  addSocket(*socket);
783  } else if (child->name() == Bridge::OSNAME_BRIDGE) {
784  // bridge is registered automatically
785  new Bridge(child, *this);
786  } else if (child->name() == AddressSpace::OSNAME_ADDRESS_SPACE) {
787  // address space is registered automatically and its state is
788  // loaded completely --> no need to call loadState later
789  new AddressSpace(child, *this);
790  } else if (child->name() == RegisterFile::OSNAME_REGISTER_FILE) {
791  RegisterFile* regFile = new RegisterFile(child);
792  toAdd = regFile;
793  addRegisterFile(*regFile);
794  } else if (child->name() == FunctionUnit::OSNAME_FU) {
795  FunctionUnit* fu = new FunctionUnit(child);
796  toAdd = fu;
797  addFunctionUnit(*fu);
798  } else if (child->name() ==
800  ImmediateUnit* immUnit = new ImmediateUnit(child);
801  toAdd = immUnit;
802  addImmediateUnit(*immUnit);
803  } else if (child->name() == ControlUnit::OSNAME_CONTROL_UNIT) {
804  ControlUnit* cUnit = new ControlUnit(child);
805  toAdd = cUnit;
806  setGlobalControl(*cUnit);
807  } else if (child->name() == ImmediateSlot::OSNAME_IMMEDIATE_SLOT) {
808  new ImmediateSlot(child, *this);
809  } else if (
810  child->name() !=
814  __FILE__, __LINE__, procName);
815  }
816  }
817 
818  } catch (const Exception& e) {
819  if (toAdd != NULL) {
820  delete toAdd;
821  }
822  throw ObjectStateLoadingException(__FILE__, __LINE__, procName,
823  e.errorMessage());
824  }
825 
826  // load states of each component
827  try {
828  for (int i = 0; i < state->childCount(); i++) {
829  ObjectState* child = state->child(i);
830  string name = child->stringAttribute(Component::OSKEY_NAME);
831  if (child->name() == Bus::OSNAME_BUS) {
832  BusNavigator busNav = busNavigator();
833  Bus* bus = busNav.item(name);
834  bus->loadState(child);
835  } else if (child->name() == Socket::OSNAME_SOCKET) {
836  SocketNavigator socketNav = socketNavigator();
837  Socket* socket = socketNav.item(name);
838  socket->loadState(child);
839  } else if (child->name() == Bridge::OSNAME_BRIDGE) {
840  BridgeNavigator bridgeNav = bridgeNavigator();
841  Bridge* bridge = bridgeNav.item(name);
842  bridge->loadState(child);
843  } else if (child->name() == RegisterFile::OSNAME_REGISTER_FILE) {
845  RegisterFile* rf = rfNav.item(name);
846  rf->loadState(child);
847  } else if (child->name() == FunctionUnit::OSNAME_FU) {
849  FunctionUnit* fu = fuNav.item(name);
850  fu->loadState(child);
851  } else if (child->name() ==
854  ImmediateUnit* iu = iuNav.item(name);
855  iu->loadState(child);
856  } else if (child->name() ==
858  ControlUnit* cu = controlUnit();
859  cu->loadState(child);
860  } else if (child->name() ==
862  // instruction template loads its state completely
863  new InstructionTemplate(child, *this);
864  } else if (
866  new OperationTriggeredFormat(child, *this);
867  }
868  }
869  } catch (const Exception& e) {
870  throw ObjectStateLoadingException(__FILE__, __LINE__, procName,
871  e.errorMessage());
872  }
873 
874  // create an empty instruction template if there is no instruction
875  // templates
877  if (itNav.count() == 0) {
878  new InstructionTemplate(EMPTY_ITEMP_NAME_, *this);
879  }
880 }

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().

Here is the call graph for this function:

◆ machineTester()

MachineTester & TTAMachine::Machine::machineTester ( ) const

◆ maximumLatency()

int TTAMachine::Machine::maximumLatency ( ) const

Gets the maximum latency of any operation supported by this machine.

Definition at line 1029 of file Machine.cc.

1029  {
1030  int maxLatency = 0;
1032  for (int i = 0; i < fuNav.count(); i++) {
1033  FunctionUnit* fu = fuNav.item(i);
1034  int fuLatency = fu->maxLatency();
1035  if (fuLatency > maxLatency) {
1036  maxLatency = fuLatency;
1037  }
1038  }
1039  return maxLatency;
1040 }

References TTAMachine::Machine::Navigator< ComponentType >::count(), functionUnitNavigator(), TTAMachine::Machine::Navigator< ComponentType >::item(), and TTAMachine::FunctionUnit::maxLatency().

Referenced by BF2ScheduleFront::scheduleFrontFromMove().

Here is the call graph for this function:

◆ operationTriggeredFormatNavigator()

Machine::OperationTriggeredFormatNavigator TTAMachine::Machine::operationTriggeredFormatNavigator ( ) const
virtual

Returns a handle to the instruction templates in the machine.

Returns
Handle to the instruction templates in the machine.

Definition at line 439 of file Machine.cc.

439  {
441  return navigator;
442 }

References operationTriggeredFormats_.

Referenced by BEMGenerator::addTopLevelFields(), and isRISCVMachine().

◆ operator=()

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

Assignment not allowed.

◆ registerFileNavigator()

Machine::RegisterFileNavigator TTAMachine::Machine::registerFileNavigator ( ) const
virtual

Returns a handle to the register files in the machine.

Returns
Handle to the register files in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 450 of file Machine.cc.

450  {
452  return navigator;
453 }

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().

◆ removeBus()

void TTAMachine::Machine::removeBus ( Bus bus)
virtual

Removes bus from the machine.

The machine will stay consistent after removal.

Parameters
busBus to be removed.
Exceptions
InstanceNotFoundIf the machine does not have the given bus.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 477 of file Machine.cc.

477  {
478  removeComponent(busses_, bus);
479 }

References busses_, and removeComponent().

Referenced by RemoveUnconnectedComponents::checkBuses(), VLIWConnectIC::explore(), BlocksConnectIC::explore(), MachineResourceModifier::reduceBuses(), MachineResourceModifier::removeBuses(), and TTAMachine::Bus::unsetMachine().

Here is the call graph for this function:

◆ removeComponent()

template<typename ContainerType , typename ComponentType >
void TTAMachine::Machine::removeComponent ( ContainerType &  container,
ComponentType &  toRemove 
)
private

◆ removeFunctionUnit()

void TTAMachine::Machine::removeFunctionUnit ( FunctionUnit unit)
virtual

Removes the given function unit from the machine.

Parameters
unitThe function unit to be removed.
Exceptions
InstanceNotFoundIf the given function unit does not belong to the machine.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 530 of file Machine.cc.

530  {
532 }

References functionUnits_, and removeComponent().

Referenced by MinimizeMachine::minimizeFunctionUnits(), RemoveUnconnectedComponents::removeUnconnectedFUs(), removeUnit(), and TTAMachine::FunctionUnit::unsetMachine().

Here is the call graph for this function:

◆ removeImmediateUnit()

void TTAMachine::Machine::removeImmediateUnit ( ImmediateUnit unit)
virtual

Removes the given immediate unit from the machine.

Parameters
unitThe immediate unit to be removed.
Exceptions
InstanceNotFoundIf the given immediate unit does not belong to the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 542 of file Machine.cc.

542  {
544 }

References immediateUnits_, and removeComponent().

Referenced by removeUnit(), and TTAMachine::ImmediateUnit::unsetMachine().

Here is the call graph for this function:

◆ removeRegisterFile()

void TTAMachine::Machine::removeRegisterFile ( RegisterFile unit)
virtual

Removes the given register file from the machine.

Parameters
unitThe register file to be removed.
Exceptions
InstanceNotFoundIf the given register file does not belong to the machine.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 554 of file Machine.cc.

554  {
556 }

References registerFiles_, and removeComponent().

Referenced by RemoveUnconnectedComponents::checkRFPorts(), VLIWConnectIC::explore(), MinimizeMachine::minimizeRegisterFiles(), removeUnit(), and TTAMachine::RegisterFile::unsetMachine().

Here is the call graph for this function:

◆ removeSocket()

void TTAMachine::Machine::removeSocket ( Socket socket)
virtual

Removes socket from the machine.

The machine will stay consistent after removal.

Parameters
socketSocket to be removed.
Exceptions
InstanceNotFoundIf the machine does not have the given socket.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 490 of file Machine.cc.

490  {
491  removeComponent(sockets_, socket);
492 }

References removeComponent(), and sockets_.

Referenced by VLIWConnectIC::explore(), BlocksConnectIC::explore(), MachineResourceModifier::removeNotConnectedSockets(), and TTAMachine::Socket::unsetMachine().

Here is the call graph for this function:

◆ removeUnit()

void TTAMachine::Machine::removeUnit ( Unit unit)
virtual

Removes unit from the machine.

The machine will stay consistent after removal. Global control unit must be removed using unsetGlobalControl method.

Parameters
unitUnit to be removed.
Exceptions
InstanceNotFoundIf the machine does not have the given unit.
IllegalParametersIf ControlUnit is tried to remove.

Reimplemented in TTAMachine::NullMachine.

Definition at line 505 of file Machine.cc.

505  {
506  FunctionUnit* fu = dynamic_cast<FunctionUnit*>(&unit);
507  ImmediateUnit* iu = dynamic_cast<ImmediateUnit*>(&unit);
508  RegisterFile* rf = dynamic_cast<RegisterFile*>(&unit);
509 
510  if (fu != NULL) {
511  removeFunctionUnit(*fu);
512  } else if (iu != NULL) {
513  removeImmediateUnit(*iu);
514  } else if (rf != NULL) {
515  removeRegisterFile(*rf);
516  } else {
517  const string procName = "Machine::removeUnit";
518  throw IllegalParameters(__FILE__, __LINE__, procName);
519  }
520 }

References removeFunctionUnit(), removeImmediateUnit(), and removeRegisterFile().

Here is the call graph for this function:

◆ saveComponentStates()

template<typename ContainerType >
void TTAMachine::Machine::saveComponentStates ( ContainerType &  container,
ObjectState parent 
)
staticprivate

Saves the state of each component in the given container and add the created ObjectStates as children of the given parent ObjectState.

Parameters
containerThe container.
parentThe parent ObjectState.

Definition at line 1018 of file Machine.cc.

1018  {
1019  for (int i = 0; i < container.count(); i++) {
1020  Serializable* component = container.item(i);
1021  parent->addChild(component->saveState());
1022  }
1023 }

References ObjectState::addChild(), and Serializable::saveState().

Referenced by saveState().

Here is the call graph for this function:

◆ saveState()

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

Saves the machine to ObjectState tree.

Returns
Root of the created ObjectState tree.

Implements Serializable.

Reimplemented in TTAMachine::NullMachine.

Definition at line 686 of file Machine.cc.

686  {
687 
688  ObjectState* rootState = new ObjectState(OSNAME_MACHINE);
689 
690  saveComponentStates(busses_, rootState);
691  saveComponentStates(sockets_, rootState);
692  saveComponentStates(bridges_, rootState);
700 
701  // save global control unit
702  if (controlUnit_ != NULL) {
703  rootState->addChild(controlUnit_->saveState());
704  }
705 
706  rootState->setAttribute(
708  rootState->setAttribute(
710  rootState->setAttribute(
712  rootState->setAttribute("little-endian", littleEndian_);
713  rootState->setAttribute("bitness64", bitness64_);
714 
715 
716  return rootState;
717 }

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().

Here is the call graph for this function:

◆ set64bits()

void TTAMachine::Machine::set64bits ( bool  flag)
inline

Definition at line 261 of file Machine.hh.

261 { bitness64_ = flag; }

References bitness64_.

Referenced by loadState().

◆ setAlwaysWriteResults()

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.

985  {
986  alwaysWriteResults_ = result;
987 }

References alwaysWriteResults_.

Referenced by loadState().

◆ setBusPosition()

void TTAMachine::Machine::setBusPosition ( const Bus bus,
int  newPosition 
)

Sets new position for the given bus.

Parameters
busThe bus being moved.
newPositionThe index of the new position (the first position is 0).
Exceptions
IllagalRegistrationIf the given bus is not registered to the machine.
OutOfRangeIf 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.

651  {
652  const string procName = "Machine::setBusPosition";
653 
654  if (bus.machine() != this) {
655  throw IllegalRegistration(__FILE__, __LINE__, procName);
656  }
657 
658  if (newPosition < 0 || newPosition >= busNavigator().count()) {
659  throw OutOfRange(__FILE__, __LINE__, procName);
660  }
661 
662  busses_.moveToPosition(&bus, newPosition);
663 }

References busNavigator(), busses_, and TTAMachine::Component::machine().

Referenced by ProDeBusOrderDialog::onDown(), and ProDeBusOrderDialog::onUp().

Here is the call graph for this function:

◆ setFUOrdered()

void TTAMachine::Machine::setFUOrdered ( bool  order)

Definition at line 1005 of file Machine.cc.

1005  {
1006  fuOrdered_ = order;
1007 }

References fuOrdered_.

Referenced by loadState().

◆ setGlobalControl()

void TTAMachine::Machine::setGlobalControl ( ControlUnit unit)
virtual

Sets the global control unit for the machine.

Parameters
unitThe new global control unit.
Exceptions
ComponentAlreadyExistsIf a control unit already exists in the machine.

Reimplemented in UniversalMachine, and TTAMachine::NullMachine.

Definition at line 317 of file Machine.cc.

317  {
318  const string procName = "Machine::setGlobalControl";
319 
320  if (controlUnit_ != NULL) {
321  throw ComponentAlreadyExists(__FILE__, __LINE__, procName);
322  }
323 
324  // check that the name is unique among function units
326  if (fuNav.hasItem(unit.name())) {
327  throw ComponentAlreadyExists(__FILE__, __LINE__, procName);
328  }
329 
330  if (unit.machine() == NULL) {
331  unit.setMachine(*this);
332  } else {
333  controlUnit_ = &unit;
334  }
335 }

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().

Here is the call graph for this function:

◆ setLittleEndian()

void TTAMachine::Machine::setLittleEndian ( bool  flag)
inline

Definition at line 259 of file Machine.hh.

259 { littleEndian_ = flag; }

References littleEndian_.

Referenced by BlocksTranslator::BuildTTAModel(), loadState(), and MachineDialog::onOK().

◆ setTriggerInvalidatesResults()

void TTAMachine::Machine::setTriggerInvalidatesResults ( bool  trigger)

Sets whether triggering invalidates register where result will be stored.

Definition at line 993 of file Machine.cc.

993  {
994  triggerInvalidatesResults_ = trigger;
995 }

References triggerInvalidatesResults_.

Referenced by loadState().

◆ socketNavigator()

Machine::SocketNavigator TTAMachine::Machine::socketNavigator ( ) const
virtual

Returns a handle to the sockets in the machine.

Returns
Handle to the sockets in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 368 of file Machine.cc.

368  {
369  SocketNavigator navigator(sockets_);
370  return navigator;
371 }

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().

◆ triggerInvalidatesResults()

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.

964  {
966 }

References triggerInvalidatesResults_.

Referenced by DataDependenceGraph::earliestCycle(), and DataDependenceGraph::latestCycle().

◆ unsetGlobalControl()

void TTAMachine::Machine::unsetGlobalControl ( )
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.

565  {
566  if (controlUnit_ == NULL) {
567  return;
568  } else {
569  if (controlUnit_->machine() == NULL) {
570  controlUnit_ = NULL;
571  } else {
573  }
574  }
575 }

References controlUnit_, TTAMachine::Component::machine(), and TTAMachine::ControlUnit::unsetMachine().

Referenced by TTAMachine::ControlUnit::unsetMachine().

Here is the call graph for this function:

◆ writeToADF()

void TTAMachine::Machine::writeToADF ( const std::string &  adfFileName) const

Definition at line 913 of file Machine.cc.

913  {
914  ADFSerializer serializer;
915  serializer.setDestinationFile(adfFileName);
916  serializer.writeMachine(*this);
917 }

References XMLSerializer::setDestinationFile(), and ADFSerializer::writeMachine().

Referenced by BlocksTranslator::BuildTTAModel().

Here is the call graph for this function:

Member Data Documentation

◆ addressSpaces_

ComponentContainer<AddressSpace> TTAMachine::Machine::addressSpaces_
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().

◆ alwaysWriteResults_

bool TTAMachine::Machine::alwaysWriteResults_
private

Definition at line 319 of file Machine.hh.

Referenced by alwaysWriteResults(), saveState(), and setAlwaysWriteResults().

◆ bitness64_

bool TTAMachine::Machine::bitness64_
private

Definition at line 330 of file Machine.hh.

Referenced by is64bit(), saveState(), and set64bits().

◆ bridges_

ComponentContainer<Bridge> TTAMachine::Machine::bridges_
private

Contains all the bridges of the machine.

Definition at line 298 of file Machine.hh.

Referenced by addBridge(), bridgeNavigator(), deleteBridge(), loadState(), and saveState().

◆ busses_

ComponentContainer<Bus> TTAMachine::Machine::busses_
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().

◆ controlUnit_

ControlUnit* TTAMachine::Machine::controlUnit_
private

Global control unit.

Definition at line 305 of file Machine.hh.

Referenced by controlUnit(), loadState(), saveState(), setGlobalControl(), unsetGlobalControl(), and ~Machine().

◆ doValidityChecks_

bool TTAMachine::Machine::doValidityChecks_
private

Tells whether to do validity checks or not.

Definition at line 308 of file Machine.hh.

Referenced by Machine(), and machineTester().

◆ dummyMachineTester_

DummyMachineTester* TTAMachine::Machine::dummyMachineTester_
private

Dummy machine tester for the machine.

Definition at line 312 of file Machine.hh.

Referenced by machineTester(), and ~Machine().

◆ EMPTY_ITEMP_NAME_

const std::string TTAMachine::Machine::EMPTY_ITEMP_NAME_
private

Definition at line 315 of file Machine.hh.

Referenced by loadState(), and Machine().

◆ functionUnits_

ComponentContainer<FunctionUnit> TTAMachine::Machine::functionUnits_
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().

◆ fuOrdered_

bool TTAMachine::Machine::fuOrdered_
private

Definition at line 326 of file Machine.hh.

Referenced by isFUOrdered(), saveState(), and setFUOrdered().

◆ immediateSlots_

ComponentContainer<ImmediateSlot> TTAMachine::Machine::immediateSlots_
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().

◆ immediateUnits_

ComponentContainer<ImmediateUnit> TTAMachine::Machine::immediateUnits_
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().

◆ instructionTemplates_

ComponentContainer<InstructionTemplate> TTAMachine::Machine::instructionTemplates_
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().

◆ littleEndian_

bool TTAMachine::Machine::littleEndian_
private

Definition at line 328 of file Machine.hh.

Referenced by isLittleEndian(), saveState(), and setLittleEndian().

◆ machineTester_

MachineTester* TTAMachine::Machine::machineTester_
private

Machine tester for the machine.

Definition at line 310 of file Machine.hh.

Referenced by machineTester(), and ~Machine().

◆ operationTriggeredFormats_

ComponentContainer<OperationTriggeredFormat> TTAMachine::Machine::operationTriggeredFormats_
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().

◆ OSKEY_ALWAYS_WRITE_BACK_RESULTS

const string TTAMachine::Machine::OSKEY_ALWAYS_WRITE_BACK_RESULTS = "always-write-back"
static

ObjectState attribute key for always-write-back-results.

Definition at line 251 of file Machine.hh.

Referenced by loadState(), and saveState().

◆ OSKEY_FUNCTION_UNITS_ORDERED

const string TTAMachine::Machine::OSKEY_FUNCTION_UNITS_ORDERED = "fu-ordered"
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().

◆ OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS

const string TTAMachine::Machine::OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS = "trigger-invalidates"
static

ObjectState attribute key for trigger-invalidates-old-results.

Definition at line 253 of file Machine.hh.

Referenced by loadState(), and saveState().

◆ OSNAME_MACHINE

const string TTAMachine::Machine::OSNAME_MACHINE = "machine"
static

ObjectState name for Machine.

Definition at line 249 of file Machine.hh.

Referenced by loadState(), and saveState().

◆ registerFiles_

ComponentContainer<RegisterFile> TTAMachine::Machine::registerFiles_
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().

◆ sockets_

ComponentContainer<Socket> TTAMachine::Machine::sockets_
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().

◆ triggerInvalidatesResults_

bool TTAMachine::Machine::triggerInvalidatesResults_
private

Definition at line 322 of file Machine.hh.

Referenced by saveState(), setTriggerInvalidatesResults(), and triggerInvalidatesResults().


The documentation for this class was generated from the following files:
TTAMachine::Machine::functionUnits_
ComponentContainer< FunctionUnit > functionUnits_
Contains all the function units of the machine.
Definition: Machine.hh:294
TTAMachine::Machine::removeFunctionUnit
virtual void removeFunctionUnit(FunctionUnit &unit)
Definition: Machine.cc:530
TTAMachine::Machine::bridges_
ComponentContainer< Bridge > bridges_
Contains all the bridges of the machine.
Definition: Machine.hh:298
ObjectState::hasAttribute
bool hasAttribute(const std::string &name) const
Definition: ObjectState.cc:205
TTAMachine::Machine::ZERO
@ ZERO
Zero extension.
Definition: Machine.hh:81
TTAMachine::Machine::sockets_
ComponentContainer< Socket > sockets_
Contains all the sockets attached to the machine.
Definition: Machine.hh:286
TTAMachine::ControlUnit::unsetMachine
virtual void unsetMachine()
Definition: ControlUnit.cc:134
TTAMachine::Machine::hasOperation
bool hasOperation(const TCEString &opName) const
Definition: Machine.cc:1048
Serializable::saveState
virtual ObjectState * saveState() const =0
TTAMachine::Component::name
virtual TCEString name() const
Definition: MachinePart.cc:125
ObjectState::stringAttribute
std::string stringAttribute(const std::string &name) const
Definition: ObjectState.cc:249
TTAMachine::FunctionUnit::OSNAME_FU
static const std::string OSNAME_FU
ObjectState name for function unit.
Definition: FunctionUnit.hh:117
XMLSerializer::setSourceFile
void setSourceFile(const std::string &fileName)
Definition: XMLSerializer.cc:115
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
TTAMachine::Machine::OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS
static const std::string OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS
ObjectState attribute key for trigger-invalidates-old-results.
Definition: Machine.hh:253
ObjectStateLoadingException
Definition: Exception.hh:551
TTAMachine::Machine::OperationTriggeredFormatNavigator
Navigator< OperationTriggeredFormat > OperationTriggeredFormatNavigator
Navigator type for OperationTriggeredFormatNavigator.
Definition: Machine.hh:232
Serializable
Definition: Serializable.hh:44
OutOfRange
Definition: Exception.hh:320
TTAMachine::Machine::OSNAME_MACHINE
static const std::string OSNAME_MACHINE
ObjectState name for Machine.
Definition: Machine.hh:249
TTAMachine::ControlUnit::saveState
virtual ObjectState * saveState() const
Definition: ControlUnit.cc:322
TTAMachine::Machine::set64bits
void set64bits(bool flag)
Definition: Machine.hh:261
TTAMachine::Machine::addComponent
void addComponent(ContainerType &container, ComponentType &toAdd)
ObjectState
Definition: ObjectState.hh:59
TTAMachine::Machine::triggerInvalidatesResults_
bool triggerInvalidatesResults_
Definition: Machine.hh:322
Conversion::toString
static std::string toString(const T &source)
TTAMachine::Machine::instructionTemplates_
ComponentContainer< InstructionTemplate > instructionTemplates_
Contains all the instruction templates of the machine.
Definition: Machine.hh:288
TTAMachine::AddressSpace::OSNAME_ADDRESS_SPACE
static const std::string OSNAME_ADDRESS_SPACE
ObjectState name for AddressSpace.
Definition: AddressSpace.hh:84
TTAMachine::Machine::hash
TCEString hash() const
Definition: Machine.cc:932
TTAMachine::Machine::loadState
virtual void loadState(const ObjectState *state)
Definition: Machine.cc:728
TTAMachine::Machine::addImmediateUnit
virtual void addImmediateUnit(ImmediateUnit &unit)
Definition: Machine.cc:224
TTAMachine::Machine::OSKEY_ALWAYS_WRITE_BACK_RESULTS
static const std::string OSKEY_ALWAYS_WRITE_BACK_RESULTS
ObjectState attribute key for always-write-back-results.
Definition: Machine.hh:251
TTAMachine::Machine::FunctionUnitNavigator
Navigator< FunctionUnit > FunctionUnitNavigator
Navigator type for FunctionUnitNavigator.
Definition: Machine.hh:217
TTAMachine::Machine::BusNavigator
Navigator< Bus > BusNavigator
Navigator type for BusNavigator.
Definition: Machine.hh:213
TTAMachine::Bus::OSNAME_BUS
static const std::string OSNAME_BUS
ObjectState name for Bus ObjectState.
Definition: Bus.hh:116
DummyMachineTester
Definition: DummyMachineTester.hh:41
TTAMachine::Machine::ImmediateSlotNavigator
Navigator< ImmediateSlot > ImmediateSlotNavigator
Navigator type for ImmediateSlotNavigator.
Definition: Machine.hh:229
TTAMachine::Machine::operationTriggeredFormatNavigator
virtual OperationTriggeredFormatNavigator operationTriggeredFormatNavigator() const
Definition: Machine.cc:439
TTAMachine::Machine::addRegisterFile
virtual void addRegisterFile(RegisterFile &unit)
Definition: Machine.cc:236
TTAMachine::Machine::OSKEY_FUNCTION_UNITS_ORDERED
static const std::string OSKEY_FUNCTION_UNITS_ORDERED
ObjectState attribute key for function units ordered in order of their sequential presence in ADF.
Definition: Machine.hh:256
TTAMachine::Machine::immediateUnits_
ComponentContainer< ImmediateUnit > immediateUnits_
Contains all the immediate units of the machine.
Definition: Machine.hh:292
IllegalParameters
Definition: Exception.hh:113
TTAMachine::Machine::controlUnit
virtual ControlUnit * controlUnit() const
Definition: Machine.cc:345
TTAMachine::Machine::addRegisteredComponent
void addRegisteredComponent(ContainerType &container, ComponentType &toAdd)
TTAMachine::Machine::RegisterFileNavigator
Navigator< RegisterFile > RegisterFileNavigator
Navigator type for RegisterFileNavigator.
Definition: Machine.hh:227
InvalidData
Definition: Exception.hh:149
TTAMachine::Machine::bridgeNavigator
virtual BridgeNavigator bridgeNavigator() const
Definition: Machine.cc:404
TTAMachine::Machine::immediateUnitNavigator
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition: Machine.cc:416
ADFSerializer
Definition: ADFSerializer.hh:49
TTAMachine::ImmediateSlot::OSNAME_IMMEDIATE_SLOT
static const std::string OSNAME_IMMEDIATE_SLOT
ObjectState name for ImmediateSlot.
Definition: ImmediateSlot.hh:60
TTAMachine::Machine::InstructionTemplateNavigator
Navigator< InstructionTemplate > InstructionTemplateNavigator
Navigator type for InstructionTemplateNavigator.
Definition: Machine.hh:225
XMLSerializer::setDestinationFile
void setDestinationFile(const std::string &fileName)
Definition: XMLSerializer.cc:142
__func__
#define __func__
Definition: Application.hh:67
TTAMachine::Machine::removeComponent
void removeComponent(ContainerType &container, ComponentType &toRemove)
TTAMachine::Machine::registerFiles_
ComponentContainer< RegisterFile > registerFiles_
Contains all the register files of the machine.
Definition: Machine.hh:290
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
TTAMachine::OperationTriggeredFormat::OSNAME_FORMAT
static const std::string OSNAME_FORMAT
Definition: OperationTriggeredFormat.hh:72
TTAMachine::Machine::alwaysWriteResults_
bool alwaysWriteResults_
Definition: Machine.hh:319
TTAMachine::Machine::removeImmediateUnit
virtual void removeImmediateUnit(ImmediateUnit &unit)
Definition: Machine.cc:542
TTAMachine::ImmediateUnit::OSNAME_IMMEDIATE_UNIT
static const std::string OSNAME_IMMEDIATE_UNIT
ObjectState name for ImmediateUnit.
Definition: ImmediateUnit.hh:75
TTAMachine::Machine::littleEndian_
bool littleEndian_
Definition: Machine.hh:328
TTAMachine::Component::OSKEY_NAME
static const std::string OSKEY_NAME
ObjectState attribute key for the name of the component.
Definition: MachinePart.hh:137
ObjectState::child
ObjectState * child(int index) const
Definition: ObjectState.cc:471
ObjectState::addChild
void addChild(ObjectState *child)
Definition: ObjectState.cc:376
ObjectState::childCount
int childCount() const
TTAMachine::Machine::removeRegisterFile
virtual void removeRegisterFile(RegisterFile &unit)
Definition: Machine.cc:554
TTAMachine::Machine::saveState
virtual ObjectState * saveState() const
Definition: Machine.cc:686
TTAMachine::RegisterFile::OSNAME_REGISTER_FILE
static const std::string OSNAME_REGISTER_FILE
ObjectState name for RegisterFile.
Definition: RegisterFile.hh:94
Exception
Definition: Exception.hh:54
TTAMachine::Machine::doValidityChecks_
bool doValidityChecks_
Tells whether to do validity checks or not.
Definition: Machine.hh:308
TTAMachine::Machine::socketNavigator
virtual SocketNavigator socketNavigator() const
Definition: Machine.cc:368
TTAMachine::Machine::operationTriggeredFormats_
ComponentContainer< OperationTriggeredFormat > operationTriggeredFormats_
Contains all the OTA Formats of the machine.
Definition: Machine.hh:302
TTAMachine::Machine::addBus
virtual void addBus(Bus &bus)
Definition: Machine.cc:139
ObjectState::name
std::string name() const
TTAMachine::Machine::SIGN
@ SIGN
Sign extension.
Definition: Machine.hh:82
TTAMachine::Machine::immediateSlotNavigator
virtual ImmediateSlotNavigator immediateSlotNavigator() const
Definition: Machine.cc:462
TTAMachine::Socket::OSNAME_SOCKET
static const std::string OSNAME_SOCKET
ObjectState name for socket.
Definition: Socket.hh:100
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
Conversion::toHexString
static std::string toHexString(T source, std::size_t digits=0, bool include0x=true)
TTAMachine::Machine::setGlobalControl
virtual void setGlobalControl(ControlUnit &unit)
Definition: Machine.cc:317
TTAMachine::Machine::EMPTY_ITEMP_NAME_
const std::string EMPTY_ITEMP_NAME_
Definition: Machine.hh:315
IllegalRegistration
Definition: Exception.hh:532
TTAMachine::Machine::SocketNavigator
Navigator< Socket > SocketNavigator
Navigator type for SocketNavigator.
Definition: Machine.hh:215
XMLSerializer::setDestinationString
void setDestinationString(std::string &destination)
Definition: XMLSerializer.cc:156
TTAMachine::Machine::registerFileNavigator
virtual RegisterFileNavigator registerFileNavigator() const
Definition: Machine.cc:450
TTAMachine::Machine::dummyMachineTester_
DummyMachineTester * dummyMachineTester_
Dummy machine tester for the machine.
Definition: Machine.hh:312
TTAMachine::Machine::deleteComponent
void deleteComponent(ContainerType &container, ComponentType &toDelete)
TTAMachine::Bridge::OSNAME_BRIDGE
static const std::string OSNAME_BRIDGE
ObjectState name for bridge.
Definition: Bridge.hh:70
TTAMachine::Machine::addFunctionUnit
virtual void addFunctionUnit(FunctionUnit &unit)
Definition: Machine.cc:202
TTAMachine::Machine::BridgeNavigator
Navigator< Bridge > BridgeNavigator
Navigator type for BridgeNavigator.
Definition: Machine.hh:221
TTAMachine::Component::machine
virtual Machine * machine() const
TTAMachine::Machine::addressSpaces_
ComponentContainer< AddressSpace > addressSpaces_
Contains all the address spaces of the machine.
Definition: Machine.hh:296
TTAMachine::Machine::setLittleEndian
void setLittleEndian(bool flag)
Definition: Machine.hh:259
TCEString
Definition: TCEString.hh:53
ObjectState::boolAttribute
bool boolAttribute(const std::string &name) const
Definition: ObjectState.cc:338
TTAMachine::Machine::AddressSpaceNavigator
Navigator< AddressSpace > AddressSpaceNavigator
Navigator type for AddressSpaceNavigator.
Definition: Machine.hh:219
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
ComponentAlreadyExists
Definition: Exception.hh:510
ADFSerializer::writeMachine
void writeMachine(const TTAMachine::Machine &machine)
Definition: ADFSerializer.cc:259
TTAMachine::Machine::machineTester_
MachineTester * machineTester_
Machine tester for the machine.
Definition: Machine.hh:310
ADFSerializer::readMachine
TTAMachine::Machine * readMachine()
Definition: ADFSerializer.cc:275
TTAMachine::Machine::busses_
ComponentContainer< Bus > busses_
Contains all the busses attached to the machine.
Definition: Machine.hh:284
TTAMachine::ControlUnit::OSNAME_CONTROL_UNIT
static const std::string OSNAME_CONTROL_UNIT
ObjectState name for ControlUnit.
Definition: ControlUnit.hh:82
TTAMachine::Machine::setTriggerInvalidatesResults
void setTriggerInvalidatesResults(bool)
Definition: Machine.cc:993
TTAMachine::Machine::setFUOrdered
void setFUOrdered(bool)
Definition: Machine.cc:1005
TTAMachine::Machine::instructionTemplateNavigator
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition: Machine.cc:428
MachineTester
Definition: MachineTester.hh:46
TTAMachine::Machine::setAlwaysWriteResults
void setAlwaysWriteResults(bool)
Definition: Machine.cc:985
TTAMachine::Machine::immediateSlots_
ComponentContainer< ImmediateSlot > immediateSlots_
Contains all the immediate slots of the machine.
Definition: Machine.hh:300
TTAMachine::Machine::addSocket
virtual void addSocket(Socket &socket)
Definition: Machine.cc:157
TTAMachine::Machine::controlUnit_
ControlUnit * controlUnit_
Global control unit.
Definition: Machine.hh:305
ObjectState::setAttribute
void setAttribute(const std::string &name, const std::string &value)
Definition: ObjectState.cc:100
TTAMachine::InstructionTemplate::OSNAME_INSTRUCTION_TEMPLATE
static const std::string OSNAME_INSTRUCTION_TEMPLATE
ObjectState name for instruction template.
Definition: InstructionTemplate.hh:90
TTAMachine::Machine::ImmediateUnitNavigator
Navigator< ImmediateUnit > ImmediateUnitNavigator
Navigator type for ImmediateUnitNavigator.
Definition: Machine.hh:223
TTAMachine::Machine::bitness64_
bool bitness64_
Definition: Machine.hh:330
TTAMachine::Machine::fuOrdered_
bool fuOrdered_
Definition: Machine.hh:326
TTAMachine::Machine::saveComponentStates
static void saveComponentStates(ContainerType &container, ObjectState *parent)
Definition: Machine.cc:1018