OpenASIP 2.2
Loading...
Searching...
No Matches
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.
 
typedef Navigator< SocketSocketNavigator
 Navigator type for SocketNavigator.
 
typedef Navigator< FunctionUnitFunctionUnitNavigator
 Navigator type for FunctionUnitNavigator.
 
typedef Navigator< AddressSpaceAddressSpaceNavigator
 Navigator type for AddressSpaceNavigator.
 
typedef Navigator< BridgeBridgeNavigator
 Navigator type for BridgeNavigator.
 
typedef Navigator< ImmediateUnitImmediateUnitNavigator
 Navigator type for ImmediateUnitNavigator.
 
typedef Navigator< InstructionTemplateInstructionTemplateNavigator
 Navigator type for InstructionTemplateNavigator.
 
typedef Navigator< RegisterFileRegisterFileNavigator
 Navigator type for RegisterFileNavigator.
 
typedef Navigator< ImmediateSlotImmediateSlotNavigator
 Navigator type for ImmediateSlotNavigator.
 
typedef Navigator< OperationTriggeredFormatOperationTriggeredFormatNavigator
 Navigator type for OperationTriggeredFormatNavigator.
 

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.
 
static const std::string OSKEY_ALWAYS_WRITE_BACK_RESULTS = "always-write-back"
 ObjectState attribute key for always-write-back-results.
 
static const std::string OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS = "trigger-invalidates"
 ObjectState attribute key for trigger-invalidates-old-results.
 
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.
 

Private Member Functions

Machineoperator= (const Machine &)
 Assignment not allowed.
 
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.
 
ComponentContainer< Socketsockets_
 Contains all the sockets attached to the machine.
 
ComponentContainer< InstructionTemplateinstructionTemplates_
 Contains all the instruction templates of the machine.
 
ComponentContainer< RegisterFileregisterFiles_
 Contains all the register files of the machine.
 
ComponentContainer< ImmediateUnitimmediateUnits_
 Contains all the immediate units of the machine.
 
ComponentContainer< FunctionUnitfunctionUnits_
 Contains all the function units of the machine.
 
ComponentContainer< AddressSpaceaddressSpaces_
 Contains all the address spaces of the machine.
 
ComponentContainer< Bridgebridges_
 Contains all the bridges of the machine.
 
ComponentContainer< ImmediateSlotimmediateSlots_
 Contains all the immediate slots of the machine.
 
ComponentContainer< OperationTriggeredFormatoperationTriggeredFormats_
 Contains all the OTA Formats of the machine.
 
ControlUnitcontrolUnit_
 Global control unit.
 
bool doValidityChecks_
 Tells whether to do validity checks or not.
 
MachineTestermachineTester_
 Machine tester for the machine.
 
DummyMachineTesterdummyMachineTester_
 Dummy machine tester for the machine.
 
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 };
@ SIGN
Sign extension.
Definition Machine.hh:82
@ ZERO
Zero extension.
Definition Machine.hh:81

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}
const std::string EMPTY_ITEMP_NAME_
Definition Machine.hh:315
DummyMachineTester * dummyMachineTester_
Dummy machine tester for the machine.
Definition Machine.hh:312
MachineTester * machineTester_
Machine tester for the machine.
Definition Machine.hh:310
ControlUnit * controlUnit_
Global control unit.
Definition Machine.hh:305
bool triggerInvalidatesResults_
Definition Machine.hh:322
bool doValidityChecks_
Tells whether to do validity checks or not.
Definition Machine.hh:308

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}
virtual void loadState(const ObjectState *state)
Definition Machine.cc:728

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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 248 of file Machine.cc.

248 {
250}
ComponentContainer< AddressSpace > addressSpaces_
Contains all the address spaces of the machine.
Definition Machine.hh:296
void addRegisteredComponent(ContainerType &container, ComponentType &toAdd)

References addRegisteredComponent(), and addressSpaces_.

Referenced by UniversalMachine::addAddressSpace(), and 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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 263 of file Machine.cc.

263 {
265}
ComponentContainer< Bridge > bridges_
Contains all the bridges of the machine.
Definition Machine.hh:298

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 TTAMachine::NullMachine, and UniversalMachine.

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}
virtual ImmediateSlotNavigator immediateSlotNavigator() const
Definition Machine.cc:462
void addComponent(ContainerType &container, ComponentType &toAdd)
ComponentContainer< Bus > busses_
Contains all the busses attached to the machine.
Definition Machine.hh:284

References addComponent(), busses_, immediateSlotNavigator(), and TTAMachine::Component::name().

Referenced by UniversalMachine::addBus(), ADFCombiner::addBuses(), MachineResourceModifier::addBusesByAmount(), BlocksGCU::BlocksGCU(), ADFCombiner::createBus(), BlocksConnectIC::createBus(), VLIWConnectIC::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 TTAMachine::NullMachine, and UniversalMachine.

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}
virtual TCEString name() const
virtual ControlUnit * controlUnit() const
Definition Machine.cc:345
ComponentContainer< FunctionUnit > functionUnits_
Contains all the function units of the machine.
Definition Machine.hh:294

