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

#include <NullMachine.hh>

Inheritance diagram for TTAMachine::NullMachine:
Inheritance graph
Collaboration diagram for TTAMachine::NullMachine:
Collaboration graph

Public Member Functions

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 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 deleteAddressSpace (AddressSpace &as)
 
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 void loadState (const ObjectState *state)
 
virtual ObjectStatesaveState () const
 
- Public Member Functions inherited from TTAMachine::Machine
 Machine ()
 
 Machine (const Machine &old)
 
virtual ~Machine ()
 
virtual bool isUniversalMachine () const
 
void addUnit (Unit &unit)
 
virtual void addOperationTriggeredFormat (OperationTriggeredFormat &format)
 
virtual void addImmediateSlot (ImmediateSlot &slot)
 
virtual void deleteOperationTriggeredFormat (OperationTriggeredFormat &format)
 
virtual void deleteImmediateSlot (ImmediateSlot &slot)
 
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 copyFromMachine (Machine &machine)
 
void writeToADF (const std::string &adfFileName) const
 
TCEString hash () const
 
bool hasOperation (const TCEString &opName) const
 
bool isRISCVMachine () 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 NullMachineinstance ()
 
- Static Public Member Functions inherited from TTAMachine::Machine
static MachineloadFromADF (const std::string &adfFileName)
 

Private Member Functions

 NullMachine ()
 
virtual ~NullMachine ()
 

Static Private Attributes

static NullMachine machine_
 The only instance of NullMachine. More...
 

Additional Inherited Members

- Public Types inherited from TTAMachine::Machine
enum  Extension { ZERO, SIGN }
 
typedef Navigator< BusBusNavigator
 Navigator type for BusNavigator. More...
 
typedef Navigator< SocketSocketNavigator
 Navigator type for SocketNavigator. More...
 
typedef Navigator< FunctionUnitFunctionUnitNavigator
 Navigator type for FunctionUnitNavigator. More...
 
typedef Navigator< AddressSpaceAddressSpaceNavigator
 Navigator type for AddressSpaceNavigator. More...
 
typedef Navigator< BridgeBridgeNavigator
 Navigator type for BridgeNavigator. More...
 
typedef Navigator< ImmediateUnitImmediateUnitNavigator
 Navigator type for ImmediateUnitNavigator. More...
 
typedef Navigator< InstructionTemplateInstructionTemplateNavigator
 Navigator type for InstructionTemplateNavigator. More...
 
typedef Navigator< RegisterFileRegisterFileNavigator
 Navigator type for RegisterFileNavigator. More...
 
typedef Navigator< ImmediateSlotImmediateSlotNavigator
 Navigator type for ImmediateSlotNavigator. More...
 
typedef Navigator< OperationTriggeredFormatOperationTriggeredFormatNavigator
 Navigator type for OperationTriggeredFormatNavigator. More...
 
- Static Public Attributes inherited from TTAMachine::Machine
static const std::string OSNAME_MACHINE = "machine"
 ObjectState name for Machine. More...
 
static const std::string OSKEY_ALWAYS_WRITE_BACK_RESULTS = "always-write-back"
 ObjectState attribute key for always-write-back-results. More...
 
static const std::string OSKEY_TRIGGER_INVALIDATES_OLD_RESULTS = "trigger-invalidates"
 ObjectState attribute key for trigger-invalidates-old-results. More...
 
static const std::string OSKEY_FUNCTION_UNITS_ORDERED = "fu-ordered"
 ObjectState attribute key for function units ordered in order of their sequential presence in ADF. More...
 

Detailed Description

A singleton class which represents a null machine.

Definition at line 43 of file NullMachine.hh.

Constructor & Destructor Documentation

◆ NullMachine()

TTAMachine::NullMachine::NullMachine ( )
private

The constructor.

Definition at line 43 of file NullMachine.cc.

43  : Machine() {
44 }

◆ ~NullMachine()

TTAMachine::NullMachine::~NullMachine ( )
privatevirtual

The destructor.

Definition at line 50 of file NullMachine.cc.

50  {
51 }

Member Function Documentation

◆ addAddressSpace()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 133 of file NullMachine.cc.

133  {
134  abortWithError("NullMachine::addAddressSpace");
135 }

References abortWithError.

