OpenASIP 2.2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
TPEF::ResourceElement Class Reference

#include <ResourceElement.hh>

Inheritance diagram for TPEF::ResourceElement:
Inheritance graph
Collaboration diagram for TPEF::ResourceElement:
Collaboration graph

Public Types

enum  ResourceType {
  MRT_NULL = 0x00 , MRT_BUS = 0x01 , MRT_UNIT = 0x02 , MRT_RF = 0x03 ,
  MRT_OP = 0x04 , MRT_IMM = 0x05 , MRT_SR = 0x06 , MRT_PORT = 0x07
}
 Resource types. More...
 
enum  ReservedResourceIDs {
  UNIVERSAL_BUS = 0x00 , UNIVERSAL_FU = 0x00 , ILLEGAL_RF = 0x00 , INT_RF = 0x80 ,
  BOOL_RF = 0x81 , FP_RF = 0x82 , UNIVERSAL_RF_MASK = 0x80 , INLINE_IMM = 0x00
}
 Resource Id numbers that are reserved for some particular use. More...
 

Public Member Functions

 ResourceElement ()
 
virtual ~ResourceElement ()
 
HalfWord id () const
 
void setId (HalfWord aId)
 
ResourceType type () const
 
void setType (ResourceType aType)
 
Word info () const
 
void setInfo (Word aInfo)
 
Chunk * name () const
 
void setName (ReferenceManager::SafePointer *aName)
 
void setName (Chunk *aName)
 
- Public Member Functions inherited from TPEF::SectionElement
virtual ~SectionElement ()
 
- Public Member Functions inherited from TPEF::SafePointable
virtual ~SafePointable ()
 

Static Public Attributes

static const std::string RETURN_ADDRESS_NAME = "return-address"
 Reserved string of return address special register.
 

Private Attributes

HalfWord id_
 Unique id number that is used to refer resource.
 
ResourceType type_
 Type.
 
const ReferenceManager::SafePointer * name_
 Name.
 
Word info_
 Additional info.
 

Additional Inherited Members

- Protected Member Functions inherited from TPEF::SectionElement
 SectionElement ()
 
- Protected Member Functions inherited from TPEF::SafePointable
 SafePointable ()
 

Detailed Description

Resource table element.

Definition at line 47 of file ResourceElement.hh.

Member Enumeration Documentation

◆ ReservedResourceIDs

Resource Id numbers that are reserved for some particular use.

Enumerator
UNIVERSAL_BUS 

Universal bus.

UNIVERSAL_FU 

Universal function unit.

ILLEGAL_RF 

Illegal register file.

INT_RF 

Universal integer register file.

BOOL_RF 

Universal boolean register file.

FP_RF 

Universal floating point register file.

UNIVERSAL_RF_MASK 

Bit to check if registerfile is real or universal.

INLINE_IMM 

Inline immediate unit id.

Definition at line 63 of file ResourceElement.hh.

63 {
64 UNIVERSAL_BUS = 0x00, ///< Universal bus.
65 UNIVERSAL_FU = 0x00, ///< Universal function unit.
66 ILLEGAL_RF = 0x00, ///< Illegal register file.
67 INT_RF = 0x80, ///< Universal integer register file.
68 BOOL_RF = 0x81, ///< Universal boolean register file.
69 FP_RF = 0x82, ///< Universal floating point register file.
70 UNIVERSAL_RF_MASK = 0x80, ///< Bit to check if registerfile is real or
71 ///< universal.
72 INLINE_IMM = 0x00 ///< Inline immediate unit id.
73 };
@ UNIVERSAL_BUS
Universal bus.
@ UNIVERSAL_FU
Universal function unit.
@ INT_RF
Universal integer register file.
@ UNIVERSAL_RF_MASK
Bit to check if registerfile is real or universal.
@ ILLEGAL_RF
Illegal register file.
@ BOOL_RF
Universal boolean register file.
@ FP_RF
Universal floating point register file.
@ INLINE_IMM
Inline immediate unit id.