References addComponent(), controlUnit(), functionUnits_, and TTAMachine::Component::name().

Referenced by UniversalMachine::addFunctionUnit(), 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}
virtual BusNavigator busNavigator() const
Definition Machine.cc:356
ComponentContainer< ImmediateSlot > immediateSlots_
Contains all the immediate slots of the machine.
Definition Machine.hh:300

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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 224 of file Machine.cc.

224 {
226}
ComponentContainer< ImmediateUnit > immediateUnits_
Contains all the immediate units of the machine.
Definition Machine.hh:292

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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 275 of file Machine.cc.

275 {
277}
ComponentContainer< InstructionTemplate > instructionTemplates_
Contains all the instruction templates of the machine.
Definition Machine.hh:288

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}
ComponentContainer< OperationTriggeredFormat > operationTriggeredFormats_
Contains all the OTA Formats of the machine.
Definition Machine.hh:302

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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 236 of file Machine.cc.

236 {
238}
ComponentContainer< RegisterFile > registerFiles_
Contains all the register files of the machine.
Definition Machine.hh:290

References addComponent(), and registerFiles_.

Referenced by UniversalMachine::addRegisterFile(), ADFCombiner::addRegisterFiles(), ComponentAdder::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

Returns a handle to the address spaces in the machine.

Returns
Handle to the address spaces in the machine.

Reimplemented in TTAMachine::NullMachine.

Definition at line 392 of file Machine.cc.

392 {
394 return navigator;
395}
Navigator< AddressSpace > AddressSpaceNavigator
Navigator type for AddressSpaceNavigator.
Definition Machine.hh:219

References addressSpaces_.

Referenced by MemorySystem::addAddressSpace(), ADFCombiner::addAddressSpaces(), ADFCombiner::addFunctionUnits(), TTAMachine::AddressSpace::AddressSpace(), llvm::LLVMTCEBuilder::addressSpaceById(), TTAMachine::NullMachine::addressSpaceNavigator(), TTAProgram::TPEFProgramFactory::build(), UniversalMachine::dataAddressSpace(), MachineInfo::defaultDataAddressSpace(), AddASCmd::Do(), llvm::LLVMTCEBuilder::emitOperationMacro(), InfoProcCommand::execute(), VectorLSGenerator::explore(), CodeSectionCreator::finalize(), TTAProgram::TPEFProgramFactory::findAddressSpace(), MachineResourceManager::findDataAddressSpace(), ProgramImageGenerator::generateDataImage(), llvm::LLVMTCEBuilder::initDataSections(), AddWatchDialog::initialize(), SimulatorFrontend::initializeMemorySystem(), UniversalMachine::instructionAddressSpace(), AddressSpaceDialog::isFreeId(), TTAMachine::FunctionUnit::loadState(), main(), AddressSpacesDialog::onAdd(), AddWatchDialog::onASChoice(), AddressSpaceDialog::onOK(), GCUDialog::onOK(), FUDialog::onSetAddressSpace(), printLatexAddressSpaceDescription(), AddressSpacesDialog::selectedAS(), TTAMachine::AddressSpace::setNumericalIds(), MemorySystem::shareMemoriesWith(), llvm::TCETargetLowering::TCETargetLowering(), FUDialog::updateAddressSpaceChoice(), GCUDialog::updateAddressSpaceChoice(), and AddressSpacesDialog::updateASList().

◆ 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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 157 of file Machine.cc.

157 {
158 addComponent(sockets_, socket);
159}
ComponentContainer< Socket > sockets_
Contains all the sockets attached to the machine.
Definition Machine.hh:286

References addComponent(), and sockets_.

Referenced by ADFCombiner::addBuses(), UniversalMachine::addSocket(), 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}
virtual void addFunctionUnit(FunctionUnit &unit)
Definition Machine.cc:202
virtual void addImmediateUnit(ImmediateUnit &unit)
Definition Machine.cc:224
virtual void addRegisterFile(RegisterFile &unit)
Definition Machine.cc:236

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 948 of file Machine.cc.

948 {
949 return alwaysWriteResults_;
950}

References alwaysWriteResults_.

Referenced by CycleLookBackSoftwareBypasser::bypassNode(), and BFLateBypasses::operator()().

◆ 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}
Navigator< Bus > BusNavigator
Navigator type for BusNavigator.
Definition Machine.hh:213

References busses_.

Referenced by ADFCombiner::addAllGuardsToConnectionBuses(), CodeCompressorPlugin::addBitsForMoveSlot(), ADFCombiner::addBuses(), MachineResourceModifier::addBusesByAmount(), SimpleICOptimizer::addConnections(), BEMGenerator::addEncodings(), BEMGenerator::addEncodings(), BEMGenerator::addEncodings(), DefaultICGenerator::addICToNetlist(), addImmediateSlot(), TTAMachine::InstructionTemplate::addSlot(), ImmediateGenerator::addSplitInsTemplate(), BEMGenerator::addSubfields(), BEMGenerator::addTopLevelFields(), MachineResourceModifier::analyzeBuses(), ResourceConstraintAnalyzer::analyzeMoveNode(), TDGen::analyzeRegisters(), FullyConnectedCheck::attachSocketToAllBusses(), MachineStateBuilder::buildMachineState(), BusBroker::buildResources(), ITemplateBroker::buildResources(), TTAMachine::NullMachine::busNavigator(), llvm::TCETargetMachine::calculateSupportedImmediates(), MachineInfo::canEncodeImmediateInteger(), FullyConnectedCheck::canFix(), ProgrammabilityValidator::checkBooleanRegister(), RemoveUnconnectedComponents::checkBuses(), TTAMachine::FunctionUnit::cleanupGuards(), TTAMachine::FUPort::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(), AddBridgeCmd::Do(), AddBusCmd::Do(), PasteComponentCmd::Do(), CodeCompressorPlugin::encodeMove(), DefaultICDecoderEstimator::estimateICArea(), DefaultICDecoderEstimator::estimateICEnergy(), InfoBussesCommand::execute(), InfoSegmentsCommand::execute(), InfoProcCommand::execute(), BlocksConnectIC::explore(), VLIWConnectIC::explore(), CostEstimator::Estimator::findAllICPaths(), findBooleanGuard(), TTAProgram::TPEFProgramFactory::findBus(), findBus(), MachineResourceManager::findBusWidth(), ProgrammabilityValidator::findGlobalConnectionRegister(), DefaultDecoderGenerator::findGuard(), 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(), loadState(), TTAMachine::Socket::loadState(), MachineInfo::longestGuardLatency(), CostEstimator::Estimator::longestPath(), MachineAnalysis::MachineAnalysis(), MachineConnectivityCheck::maxSIMMCount(), MinimizeMachine::minimizeBuses(), BEMValidator::needsSourceField(), ImmediateSlotDialog::onAddSlot(), TemplateListDialog::onAddSlot(), ProDeBusOrderDialog::onBusSelectionChanged(), ProDeBusOrderDialog::onDown(), BridgeDialog::onInputBus(), BridgeDialog::onOK(), BusDialog::onOK(), TemplateSlotDialog::onOK(), ProDeBusOrderDialog::onUp(), TTAMachine::Bus::position(), MachineResourceModifier::reduceBuses(), MachineResourceManager::registerFileIndexReference(), ImmInfo::registerImmediateLoadWidth(), SimpleICOptimizer::removeAllConnections(), MachineResourceModifier::removeBuses(), ConnectionSweeper::removeConnection(), HDB::RFArchitecture::RFArchitecture(), HDB::RFArchitecture::RFArchitecture(), MachineResourceManager::rFPortOrFUIndexReference(), ProGe::RV32MicroCodeGenerator::RV32MicroCodeGenerator(), SocketDialog::segment(), setBusPosition(), TTAMachine::ImmediateSlot::setName(), ProximMachineStateWindow::setUtilizationHighlights(), FullyConnectedCheck::socketAttachedToAllBusses(), MachineInfo::supportsBoolRegisterGuardedJumps(), MachineInfo::supportsPortGuardedJump(), MachineInfo::supportsPortGuardedJumps(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), MachineConnectivityCheck::totalConnectionCount(), TemplateSlotDialog::TransferDataToWindow(), UniversalMachine::universalBus(), TTAMachine::ImmediateUnit::unsetMachine(), BridgeDialog::updateBusChoices(), ProDeBusOrderDialog::updateBusList(), SocketDialog::updateConnected(), TemplateListDialog::updateSlotList(), 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(), InputFUBroker::buildResources(), OutputFUBroker::buildResources(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::busConnectedToDestination(), FullyConnectedCheck::check(), 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(), SimulatorFrontend::findPort(), TTAProgram::TPEFProgramFactory::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(), CopyingDelaySlotFiller::getMove(), 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(), SimulatorFrontend::loadMachine(), TTAMachine::RegisterGuard::loadState(), loadState(), MachineInfo::longestGuardLatency(), ProGe::LoopBufferBlock::LoopBufferBlock(), main(), ProGe::RV32MicroCodeGenerator::mapFunctionUnit(), ScheduleEstimator::maximumSizeOfBB(), CompiledSimCodeGenerator::maxLatency(), MachineInfo::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(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::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(), DefaultICDecoderGenerator::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 884 of file Machine.cc.

884 {
885 ObjectState* state = machine.saveState();
886 loadState(state);
887 delete state;
888}
TTAMachine::Machine * machine
the architecture definition of the estimated processor
virtual ObjectState * saveState() const
Definition Machine.cc:686

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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 623 of file Machine.cc.

623 {
625}
void deleteComponent(ContainerType &container, ComponentType &toDelete)

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 BlocksConnectIC::explore(), VLIWConnectIC::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}
Navigator< FunctionUnit > FunctionUnitNavigator
Navigator type for FunctionUnitNavigator.
Definition Machine.hh:217

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(), InputFUBroker::buildResources(), OutputFUBroker::buildResources(), MachineConnectivityCheck::busConnectedToAnyFU(), MachineConnectivityCheck::canBypassOpToDst(), FullyConnectedCheck::check(), AddressSpaceCheck::check(), FullyConnectedCheck::check(), OperationBindingCheck::check(), MinimalOpSetCheck::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(), AutoSelectImplementationsDialog::findFUImplementations(), 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(), ProcessorImplementationWindow::handleSelectFUImplementation(), 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(), CompiledSimCodeGenerator::maxLatency(), MachineInfo::maxLatency(), MachineInfo::maxMemoryAlignment(), MinimizeMachine::minimizeFunctionUnits(), MinimalOpSetCheck::missingOperations(), MachineConnectivityCheck::needRegCopiesDueReadPortConflicts(), MachineConnectivityCheck::needsRegisterCopiesDueImmediateOperands(), AddFUFromHDBDialog::onAdd(), BusDialog::onAddFUGuard(), AddWatchDialog::onFUChoice(), FUDialog::onOK(), GCUDialog::onOK(), PlatformIntegrator::parseDataMemories(), MachineResourceModifier::percentualFUIncrease(), BF2Scheduler::preAllocateFunctionUnitsInner(), printLatexFunctionUnitDescription(), MachineConnectivityCheck::raConnected(), ProximPortWindow::reinitialize(), BF2Scheduler::releasePortForOp(), RemoveUnconnectedComponents::removeUnconnectedFUs(), IDFValidator::removeUnknownImplementations(), ADFCombiner::renameExtraUnits(), RegisterCopyAdder::requiredRegisterCopiesForEachFU(), FUGuardDialog::selectedFU(), ComponentImplementationSelector::selectFUs(), setGlobalControl(), DataDependenceGraph::setMachine(), ProximMachineStateWindow::setUtilizationHighlights(), TDGen::supportedStackAccessOperations(), MachineConnectivityCheck::tempRegisterFiles(), ProGe::TestBenchBlock::TestBenchBlock(), MachineConnectivityCheck::toRfConnected(), CostEstimator::Estimator::totalAreaOfFunctionUnits(), CostEstimator::Estimator::totalEnergyOfFunctionUnits(), FUGuardDialog::TransferDataToWindow(), OTAOperationDialog::TransferDataToWindow(), MachineInfo::triggerIndex(), UniversalMachine::universalFunctionUnit(), TTAMachine::AddressSpace::unsetMachine(), ProximPortWindow::update(), CompiledSimCodeGenerator::updateDeclaredSymbolsList(), ProcessorImplementationWindow::updateImplementationLists(), 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 926 of file Machine.cc.

926 {
927 ADFSerializer serializer;
928 std::string buffer;
929 serializer.setDestinationString(buffer);
930 serializer.writeMachine(*this);
931
932 boost::hash<std::string> string_hasher;
933 size_t h = string_hasher(buffer);
934
936 (Conversion::toHexString(buffer.length())).substr(2);
937
938 hash += "_";
939 hash += (Conversion::toHexString(h)).substr(2);
940 return hash;
941}
void writeMachine(const TTAMachine::Machine &machine)
static std::string toHexString(T source, std::size_t digits=0, bool include0x=true)
TCEString hash() const
Definition Machine.cc:926
void setDestinationString(std::string &destination)

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

Referenced by DSDBManager::addArchitecture(), DSDBManager::architectureId(), and hash().

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 1042 of file Machine.cc.

1042 {
1044 for (int i = 0; i < fuNav.count(); i++) {
1045 FunctionUnit* fu = fuNav.item(i);
1046 if (fu->hasOperation(opName)) {
1047 return true;
1048 }
1049 }
1050 if (controlUnit()->hasOperation(opName)) {
1051 return true;
1052 }
1053 return false;
1054}
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition Machine.cc:380
bool hasOperation(const TCEString &opName) const
Definition Machine.cc:1042

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

Referenced by OTAOperationDialog::addRISCVBaseOperations(), TDGen::create32BitExtLoadPatterns(), TDGen::createBoolAndHalfLoadPatterns(), TDGen::createByteExtLoadPatterns(), TDGen::createShortExtLoadPatterns(), llvm::LLVMTCEBuilder::emitMove(), TDGen::genGeneratedTCEPlugin_getLoad(), hasOperation(), 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

◆ 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}
Navigator< ImmediateUnit > ImmediateUnitNavigator
Navigator type for ImmediateUnitNavigator.
Definition Machine.hh:223

