Go to the documentation of this file.
34 #ifndef TTA_MACHINE_HH
35 #define TTA_MACHINE_HH
54 class InstructionTemplate;
62 class OperationTriggeredFormat;
64 template <
typename ComponentType>
67 template <
typename ComponentType>
142 void writeToADF(
const std::string& adfFileName)
const;
152 template <
typename ComponentType>
161 ComponentType*
item(
int index)
const;
162 ComponentType*
item(
const std::string& name)
const;
164 void moveToPosition(
const ComponentType* component,
int position);
185 template <typename ComponentType>
195 ComponentType*
item(
int index)
const;
196 ComponentType*
item(
const std::string& name)
const;
197 bool hasItem(
const std::string& name)
const;
266 template <
typename ContainerType,
typename ComponentType>
267 void addComponent(ContainerType& container, ComponentType& toAdd);
269 template <
typename ContainerType,
typename ComponentType>
272 template <
typename ContainerType,
typename ComponentType>
273 void removeComponent(ContainerType& container, ComponentType& toRemove);
275 template <
typename ContainerType,
typename ComponentType>
276 void deleteComponent(ContainerType& container, ComponentType& toDelete);
278 template <
typename ContainerType>
280 ContainerType& container,
ComponentContainer< FunctionUnit > functionUnits_
Contains all the function units of the machine.
virtual void removeFunctionUnit(FunctionUnit &unit)
int maximumLatency() const
ComponentContainer< Bridge > bridges_
Contains all the bridges of the machine.
ComponentContainer< Socket > sockets_
Contains all the sockets attached to the machine.
bool hasOperation(const TCEString &opName) const
virtual void deleteInstructionTemplate(InstructionTemplate &instrTempl)
virtual void deleteImmediateSlot(ImmediateSlot &slot)
void setBusPosition(const Bus &bus, int newPosition)
bool isRISCVMachine() const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
static const std::string OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS
ObjectState attribute key for trigger-invalidates-old-results.
virtual bool isUniversalMachine() const
Machine::ComponentContainer< ComponentType >::const_iterator const_iterator
static const std::string OSNAME_MACHINE
ObjectState name for Machine.
void set64bits(bool flag)
virtual void removeBus(Bus &bus)
void addComponent(ComponentType *component)
bool triggerInvalidatesResults_
virtual void addOperationTriggeredFormat(OperationTriggeredFormat &format)
virtual void unsetGlobalControl()
bool triggerInvalidatesResults() const
ComponentType * item(int index) const
void removeComponent(ComponentType *component)
virtual void addInstructionTemplate(InstructionTemplate &instrTempl)
ComponentContainer< InstructionTemplate > instructionTemplates_
Contains all the instruction templates of the machine.
virtual void loadState(const ObjectState *state)
virtual void addImmediateUnit(ImmediateUnit &unit)
static const std::string OSKEY_ALWAYS_WRITE_BACK_RESULTS
ObjectState attribute key for always-write-back-results.
bool isLittleEndian() const
virtual void deleteAddressSpace(AddressSpace &as)
virtual void removeUnit(Unit &unit)
bool alwaysWriteResults() const
ComponentTable::const_iterator const_iterator
virtual OperationTriggeredFormatNavigator operationTriggeredFormatNavigator() const
virtual void addRegisterFile(RegisterFile &unit)
static const std::string OSKEY_FUNCTION_UNITS_ORDERED
ObjectState attribute key for function units ordered in order of their sequential presence in ADF.
ComponentContainer< ImmediateUnit > immediateUnits_
Contains all the immediate units of the machine.
virtual ControlUnit * controlUnit() const
void addRegisteredComponent(ContainerType &container, ComponentType &toAdd)
virtual BridgeNavigator bridgeNavigator() const
virtual ImmediateUnitNavigator immediateUnitNavigator() const
MachineTester & machineTester() const
ComponentContainer< RegisterFile > registerFiles_
Contains all the register files of the machine.
virtual FunctionUnitNavigator functionUnitNavigator() const
virtual void removeImmediateUnit(ImmediateUnit &unit)
virtual void deleteBridge(Bridge &bridge)
virtual void addAddressSpace(AddressSpace &as)
virtual void removeRegisterFile(RegisterFile &unit)
virtual ObjectState * saveState() const
bool doValidityChecks_
Tells whether to do validity checks or not.
virtual AddressSpaceNavigator addressSpaceNavigator() const
virtual SocketNavigator socketNavigator() const
ComponentContainer< OperationTriggeredFormat > operationTriggeredFormats_
Contains all the OTA Formats of the machine.
virtual void addBus(Bus &bus)
virtual ImmediateSlotNavigator immediateSlotNavigator() const
void writeToADF(const std::string &adfFileName) const
virtual void setGlobalControl(ControlUnit &unit)
const std::string EMPTY_ITEMP_NAME_
std::vector< ComponentType * > ComponentTable
Table of ComponentType pointers.
virtual void addBridge(Bridge &bridge)
virtual RegisterFileNavigator registerFileNavigator() const
DummyMachineTester * dummyMachineTester_
Dummy machine tester for the machine.
const_iterator begin() const noexcept
void deleteComponent(ContainerType &container, ComponentType &toDelete)
virtual void addFunctionUnit(FunctionUnit &unit)
ComponentTable components_
Contains all the components of the container.
ComponentContainer< AddressSpace > addressSpaces_
Contains all the address spaces of the machine.
virtual void addImmediateSlot(ImmediateSlot &slot)
void setLittleEndian(bool flag)
virtual BusNavigator busNavigator() const
void moveToPosition(const ComponentType *component, int position)
virtual void copyFromMachine(Machine &machine)
MachineTester * machineTester_
Machine tester for the machine.
ComponentContainer< Bus > busses_
Contains all the busses attached to the machine.
virtual void removeSocket(Socket &socket)
void setTriggerInvalidatesResults(bool)
const_iterator end() const noexcept
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
void setAlwaysWriteResults(bool)
ComponentContainer< ImmediateSlot > immediateSlots_
Contains all the immediate slots of the machine.
virtual void addSocket(Socket &socket)
ControlUnit * controlUnit_
Global control unit.
virtual void deleteOperationTriggeredFormat(OperationTriggeredFormat &format)
Machine & operator=(const Machine &)
Assignment not allowed.
static Machine * loadFromADF(const std::string &adfFileName)
static void saveComponentStates(ContainerType &container, ObjectState *parent)