OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
HDB::FUEntry Class Reference

#include <FUEntry.hh>

Inheritance diagram for HDB::FUEntry:
Inheritance graph
Collaboration diagram for HDB::FUEntry:
Collaboration graph

Public Member Functions

 FUEntry ()
 
virtual ~FUEntry ()
 
virtual bool hasImplementation () const
 
FUImplementationimplementation () const
 
void setImplementation (FUImplementation *implementation)
 
virtual bool hasArchitecture () const
 
FUArchitecturearchitecture () const
 
void setArchitecture (FUArchitecture *architecture)
 
- Public Member Functions inherited from HDB::HDBEntry
virtual ~HDBEntry ()
 
bool hasID () const
 
void setID (RowID id)
 
RowID id () const
 
bool hasCostFunction () const
 
CostFunctionPlugincostFunction () const
 
void setCostFunction (CostFunctionPlugin *costFunction)
 
std::string hdbFile () const
 
void setHDBFile (const std::string &file)
 

Private Attributes

FUArchitecturearchitecture_
 Architecture of the entry. More...
 
FUImplementationimplementation_
 Implementation of the entry. More...
 

Additional Inherited Members

- Protected Member Functions inherited from HDB::HDBEntry
 HDBEntry ()
 

Detailed Description

Represents an FU entry in HDB.

Definition at line 49 of file FUEntry.hh.

Constructor & Destructor Documentation

◆ FUEntry()

HDB::FUEntry::FUEntry ( )

The constructor.

Creates an FU entry without ID, implementation, architecture and cost function.

Definition at line 50 of file FUEntry.cc.

50  :
51  HDBEntry(), architecture_(NULL), implementation_(NULL) {
52 }

◆ ~FUEntry()

HDB::FUEntry::~FUEntry ( )
virtual

The destructor.

Definition at line 58 of file FUEntry.cc.

58  {
59  if (hasArchitecture()) {
60  delete architecture_;
61  }
62  if (hasImplementation()) {
63  delete implementation_;
64  }
65 }

References architecture_, hasArchitecture(), hasImplementation(), and implementation_.

Here is the call graph for this function:

Member Function Documentation

◆ architecture()

FUArchitecture & HDB::FUEntry::architecture ( ) const

◆ hasArchitecture()

bool HDB::FUEntry::hasArchitecture ( ) const
virtual

Tells whether the entry contains architecture data.

Returns
True if the entry contains architecture data, otherwise false.

Implements HDB::HDBEntry.

Definition at line 117 of file FUEntry.cc.

117  {
118  return architecture_ != NULL;
119 }

References architecture_.

Referenced by HDB::HDBManager::addFUImplementation(), ProGe::NetlistGenerator::addFUToNetlist(), architecture(), CostDatabase::buildFunctionUnits(), ImplementationTester::canTestFU(), HDBToHtml::fuEntryToHtml(), AddFUImplementationCmd::isEnabled(), ProGe::NetlistGenerator::opcodePortWidth(), setArchitecture(), HDBBrowserWindow::update(), and ~FUEntry().

◆ hasImplementation()

bool HDB::FUEntry::hasImplementation ( ) const
virtual

◆ implementation()

FUImplementation & HDB::FUEntry::implementation ( ) const

◆ setArchitecture()

void HDB::FUEntry::setArchitecture ( FUArchitecture architecture)

Sets architecture of the entry.

Deletes the old architecture if one exists.

Parameters
architectureThe new architecture.

Definition at line 146 of file FUEntry.cc.

146  {
147  if (hasArchitecture()) {
148  delete architecture_;
149  }
151 }

References architecture(), architecture_, and hasArchitecture().

Referenced by HDB::HDBManager::fuByEntryID().

Here is the call graph for this function:

◆ setImplementation()

void HDB::FUEntry::setImplementation ( FUImplementation implementation)

Sets the given implementation for the entry.

Deletes old implementation if one exists.

Parameters
implementationThe implementation.

Definition at line 103 of file FUEntry.cc.

103  {
104  if (hasImplementation()) {
105  delete implementation_;
106  }
108 }

References hasImplementation(), implementation(), and implementation_.

Referenced by AddFUImplementationCmd::Do(), and HDB::HDBManager::fuByEntryID().

Here is the call graph for this function:

Member Data Documentation

◆ architecture_

FUArchitecture* HDB::FUEntry::architecture_
private

Architecture of the entry.

Definition at line 64 of file FUEntry.hh.

Referenced by architecture(), hasArchitecture(), setArchitecture(), and ~FUEntry().

◆ implementation_

FUImplementation* HDB::FUEntry::implementation_
private

Implementation of the entry.

Definition at line 66 of file FUEntry.hh.

Referenced by hasImplementation(), implementation(), setImplementation(), and ~FUEntry().


The documentation for this class was generated from the following files:
HDB::HDBEntry::HDBEntry
HDBEntry()
Definition: HDBEntry.cc:41
NotAvailable
Definition: Exception.hh:728
HDB::FUEntry::architecture_
FUArchitecture * architecture_
Architecture of the entry.
Definition: FUEntry.hh:64
HDB::FUEntry::hasArchitecture
virtual bool hasArchitecture() const
Definition: FUEntry.cc:117
HDB::FUEntry::architecture
FUArchitecture & architecture() const
Definition: FUEntry.cc:129
HDB::FUEntry::hasImplementation
virtual bool hasImplementation() const
Definition: FUEntry.cc:74
HDB::FUEntry::implementation
FUImplementation & implementation() const
Definition: FUEntry.cc:86
HDB::FUEntry::implementation_
FUImplementation * implementation_
Implementation of the entry.
Definition: FUEntry.hh:66