◆ addBridge()

void TTAMachine::NullMachine::addBridge ( Bridge bridge)
virtual

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 143 of file NullMachine.cc.

143  {
144  abortWithError("NullMachine::addBridge");
145 }

References abortWithError.

◆ addBus()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 71 of file NullMachine.cc.

71  {
72  abortWithError("NullMachine::addBus");
73 }

References abortWithError.

◆ addFunctionUnit()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.
IllegalParametersNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 103 of file NullMachine.cc.

103  {
104  abortWithError("NullMachine::addFunctionUnit");
105 }

References abortWithError.

◆ addImmediateUnit()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 113 of file NullMachine.cc.

113  {
114  abortWithError("NullMachine::addImmediateUnit");
115 }

References abortWithError.

◆ addInstructionTemplate()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 153 of file NullMachine.cc.

153  {
154  abortWithError("NullMachine::addInstructionTemplate");
155 }

References abortWithError.

◆ addRegisterFile()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 123 of file NullMachine.cc.

123  {
124  abortWithError("NullMachine::addRegisterFile");
125 }

References abortWithError.

◆ addressSpaceNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 321 of file NullMachine.cc.

321  {
322  abortWithError("NullMachine::addressSpaceNavigator");
324 }

References abortWithError, and TTAMachine::Machine::addressSpaceNavigator().

Here is the call graph for this function:

◆ addSocket()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 81 of file NullMachine.cc.

81  {
82  abortWithError("NullMachine::addSocket");
83 }

References abortWithError.

◆ addUnit()

void TTAMachine::NullMachine::addUnit ( Unit unit)

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.
IllegalParametersNever thrown.

Definition at line 92 of file NullMachine.cc.

92  {
93  abortWithError("NullMachine::addUnit");
94 }

References abortWithError.

◆ bridgeNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 333 of file NullMachine.cc.

333  {
334  abortWithError("NullMachine::bridgeNavigator");
335  return Machine::bridgeNavigator();
336 }

References abortWithError, and TTAMachine::Machine::bridgeNavigator().

Here is the call graph for this function:

◆ busNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 285 of file NullMachine.cc.

285  {
286  abortWithError("NullMachine::busNavigator");
287  return Machine::busNavigator();
288 }

References abortWithError, and TTAMachine::Machine::busNavigator().

Here is the call graph for this function:

◆ controlUnit()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 182 of file NullMachine.cc.

182  {
183  abortWithError("NullMachine::controlUnit");
184  return NULL;
185 }

References abortWithError.

◆ deleteAddressSpace()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 275 of file NullMachine.cc.

275  {
276  abortWithError("NullMachine::deleteAddressSpace");
277 }

References abortWithError.

◆ deleteBridge()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 255 of file NullMachine.cc.

255  {
256  abortWithError("NullMachine::deleteBridge");
257 }

References abortWithError.

◆ deleteInstructionTemplate()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 265 of file NullMachine.cc.

265  {
266  abortWithError("NullMachine::deleteInstructionTemplate");
267 }

References abortWithError.

◆ functionUnitNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 309 of file NullMachine.cc.

309  {
310  abortWithError("NullMachine::functionUnitNavigator");
312 }

References abortWithError, and TTAMachine::Machine::functionUnitNavigator().

Here is the call graph for this function:

◆ immediateUnitNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 345 of file NullMachine.cc.

345  {
346  abortWithError("NullMachine::immediateUnitNavigator");
348 }

References abortWithError, and TTAMachine::Machine::immediateUnitNavigator().

Here is the call graph for this function:

◆ instance()

NullMachine & TTAMachine::NullMachine::instance ( )
static

Returns the only instance of NullMachine class.

Returns
The only instance of NullMachine class.

Definition at line 60 of file NullMachine.cc.

60  {
61  return machine_;
62 }

References machine_.

Referenced by ProximToolbox::machine(), and TTAProgram::NullProgram::targetProcessor().

◆ instructionTemplateNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 357 of file NullMachine.cc.

357  {
358  abortWithError("NullMachine::instructionTemplateNavigator");
360 }

References abortWithError, and TTAMachine::Machine::instructionTemplateNavigator().

Here is the call graph for this function:

◆ loadState()

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

Aborts the program with an error message.

Exceptions
ObjectStateLoadingExceptionNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 381 of file NullMachine.cc.

381  {
382  abortWithError("NullMachine::loadState");
383 }

References abortWithError.

◆ registerFileNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 369 of file NullMachine.cc.

369  {
370  abortWithError("NullMachine::registerFileNavigator");
372 }

References abortWithError, and TTAMachine::Machine::registerFileNavigator().

Here is the call graph for this function:

◆ removeBus()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 194 of file NullMachine.cc.

194  {
195  abortWithError("NullMachine::removeBus");
196 }

References abortWithError.

◆ removeFunctionUnit()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 225 of file NullMachine.cc.

225  {
226  abortWithError("NullMachine::removeFunctionUnit");
227 }

References abortWithError.

◆ removeImmediateUnit()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 235 of file NullMachine.cc.

235  {
236  abortWithError("NullMachine::removeImmediateUnit");
237 }

References abortWithError.

◆ removeRegisterFile()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 245 of file NullMachine.cc.

245  {
246  abortWithError("NullMachine::removeRegisterFile");
247 }

References abortWithError.

◆ removeSocket()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 204 of file NullMachine.cc.

204  {
205  abortWithError("NullMachine::removeSocket");
206 }

References abortWithError.

◆ removeUnit()

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

Aborts the program with an error message.

Exceptions
InstanceNotFoundNever thrown.
IllegalParametersNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 215 of file NullMachine.cc.

215  {
216  abortWithError("NullMachine::removeUnit");
217 }

References abortWithError.

◆ saveState()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 391 of file NullMachine.cc.

391  {
392  abortWithError("NullMachine::saveState");
393  return NULL;
394 }

References abortWithError.

◆ setGlobalControl()

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

Aborts the program with an error message.

Exceptions
ComponentAlreadyExistsNever thrown.

Reimplemented from TTAMachine::Machine.

Definition at line 163 of file NullMachine.cc.

163  {
164  abortWithError("NullMachine::setGlobalControl");
165 }

References abortWithError.

◆ socketNavigator()

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

Aborts the program with an error message.

Returns
Never returns.

Reimplemented from TTAMachine::Machine.

Definition at line 297 of file NullMachine.cc.

297  {
298  abortWithError("NullMachine::socketNavigator");
299  return Machine::socketNavigator();
300 }

References abortWithError, and TTAMachine::Machine::socketNavigator().

Here is the call graph for this function:

◆ unsetGlobalControl()

void TTAMachine::NullMachine::unsetGlobalControl ( )
virtual

Aborts the program with an error message.

Reimplemented from TTAMachine::Machine.

Definition at line 171 of file NullMachine.cc.

171  {
172  abortWithError("NullMachine::unsetGlobalControl");
173 }

References abortWithError.

Member Data Documentation

◆ machine_

NullMachine TTAMachine::NullMachine::machine_
staticprivate

The only instance of NullMachine.

Definition at line 90 of file NullMachine.hh.

Referenced by instance().


The documentation for this class was generated from the following files:
TTAMachine::Machine::Machine
Machine()
Definition: Machine.cc:76
TTAMachine::NullMachine::machine_
static NullMachine machine_
The only instance of NullMachine.
Definition: NullMachine.hh:90
abortWithError
#define abortWithError(message)
Definition: Application.hh:72
TTAMachine::Machine::bridgeNavigator
virtual BridgeNavigator bridgeNavigator() const
Definition: Machine.cc:404
TTAMachine::Machine::immediateUnitNavigator
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition: Machine.cc:416
TTAMachine::Machine::functionUnitNavigator
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition: Machine.cc:380
TTAMachine::Machine::addressSpaceNavigator
virtual AddressSpaceNavigator addressSpaceNavigator() const
Definition: Machine.cc:392
TTAMachine::Machine::socketNavigator
virtual SocketNavigator socketNavigator() const
Definition: Machine.cc:368
TTAMachine::Machine::registerFileNavigator
virtual RegisterFileNavigator registerFileNavigator() const
Definition: Machine.cc:450
TTAMachine::Machine::busNavigator
virtual BusNavigator busNavigator() const
Definition: Machine.cc:356
TTAMachine::Machine::instructionTemplateNavigator
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition: Machine.cc:428