OpenASIP 2.2
Loading...
Searching...
No Matches
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.
 
BusTerm busTerm
 The bus term, if type field is BUS. Otherwise not used.
 
FUTerm fuTerm
 The fu term, if type field is FUNCTION_UNIT. Otherwise not used.
 
IndexTerm indexTerm
 The index term, if type field is INDEX. Otherwise not used.
 

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 };
@ BUS
Bus term.
@ FUNCTION_UNIT
FU term.
@ INDEX
Index term.

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 }
std::string toString() const
std::string toString() const
std::string toString() const
FUTerm fuTerm
The fu term, if type field is FUNCTION_UNIT. Otherwise not used.
IndexTerm indexTerm
The index term, if type field is INDEX. Otherwise not used.
TermType type
Type of terminal that is represented by this object.
BusTerm busTerm
The bus term, if type field is BUS. Otherwise not used.

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 AssemblerParser::definition< ScannerT >::definition(), 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 AssemblerParser::definition< ScannerT >::definition(), 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 AssemblerParser::definition< ScannerT >::definition(), MachineResourceManager::resourceID(), and toString().


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