◆ ResourceType

Resource types.

Enumerator
MRT_NULL 

Illegal undefined machine resource.

MRT_BUS 

Transport bus.

MRT_UNIT 

Function unit.

MRT_RF 

Register file.

MRT_OP 

Operation operand or function unit register.

MRT_IMM 

Immediate unit.

MRT_SR 

Special register.

MRT_PORT 

Function unit port.

Definition at line 51 of file ResourceElement.hh.

51 {
52 MRT_NULL = 0x00, ///< Illegal undefined machine resource.
53 MRT_BUS = 0x01, ///< Transport bus.
54 MRT_UNIT = 0x02, ///< Function unit.
55 MRT_RF = 0x03, ///< Register file.
56 MRT_OP = 0x04, ///< Operation operand or function unit register.
57 MRT_IMM = 0x05, ///< Immediate unit.
58 MRT_SR = 0x06, ///< Special register.
59 MRT_PORT = 0x07 ///< Function unit port.
60 };
@ MRT_BUS
Transport bus.
@ MRT_IMM
Immediate unit.
@ MRT_SR
Special register.
@ MRT_UNIT
Function unit.
@ MRT_PORT
Function unit port.
@ MRT_NULL
Illegal undefined machine resource.
@ MRT_OP
Operation operand or function unit register.

Constructor & Destructor Documentation

◆ ResourceElement()

TPEF::ResourceElement::ResourceElement ( )

Constructs empty element.

Definition at line 46 of file ResourceElement.cc.

48
49}
static const SafePointer null
The default SafePointer that is used in null references.
Word info_
Additional info.
HalfWord id_
Unique id number that is used to refer resource.
const ReferenceManager::SafePointer * name_
Name.
ResourceType type_
Type.

◆ ~ResourceElement()

TPEF::ResourceElement::~ResourceElement ( )
virtual

Handles destruction element.

Definition at line 54 of file ResourceElement.cc.

54 {
55}

Member Function Documentation

◆ id()

HalfWord TPEF::ResourceElement::id ( ) const

◆ info()

Word TPEF::ResourceElement::info ( ) const

◆ name()

Chunk * TPEF::ResourceElement::name ( ) const

◆ setId()

void TPEF::ResourceElement::setId ( HalfWord  aId)

◆ setInfo()

void TPEF::ResourceElement::setInfo ( Word  aInfo)

◆ setName() [1/2]

void TPEF::ResourceElement::setName ( Chunk *  aName)

◆ setName() [2/2]

void TPEF::ResourceElement::setName ( ReferenceManager::SafePointer *  aName)

◆ setType()

void TPEF::ResourceElement::setType ( ResourceType  aType)

◆ type()

ResourceType TPEF::ResourceElement::type ( ) const

Member Data Documentation

◆ id_

HalfWord TPEF::ResourceElement::id_
private

Unique id number that is used to refer resource.

Definition at line 96 of file ResourceElement.hh.

◆ info_

Word TPEF::ResourceElement::info_
private

Additional info.

Definition at line 102 of file ResourceElement.hh.

◆ name_

const ReferenceManager::SafePointer* TPEF::ResourceElement::name_
private

Name.

Definition at line 100 of file ResourceElement.hh.

◆ RETURN_ADDRESS_NAME

const std::string TPEF::ResourceElement::RETURN_ADDRESS_NAME = "return-address"
static

Reserved string of return address special register.

Definition at line 76 of file ResourceElement.hh.

Referenced by TPEFDisassembler::createDisassemblyElement(), TTAProgram::TPEFProgramFactory::findFunctionUnit(), and TTAProgram::TPEFProgramFactory::findPort().

◆ type_

ResourceType TPEF::ResourceElement::type_
private

Type.

Definition at line 98 of file ResourceElement.hh.


The documentation for this class was generated from the following files: