OpenASIP  2.0
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)
 
Chunkname () 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. More...
 

Private Attributes

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

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  };

◆ 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  };

Constructor & Destructor Documentation

◆ ResourceElement()

TPEF::ResourceElement::ResourceElement ( )

Constructs empty element.

Definition at line 46 of file ResourceElement.cc.

46  : SectionElement(),
48 
49 }

◆ ~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.

◆ 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:
TPEF::ResourceElement::MRT_OP
@ MRT_OP
Operation operand or function unit register.
Definition: ResourceElement.hh:56
TPEF::ResourceElement::MRT_BUS
@ MRT_BUS
Transport bus.
Definition: ResourceElement.hh:53
TPEF::ResourceElement::UNIVERSAL_RF_MASK
@ UNIVERSAL_RF_MASK
Bit to check if registerfile is real or universal.
Definition: ResourceElement.hh:70
TPEF::SectionElement::SectionElement
SectionElement()
Definition: SectionElement.cc:41
TPEF::ResourceElement::BOOL_RF
@ BOOL_RF
Universal boolean register file.
Definition: ResourceElement.hh:68
TPEF::ResourceElement::MRT_SR
@ MRT_SR
Special register.
Definition: ResourceElement.hh:58
TPEF::ReferenceManager::SafePointer::null
static const SafePointer null
The default SafePointer that is used in null references.
Definition: SafePointer.hh:229
TPEF::ResourceElement::name_
const ReferenceManager::SafePointer * name_
Name.
Definition: ResourceElement.hh:100
TPEF::ResourceElement::ILLEGAL_RF
@ ILLEGAL_RF
Illegal register file.
Definition: ResourceElement.hh:66
TPEF::ResourceElement::MRT_IMM
@ MRT_IMM
Immediate unit.
Definition: ResourceElement.hh:57
TPEF::ResourceElement::INLINE_IMM
@ INLINE_IMM
Inline immediate unit id.
Definition: ResourceElement.hh:72
TPEF::ResourceElement::MRT_NULL
@ MRT_NULL
Illegal undefined machine resource.
Definition: ResourceElement.hh:52
TPEF::ResourceElement::MRT_PORT
@ MRT_PORT
Function unit port.
Definition: ResourceElement.hh:59
TPEF::ResourceElement::id_
HalfWord id_
Unique id number that is used to refer resource.
Definition: ResourceElement.hh:96
TPEF::ResourceElement::MRT_RF
@ MRT_RF
Register file.
Definition: ResourceElement.hh:55
TPEF::ResourceElement::type_
ResourceType type_
Type.
Definition: ResourceElement.hh:98
TPEF::ResourceElement::MRT_UNIT
@ MRT_UNIT
Function unit.
Definition: ResourceElement.hh:54
TPEF::ResourceElement::UNIVERSAL_BUS
@ UNIVERSAL_BUS
Universal bus.
Definition: ResourceElement.hh:64
TPEF::ResourceElement::FP_RF
@ FP_RF
Universal floating point register file.
Definition: ResourceElement.hh:69
TPEF::ResourceElement::INT_RF
@ INT_RF
Universal integer register file.
Definition: ResourceElement.hh:67
TPEF::ResourceElement::info_
Word info_
Additional info.
Definition: ResourceElement.hh:102
TPEF::ResourceElement::UNIVERSAL_FU
@ UNIVERSAL_FU
Universal function unit.
Definition: ResourceElement.hh:65