OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
TTAProgram::DataInstructionAddressDef Class Reference

#include <DataInstructionAddressDef.hh>

Inheritance diagram for TTAProgram::DataInstructionAddressDef:
Inheritance graph
Collaboration diagram for TTAProgram::DataInstructionAddressDef:
Collaboration graph

Public Member Functions

 DataInstructionAddressDef (Address start, int size, InstructionReference &dest, bool littleEndian)
 
virtual ~DataInstructionAddressDef ()
 
virtual bool isInitialized () const
 
virtual bool isAddress () const
 
virtual bool isInstructionAddress () const
 
virtual Address destinationAddress () const
 
DataDefinitioncopy () const
 
- Public Member Functions inherited from TTAProgram::DataDefinition
 DataDefinition (Address start, int size, bool littleEndian, MinimumAddressableUnit *initData=NULL, bool allZeros=false)
 
 DataDefinition (Address start, const std::vector< MinimumAddressableUnit > &initData, bool littleEndian)
 
virtual ~DataDefinition ()
 
virtual Address startAddress () const
 
virtual void setStartAddress (Address start)
 
virtual MinimumAddressableUnit MAU (int index) const
 
virtual int size () const
 
virtual void setDestinationAddress (Address dest)
 
bool isLittleEndian () const
 

Private Attributes

InstructionReference dest_
 Destination instruction of data area. More...
 

Detailed Description

Describes characteristics of a memory area containing an address to an instruction.

Definition at line 48 of file DataInstructionAddressDef.hh.

Constructor & Destructor Documentation

◆ DataInstructionAddressDef()

TTAProgram::DataInstructionAddressDef::DataInstructionAddressDef ( Address  start,
int  size,
InstructionReference dest,
bool  littleEndian 
)

Creates data area definition containing reference to an instruction.

Parameters
startStarting address of definition.
sizeNumber of MAUs that area represents.
destInstruction which is referred by the data definition.

Definition at line 47 of file DataInstructionAddressDef.cc.

48  :
49  DataDefinition(start, size, littleEndian), dest_(dest) {
50 }

◆ ~DataInstructionAddressDef()

TTAProgram::DataInstructionAddressDef::~DataInstructionAddressDef ( )
virtual

Nothing to free.

Definition at line 55 of file DataInstructionAddressDef.cc.

55  {
56 }

Member Function Documentation

◆ copy()

DataDefinition * TTAProgram::DataInstructionAddressDef::copy ( ) const
virtual

Copying of this class is not allowed.

This class can't be copied, because InstructionReferece cannot be copied correctly.

Returns
Throws always an exception.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 107 of file DataInstructionAddressDef.cc.

107  {
108  throw WrongSubclass(
109  __FILE__, __LINE__, __func__,
110  "DataInstructionAddress definition cannot be copied.");
111 }

References __func__.

◆ destinationAddress()

Address TTAProgram::DataInstructionAddressDef::destinationAddress ( ) const
virtual

Returns destination address, where to intialization value refers.

Returns
Destination address of initialized data area.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 94 of file DataInstructionAddressDef.cc.

94  {
95  return dest_.instruction().address();
96 }

References TTAProgram::Instruction::address(), dest_, and TTAProgram::InstructionReference::instruction().

Here is the call graph for this function:

◆ isAddress()

bool TTAProgram::DataInstructionAddressDef::isAddress ( ) const
virtual

Returns true, class contains always address reference.

Returns
Always true.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 74 of file DataInstructionAddressDef.cc.

74  {
75  return true;
76 }

◆ isInitialized()

bool TTAProgram::DataInstructionAddressDef::isInitialized ( ) const
virtual

Returns true, class defines always initialized data area.

Returns
Always true.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 64 of file DataInstructionAddressDef.cc.

64  {
65  return true;
66 }

◆ isInstructionAddress()

bool TTAProgram::DataInstructionAddressDef::isInstructionAddress ( ) const
virtual

Returns true if init data of definition contains an instruction address.

Returns
True if init data of definition contains an instruction address.

Reimplemented from TTAProgram::DataDefinition.

Definition at line 84 of file DataInstructionAddressDef.cc.

84  {
85  return true;
86 }

Member Data Documentation

◆ dest_

InstructionReference TTAProgram::DataInstructionAddressDef::dest_
private

Destination instruction of data area.

Definition at line 66 of file DataInstructionAddressDef.hh.

Referenced by destinationAddress().


The documentation for this class was generated from the following files:
TTAProgram::DataDefinition::DataDefinition
DataDefinition(Address start, int size, bool littleEndian, MinimumAddressableUnit *initData=NULL, bool allZeros=false)
Definition: DataDefinition.cc:52
TTAProgram::InstructionReference::instruction
Instruction & instruction() const
Definition: InstructionReference.cc:138
TTAProgram::DataDefinition::size
virtual int size() const
Definition: DataDefinition.cc:211
TTAProgram::DataInstructionAddressDef::dest_
InstructionReference dest_
Destination instruction of data area.
Definition: DataInstructionAddressDef.hh:66
WrongSubclass
Definition: Exception.hh:336
__func__
#define __func__
Definition: Application.hh:67
TTAProgram::Instruction::address
Address address() const
Definition: Instruction.cc:327