OpenASIP  2.0
Public Types | Public Member Functions | Public Attributes | List of all members
RegisterTerm Class Reference

#include <ParserStructs.hh>

Collaboration diagram for RegisterTerm:
Collaboration graph

Public Types

enum  TermType { BUS, FUNCTION_UNIT, INDEX }
 

Public Member Functions

std::string toString () const
 

Public Attributes

TermType type
 Type of terminal that is represented by this object. More...
 
BusTerm busTerm
 The bus term, if type field is BUS. Otherwise not used. More...
 
FUTerm fuTerm
 The fu term, if type field is FUNCTION_UNIT. Otherwise not used. More...
 
IndexTerm indexTerm
 The index term, if type field is INDEX. Otherwise not used. More...
 

Detailed Description

Parsed data of register term

This is used for presenting any type of port or register reference.

Register term can be BusTerm, FUTerm or IndexTerm.

Definition at line 136 of file ParserStructs.hh.

Member Enumeration Documentation

◆ TermType

Register term types.

Enumerator
BUS 

Bus term.

FUNCTION_UNIT 

FU term.

INDEX 

Index term.

Definition at line 142 of file ParserStructs.hh.

142  {
143  BUS, ///< Bus term.
144  FUNCTION_UNIT, ///< FU term.
145  INDEX ///< Index term.
146  };

Member Function Documentation

◆ toString()

std::string RegisterTerm::toString ( ) const
inline

String representation of term for error message generation.

Definition at line 161 of file ParserStructs.hh.

161  {
162 
163  switch (type) {
164  case BUS:
165  return busTerm.toString();
166  break;
167 
168  case FUNCTION_UNIT:
169  return fuTerm.toString();
170  break;
171 
172  case INDEX:
173  return indexTerm.toString();
174  break;
175 
176  default:
177  return "Unknown register term type";
178  }
179  }

References BUS, busTerm, FUNCTION_UNIT, fuTerm, INDEX, indexTerm, BusTerm::toString(), FUTerm::toString(), IndexTerm::toString(), and type.

Referenced by CodeSectionCreator::addMove(), ParserSource::toString(), ParserGuard::toString(), and ParserMove::toString().

Here is the call graph for this function:

Member Data Documentation

◆ busTerm

BusTerm RegisterTerm::busTerm

The bus term, if type field is BUS. Otherwise not used.

Definition at line 152 of file ParserStructs.hh.

Referenced by MachineResourceManager::resourceID(), and toString().

◆ fuTerm

FUTerm RegisterTerm::fuTerm

The fu term, if type field is FUNCTION_UNIT. Otherwise not used.

Definition at line 154 of file ParserStructs.hh.

Referenced by MachineResourceManager::functionUnitPortResource(), MachineResourceManager::resourceID(), and toString().

◆ indexTerm

IndexTerm RegisterTerm::indexTerm

◆ type

TermType RegisterTerm::type

Type of terminal that is represented by this object.

Definition at line 149 of file ParserStructs.hh.

Referenced by MachineResourceManager::resourceID(), and toString().


The documentation for this class was generated from the following file:
IndexTerm::toString
std::string toString() const
Definition: ParserStructs.hh:119
RegisterTerm::busTerm
BusTerm busTerm
The bus term, if type field is BUS. Otherwise not used.
Definition: ParserStructs.hh:152
RegisterTerm::INDEX
@ INDEX
Index term.
Definition: ParserStructs.hh:145
RegisterTerm::type
TermType type
Type of terminal that is represented by this object.
Definition: ParserStructs.hh:149
RegisterTerm::BUS
@ BUS
Bus term.
Definition: ParserStructs.hh:143
RegisterTerm::FUNCTION_UNIT
@ FUNCTION_UNIT
FU term.
Definition: ParserStructs.hh:144
FUTerm::toString
std::string toString() const
Definition: ParserStructs.hh:90
BusTerm::toString
std::string toString() const
Definition: ParserStructs.hh:61
RegisterTerm::indexTerm
IndexTerm indexTerm
The index term, if type field is INDEX. Otherwise not used.
Definition: ParserStructs.hh:156
RegisterTerm::fuTerm
FUTerm fuTerm
The fu term, if type field is FUNCTION_UNIT. Otherwise not used.
Definition: ParserStructs.hh:154