References immediateUnits_.

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), DefaultDecoderGenerator::addGlockPortToDecoder(), ProGe::NetlistGenerator::addIUToNetlist(), BEMGenerator::addLongImmDstRegisterFields(), ImmediateGenerator::addSplitInsTemplate(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), MachineStateBuilder::buildMachineState(), BusBroker::buildResources(), IUBroker::buildResources(), llvm::TCETargetMachine::calculateSupportedImmediates(), MachineInfo::canEncodeImmediateInteger(), MachineConnectivityCheck::canWriteAllImmediates(), FullyConnectedCheck::check(), FullyConnectedCheck::check(), IDFValidator::checkIUImplementations(), ProGe::ProcessorGenerator::checkIULatencies(), BEMValidator::checkLImmDstRegisterFields(), DefaultDecoderGenerator::completeDecoderBlock(), ADFCombiner::connectRegisterFiles(), AddIUCmd::Do(), PasteComponentCmd::Do(), InfoImmediatesCommand::execute(), InfoIunitsCommand::execute(), InfoProcCommand::execute(), BlocksConnectIC::explore(), VLIWConnectIC::explore(), ProgrammabilityValidator::findConnections(), TTAProgram::TPEFProgramFactory::findImmediateUnit(), AutoSelectImplementationsDialog::findIUImplementations(), MachineConnectivityCheck::findPossibleSourcePorts(), FullyConnectedCheck::fix(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProGe::ProGeUI::generateIDF(), MachineEditPartFactory::getUnits(), DefaultDecoderGenerator::glockPortWidth(), ProcessorImplementationWindow::handleSelectIUImplementation(), TTAMachine::NullMachine::immediateUnitNavigator(), CompiledSimulation::immediateUnitRegisterValue(), MachineResourceManager::indexResource(), TTAProgram::TPEFResourceUpdater::initCache(), TTAMachine::InstructionTemplate::loadState(), loadState(), main(), MachineConnectivityCheck::maxLIMMCount(), AddIUFromHDBDialog::onAdd(), TemplateListDialog::onAddSlot(), IUDialog::onOK(), TemplateSlotDialog::onOK(), ImmInfo::registerImmediateLoadWidth(), ProximRegisterWindow::reinitialize(), IDFValidator::removeUnknownImplementations(), ADFCombiner::renameExtraUnits(), ComponentImplementationSelector::selectIUs(), TTAMachine::InstructionTemplate::supportedWidth(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), MachineConnectivityCheck::tempRegisterFiles(), MachineConnectivityCheck::toRfConnected(), TemplateSlotDialog::TransferDataToWindow(), ProximRegisterWindow::update(), ProcessorImplementationWindow::updateImplementationLists(), 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}
Navigator< InstructionTemplate > InstructionTemplateNavigator
Navigator type for InstructionTemplateNavigator.
Definition Machine.hh:225

References instructionTemplates_.

Referenced by CodeCompressorPlugin::addBitsForImmediateSlot(), CodeCompressorPlugin::addBitsForMoveSlot(), BEMGenerator::addEncodings(), BEMGenerator::addLongImmDstRegisterFields(), BEMGenerator::addTopLevelFields(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), BusBroker::buildResources(), ITemplateBroker::buildResources(), llvm::TCETargetMachine::calculateSupportedImmediates(), MachineInfo::canEncodeImmediateInteger(), BEMValidator::checkImmediateControlField(), BEMValidator::checkLImmDstRegisterFields(), BlocksConnectIC::explore(), VLIWConnectIC::explore(), TTAProgram::TPEFProgramFactory::findInstrTemplate(), MachineResourceModifier::hasSlot(), CodeCompressorPlugin::instructionTemplate(), TTAMachine::NullMachine::instructionTemplateNavigator(), loadState(), BEMGenerator::maxLongImmSlotWidth(), TemplateListDialog::onAddTemplate(), BusDialog::onOK(), ImmediateGenerator::printImmediateTemplates(), MachineResourceModifier::reduceBuses(), ImmInfo::registerImmediateLoadWidth(), MachineResourceModifier::removeBuses(), ImmediateGenerator::removeInsTemplate(), TemplateListDialog::selectedTemplate(), IUBroker::setupResourceLinks(), MachineInfo::templatesUsesSlot(), MachineInfo::templatesUsingSlot(), TemplateListDialog::TransferDataToWindow(), TTAMachine::Bus::unsetMachine(), TTAMachine::ImmediateSlot::unsetMachine(), TTAMachine::ImmediateUnit::unsetMachine(), IUDialog::updateTemplateList(), 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(), 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(), RISCVTDGen::writePatternDefinition(), 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 971 of file Machine.cc.

971 {
972 return fuOrdered_;
973}

References fuOrdered_.

◆ isLittleEndian()

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

◆ isRISCVMachine()

bool TTAMachine::Machine::isRISCVMachine ( ) const

Definition at line 1057 of file Machine.cc.

1057 {
1060 int fCount = fNav.count();
1061 if (fCount == 0) {
1062 return false;
1063 }
1064 const std::vector<std::string> requiredFormats = {
1065 "riscv_r_type", "riscv_i_type", "riscv_s_type",
1066 "riscv_b_type", "riscv_u_type", "riscv_j_type"};
1067
1068 for (const std::string& f : requiredFormats) {
1069 if (!fNav.hasItem(f)) {
1070 throw InvalidData(
1071 __FILE__, __LINE__, __func__,
1072 TCEString("Missing required instruction format: ") + f);
1073 }
1074 }
1075 return true;
1076}
#define __func__
virtual OperationTriggeredFormatNavigator operationTriggeredFormatNavigator() const
Definition Machine.cc:439
Navigator< OperationTriggeredFormat > OperationTriggeredFormatNavigator
Navigator type for OperationTriggeredFormatNavigator.
Definition Machine.hh:232

