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

#include <RFEntry.hh>

Inheritance diagram for HDB::RFEntry:
Inheritance graph
Collaboration diagram for HDB::RFEntry:
Collaboration graph

Public Member Functions

 RFEntry ()
 
virtual ~RFEntry ()
 
virtual bool hasImplementation () const
 
void setImplementation (RFImplementation *implementation)
 
RFImplementationimplementation () const
 
virtual bool hasArchitecture () const
 
void setArchitecture (RFArchitecture *architecture)
 
RFArchitecturearchitecture () const
 
- 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

RFArchitecturearchitecture_
 Architecture of the entry. More...
 
RFImplementationimplementation_
 Implementation of the entry. More...
 

Additional Inherited Members

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

Detailed Description

Represents an RF entry in HDB.

Definition at line 47 of file RFEntry.hh.

Constructor & Destructor Documentation

◆ RFEntry()

HDB::RFEntry::RFEntry ( )

The constructor.

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

Definition at line 50 of file RFEntry.cc.

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

◆ ~RFEntry()

HDB::RFEntry::~RFEntry ( )
virtual

The destructor.

Definition at line 58 of file RFEntry.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()

RFArchitecture & HDB::RFEntry::architecture ( ) const

Returns the architecture of the entry.

Returns
The architecture.
Exceptions
NotAvailableIf the entry doesn't have an architecture.

Definition at line 145 of file RFEntry.cc.

145  {
146  if (!hasArchitecture()) {
147  const string procName = "RFEntry::architecture";
148  throw NotAvailable(__FILE__, __LINE__, procName);
149  }
150 
151  return *architecture_;
152 }

References architecture_, and hasArchitecture().

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), CostDatabase::buildRegisterFiles(), ImplementationTester::canTestRF(), Automagic::checkForSelectableIU(), ProGeTools::checkForSelectableIU(), Automagic::checkForSelectableRF(), ProGeTools::checkForSelectableRF(), ProGe::ProcessorGenerator::checkIULatencies(), RFTestbenchGenerator::generateTestbench(), BlockImplementationDialog::onHDBSelection(), HDBToHtml::rfEntryToHtml(), setArchitecture(), and HDBBrowserWindow::update().

Here is the call graph for this function:

◆ hasArchitecture()

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

◆ hasImplementation()

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

◆ implementation()

RFImplementation & HDB::RFEntry::implementation ( ) const

Returns the implementation of the entry.

Returns
The implementation.
Exceptions
NotAvailableIf there is no implementation.

Definition at line 102 of file RFEntry.cc.

102  {
103  if (!hasImplementation()) {
104  const string procName = "RFEntry::implementation";
105  throw NotAvailable(__FILE__, __LINE__, procName);
106  }
107 
108  return *implementation_;
109 }

References hasImplementation(), and implementation_.

Referenced by ProGe::NetlistGenerator::addBaseRFToNetlist(), ProGe::BlockSourceCopier::copyBaseRFFiles(), HDBEditorModifyCmd::Do(), RFTestbenchGenerator::generateTestbench(), ProGeScriptGenerator::getBlockOrder(), BlockImplementationDialog::onHDBSelection(), HDBToHtml::rfEntryToHtml(), HDBToHtml::rfImplToHtml(), DefaultDecoderGenerator::sacEnabled(), setImplementation(), HDBBrowserWindow::update(), and ImplementationTester::validateRF().

Here is the call graph for this function:

◆ setArchitecture()

void HDB::RFEntry::setArchitecture ( RFArchitecture architecture)

Sets new architecture for the entry.

Deletes the old architecture if one exists.

Parameters
architectureThe new architecture.

Definition at line 130 of file RFEntry.cc.

130  {
131  if (hasArchitecture()) {
132  delete architecture_;
133  }
135 }

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

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

Here is the call graph for this function:

◆ setImplementation()

void HDB::RFEntry::setImplementation ( RFImplementation implementation)

Sets implementation for the entry.

Deletes the old implementation if one exists.

Parameters
implementationThe new implementation.

Definition at line 87 of file RFEntry.cc.

87  {
88  if (hasImplementation()) {
89  delete implementation_;
90  }
92 }

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

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

Here is the call graph for this function:

Member Data Documentation

◆ architecture_

RFArchitecture* HDB::RFEntry::architecture_
private

Architecture of the entry.

Definition at line 62 of file RFEntry.hh.

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

◆ implementation_

RFImplementation* HDB::RFEntry::implementation_
private

Implementation of the entry.

Definition at line 64 of file RFEntry.hh.

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


The documentation for this class was generated from the following files:
HDB::RFEntry::hasImplementation
virtual bool hasImplementation() const
Definition: RFEntry.cc:74
HDB::HDBEntry::HDBEntry
HDBEntry()
Definition: HDBEntry.cc:41
NotAvailable
Definition: Exception.hh:728
HDB::RFEntry::architecture
RFArchitecture & architecture() const
Definition: RFEntry.cc:145
HDB::RFEntry::architecture_
RFArchitecture * architecture_
Architecture of the entry.
Definition: RFEntry.hh:62
HDB::RFEntry::implementation
RFImplementation & implementation() const
Definition: RFEntry.cc:102
HDB::RFEntry::implementation_
RFImplementation * implementation_
Implementation of the entry.
Definition: RFEntry.hh:64
HDB::RFEntry::hasArchitecture
virtual bool hasArchitecture() const
Definition: RFEntry.cc:117