References __func__, TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Machine::Navigator< ComponentType >::hasItem(), and operationTriggeredFormatNavigator().

Referenced by ProGe::NetlistGenerator::addGCUToNetlist(), DefaultICGenerator::addICToNetlist(), ProGe::ProcessorWrapperBlock::addInstructionMemory(), DefaultICDecoderGenerator::addInstructioRegisterBypass(), DefaultICDecoderGenerator::completeNetlist(), DefaultICDecoderGenerator::generate(), ProGe::ProcessorGenerator::generateProcessor(), GenerateProcessor::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 899 of file Machine.cc.

899 {
900 ADFSerializer serializer;
901 serializer.setSourceFile(adfFileName);
902
903 return serializer.readMachine();
904}
TTAMachine::Machine * readMachine()
void setSourceFile(const std::string &fileName)

References ADFSerializer::readMachine(), and XMLSerializer::setSourceFile().

Referenced by MinimalOpSetCheck::buildMinimalOpSet(), Evaluate::createConfig(), MinimalOpSet::createConfig(), llvm::LLVMTCEPOMBuilder::doInitialization(), ADFCombiner::explore(), ComponentAdder::explore(), ImplementationSelector::explore(), MinimalOpSetCheck::fix(), initializeMachine(), 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 TTAMachine::NullMachine, and UniversalMachine.

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
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 }
810 }
811
812 } catch (const Exception& e) {
813 if (toAdd != NULL) {
814 delete toAdd;
815 }
816 throw ObjectStateLoadingException(__FILE__, __LINE__, procName,
817 e.errorMessage());
818 }
819
820 // load states of each component
821 try {
822 for (int i = 0; i < state->childCount(); i++) {
823 ObjectState* child = state->child(i);
824 string name = child->stringAttribute(Component::OSKEY_NAME);
825 if (child->name() == Bus::OSNAME_BUS) {
826 BusNavigator busNav = busNavigator();
827 Bus* bus = busNav.item(name);
828 bus->loadState(child);
829 } else if (child->name() == Socket::OSNAME_SOCKET) {
830 SocketNavigator socketNav = socketNavigator();
831 Socket* socket = socketNav.item(name);
832 socket->loadState(child);
833 } else if (child->name() == Bridge::OSNAME_BRIDGE) {
834 BridgeNavigator bridgeNav = bridgeNavigator();
835 Bridge* bridge = bridgeNav.item(name);
836 bridge->loadState(child);
837 } else if (child->name() == RegisterFile::OSNAME_REGISTER_FILE) {
839 RegisterFile* rf = rfNav.item(name);
840 rf->loadState(child);
841 } else if (child->name() == FunctionUnit::OSNAME_FU) {
843 FunctionUnit* fu = fuNav.item(name);
844 fu->loadState(child);
845 } else if (child->name() ==
848 ImmediateUnit* iu = iuNav.item(name);
849 iu->loadState(child);
850 } else if (child->name() ==
852 ControlUnit* cu = controlUnit();
853 cu->loadState(child);
854 } else if (child->name() ==
856 // instruction template loads its state completely
857 new InstructionTemplate(child, *this);
858 } else if (
860 new OperationTriggeredFormat(child, *this);
861 }
862 }
863 } catch (const Exception& e) {
864 throw ObjectStateLoadingException(__FILE__, __LINE__, procName,
865 e.errorMessage());
866 }
867
868 // create an empty instruction template if there is no instruction
869 // templates
871 if (itNav.count() == 0) {
872 new InstructionTemplate(EMPTY_ITEMP_NAME_, *this);
873 }
874}
std::string errorMessage() const
Definition Exception.cc:123
bool hasAttribute(const std::string &name) const
ObjectState * child(int index) const
std::string stringAttribute(const std::string &name) const
bool boolAttribute(const std::string &name) const
std::string name() const
int childCount() const
static const std::string OSNAME_ADDRESS_SPACE
ObjectState name for AddressSpace.
static const std::string OSNAME_BRIDGE
ObjectState name for bridge.
Definition Bridge.hh:70
static const std::string OSNAME_BUS
ObjectState name for Bus ObjectState.
Definition Bus.hh:116
static const std::string OSKEY_NAME
ObjectState attribute key for the name of the component.
static const std::string OSNAME_CONTROL_UNIT
ObjectState name for ControlUnit.
static const std::string OSNAME_FU
ObjectState name for function unit.
static const std::string OSNAME_IMMEDIATE_SLOT
ObjectState name for ImmediateSlot.
static const std::string OSNAME_IMMEDIATE_UNIT
ObjectState name for ImmediateUnit.
static const std::string OSNAME_INSTRUCTION_TEMPLATE
ObjectState name for instruction template.
void setLittleEndian(bool flag)
Definition Machine.hh:259
virtual RegisterFileNavigator registerFileNavigator() const
Definition Machine.cc:450
virtual BridgeNavigator bridgeNavigator() const
Definition Machine.cc:404
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition Machine.cc:428
virtual SocketNavigator socketNavigator() const
Definition Machine.cc:368
void setTriggerInvalidatesResults(bool)
Definition Machine.cc:987
Navigator< RegisterFile > RegisterFileNavigator
Navigator type for RegisterFileNavigator.
Definition Machine.hh:227
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition Machine.cc:416
static const std::string OSKEY_ALWAYS_WRITE_BACK_RESULTS
ObjectState attribute key for always-write-back-results.
Definition Machine.hh:251
Navigator< Socket > SocketNavigator
Navigator type for SocketNavigator.
Definition Machine.hh:215
virtual void addBus(Bus &bus)
Definition Machine.cc:139
void set64bits(bool flag)
Definition Machine.hh:261
static const std::string OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS
ObjectState attribute key for trigger-invalidates-old-results.
Definition Machine.hh:253
virtual void setGlobalControl(ControlUnit &unit)
Definition Machine.cc:317
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
static const std::string OSNAME_MACHINE
ObjectState name for Machine.
Definition Machine.hh:249
void setAlwaysWriteResults(bool)
Definition Machine.cc:979
void setFUOrdered(bool)
Definition Machine.cc:999
virtual void addSocket(Socket &socket)
Definition Machine.cc:157
static const std::string OSNAME_REGISTER_FILE
ObjectState name for RegisterFile.
static const std::string OSNAME_SOCKET
ObjectState name for socket.
Definition Socket.hh:100

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::Bus::loadState(), TTAMachine::ControlUnit::loadState(), TTAMachine::FunctionUnit::loadState(), TTAMachine::ImmediateUnit::loadState(), TTAMachine::RegisterFile::loadState(), TTAMachine::Socket::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 1023 of file Machine.cc.

1023 {
1024 int maxLatency = 0;
1026 for (int i = 0; i < fuNav.count(); i++) {
1027 FunctionUnit* fu = fuNav.item(i);
1028 int fuLatency = fu->maxLatency();
1029 if (fuLatency > maxLatency) {
1030 maxLatency = fuLatency;
1031 }
1032 }
1033 return maxLatency;
1034}

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(), isRISCVMachine(), OTAFormatListDialog::onAddOTAFormat(), OTAFormatListDialog::onOTAFormatName(), OTAFormatListDialog::selectedOTAFormat(), and OTAFormatListDialog::TransferDataToWindow().

◆ 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(), ADFCombiner::addRegisterFiles(), ComponentAdder::addRegisterFiles(), ProGe::NetlistGenerator::addRFToNetlist(), TDGen::analyzeMachineRegisters(), TDGen::analyzeRegisters(), MachineResourceModifier::analyzeRegisters(), UniversalMachine::booleanRegisterFile(), MachineStateBuilder::buildMachineState(), llvm::TCETargetMachine::calculateSupportedImmediates(), RegisterQuantityCheck::canFixIntRegs(), FullyConnectedCheck::check(), FullyConnectedCheck::check(), RFPortCheck::check(), ProgrammabilityValidator::checkBooleanRegister(), IDFValidator::checkRFImplementations(), RemoveUnconnectedComponents::checkRFPorts(), SimulatorFrontend::compareState(), DefaultDecoderGenerator::completeDecoderBlock(), ADFCombiner::connectRegisterFiles(), ADFCombiner::copyGuards(), RegisterQuantityCheck::countIntRegisters(), llvm::LLVMTCEBuilder::createTerminalRegister(), TTAProgram::CodeGenerator::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(), TTAProgram::TPEFProgramFactory::findRegisterFile(), findRegisterFile(), ProGe::RV32MicroCodeGenerator::findRF(), AutoSelectImplementationsDialog::findRFImplementations(), SimulatorFrontend::finishSimulation(), FullyConnectedCheck::fix(), RegisterQuantityCheck::fixIntRegs(), CompiledSimCodeGenerator::generateHeaderAndMainCode(), ProGe::ProGeUI::generateIDF(), getRegisterFile(), MachineEditPartFactory::getUnits(), DefaultDecoderGenerator::glockPortWidth(), ProcessorImplementationWindow::handleSelectRFImplementation(), MachineConnectivityCheck::hasConditionalMoves(), MachineResourceModifier::increaseAllRFsThatDiffersByAmount(), MachineResourceManager::indexResource(), TTAProgram::TPEFResourceUpdater::initCache(), RegisterRenamer::initialize(), AddWatchDialog::initialize(), UniversalMachine::integerRegisterFile(), MachineConnectivityCheck::isConnectedToDifferentlyConnectedRFs(), TTAMachine::RegisterGuard::loadState(), loadState(), CostEstimator::Estimator::longestPath(), MachineAnalysis::MachineAnalysis(), main(), MinimizeMachine::minimizeRegisterFiles(), MachineConnectivityCheck::needRegCopiesDueReadPortConflicts(), MachineInfo::numberOfRegisters(), AddRFFromHDBDialog::onAdd(), BusDialog::onAddRFGuard(), RFDialog::onOK(), AddWatchDialog::onRFChoice(), MachineResourceModifier::percentualRegisterIncrease(), llvm::LLVMTCEIRBuilder::registerFileName(), TTAMachine::NullMachine::registerFileNavigator(), CompiledSimulation::registerFileValue(), CompiledSimController::registerFileValue(), SimulationController::registerFileValue(), ProximRegisterWindow::reinitialize(), IDFValidator::removeUnknownImplementations(), ADFCombiner::renameExtraUnits(), BFRenameLiveRange::renameLiveRange(), RegisterRenamer::renameLiveRange(), RFGuardDialog::selectedRF(), ComponentImplementationSelector::selectRFs(), BFRenameLiveRange::setTerminals(), UniversalMachine::specialRegisterFile(), ConnectionSweeper::sweepBypasses(), ConnectionSweeper::sweepRFs(), MachineConnectivityCheck::tempRegisterFiles(), CostEstimator::Estimator::totalAreaOfRegisterFiles(), CostEstimator::Estimator::totalEnergyOfRegisterFiles(), RFGuardDialog::TransferDataToWindow(), ProximRegisterWindow::update(), ProcessorImplementationWindow::updateImplementationLists(), 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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 477 of file Machine.cc.

477 {
479}
void removeComponent(ContainerType &container, ComponentType &toRemove)

References busses_, and removeComponent().

Referenced by RemoveUnconnectedComponents::checkBuses(), BlocksConnectIC::explore(), VLIWConnectIC::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 TTAMachine::NullMachine, and UniversalMachine.

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 TTAMachine::NullMachine, and UniversalMachine.

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 TTAMachine::NullMachine, and UniversalMachine.

Definition at line 490 of file Machine.cc.

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

References removeComponent(), and sockets_.

Referenced by BlocksConnectIC::explore(), VLIWConnectIC::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) {
512 } else if (iu != NULL) {
514 } else if (rf != NULL) {
516 } else {
517 const string procName = "Machine::removeUnit";
518 throw IllegalParameters(__FILE__, __LINE__, procName);
519 }
520}
virtual void removeFunctionUnit(FunctionUnit &unit)
Definition Machine.cc:530
virtual void removeImmediateUnit(ImmediateUnit &unit)
Definition Machine.cc:542
virtual void removeRegisterFile(RegisterFile &unit)
Definition Machine.cc:554

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 1012 of file Machine.cc.

1012 {
1013 for (int i = 0; i < container.count(); i++) {
1014 Serializable* component = container.item(i);
1015 parent->addChild(component->saveState());
1016 }
1017}
void addChild(ObjectState *child)
virtual ObjectState * saveState() const =0

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}
void setAttribute(const std::string &name, const std::string &value)
virtual ObjectState * saveState() const
static void saveComponentStates(ContainerType &container, ObjectState *parent)
Definition Machine.cc:1012

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 979 of file Machine.cc.

979 {
980 alwaysWriteResults_ = result;
981}

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 999 of file Machine.cc.

999 {
1000 fuOrdered_ = order;
1001}

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 TTAMachine::NullMachine, and UniversalMachine.

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(), UniversalMachine::setGlobalControl(), 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 987 of file Machine.cc.

987 {
989}

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(), 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(), BlocksConnectIC::explore(), VLIWConnectIC::explore(), SimulatorFrontend::finishSimulation(), FullyConnectedCheck::fix(), DefaultICGenerator::generateSocketsAndMuxes(), MachineEditPartFactory::getSockets(), loadState(), CostEstimator::Estimator::longestPath(), BEMValidator::needsSocketCodeTable(), SocketDialog::onOK(), IUPortDialog::onOK(), FUPortDialog::onSocketChoice(), RFPortDialog::onSocketChoice(), SRPortDialog::onSocketChoice(), SimpleICOptimizer::removeAllConnections(), ConnectionSweeper::removeConnection(), MachineResourceModifier::removeNotConnectedSockets(), RemoveUnconnectedComponents::removeUnconnectedFUs(), ProximMachineStateWindow::setUtilizationHighlights(), TTAMachine::NullMachine::socketNavigator(), IUPortDialog::updateSocket(), FUPortDialog::updateSockets(), RFPortDialog::updateSockets(), SRPortDialog::updateSockets(), 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 958 of file Machine.cc.

958 {
960}

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 TTAMachine::NullMachine, and UniversalMachine.

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}
virtual Machine * machine() const
virtual void unsetMachine()

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 907 of file Machine.cc.

907 {
908 ADFSerializer serializer;
909 serializer.setDestinationFile(adfFileName);
910 serializer.writeMachine(*this);
911}
void setDestinationFile(const std::string &fileName)

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 ADFSerializer::convertToMachineFormat(), ADFSerializer::convertToMDFFormat(), 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 ADFSerializer::convertToMachineFormat(), ADFSerializer::convertToMDFFormat(), 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 ADFSerializer::convertToMachineFormat(), ADFSerializer::convertToMDFFormat(), 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 ADFSerializer::convertToMachineFormat(), 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: