OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FUReservationTableIndex Class Reference

#include <FUReservationTableIndex.hh>

Collaboration diagram for FUReservationTableIndex:
Collaboration graph

Public Member Functions

 FUReservationTableIndex (const TTAMachine::FunctionUnit &functionUnit)
 
virtual ~FUReservationTableIndex ()
 
ReservationTableat (std::size_t operation)
 
std::size_t size () const
 

Private Attributes

std::vector< ReservationTable * > tables_
 Stores all reservation tables.
 

Detailed Description

Represents an index of reservation tables for modeling resource usage of operations in an FU.

Definition at line 47 of file FUReservationTableIndex.hh.

Constructor & Destructor Documentation

◆ FUReservationTableIndex()

FUReservationTableIndex::FUReservationTableIndex ( const TTAMachine::FunctionUnit functionUnit)

Builds reservation tables for all operations in the FU.

Tables are stored in the order returned by FunctionUnit::operation(), the NOP matrix is at index FunctionUnit::operationCount().

Parameters
functionUnitThe FU to build the matrices for.

Definition at line 47 of file FUReservationTableIndex.cc.

48 {
49
50 for (int i = 0; i < functionUnit.operationCount(); ++i) {
51 const TTAMachine::HWOperation& operation =
52 *functionUnit.operation(i);
53 tables_.push_back(new ReservationTable(operation));
54 }
55}
std::vector< ReservationTable * > tables_
Stores all reservation tables.
virtual HWOperation * operation(const std::string &name) const
virtual int operationCount() const

References TTAMachine::FunctionUnit::operation(), TTAMachine::FunctionUnit::operationCount(), and tables_.

Here is the call graph for this function:

◆ ~FUReservationTableIndex()

FUReservationTableIndex::~FUReservationTableIndex ( )
virtual

Destructor.

Definition at line 60 of file FUReservationTableIndex.cc.

60 {
62}
static void deleteAllItems(SequenceType &aSequence)

References SequenceTools::deleteAllItems(), and tables_.

Here is the call graph for this function:

Member Function Documentation

◆ at()

ReservationTable & FUReservationTableIndex::at ( std::size_t  index)

Returns the reservation table at the given index.

Parameters
operationThe index of the reservation table.

Definition at line 70 of file FUReservationTableIndex.cc.

70 {
71 return *tables_.at(index);
72}

References tables_.

Referenced by CollisionMatrix::CollisionMatrix().

◆ size()

std::size_t FUReservationTableIndex::size ( ) const

Returns the count of reservation tables in the index.

Returns
The count of reservation tables in the index.

Definition at line 80 of file FUReservationTableIndex.cc.

80 {
81 return tables_.size();
82}

References tables_.

Member Data Documentation

◆ tables_

std::vector<ReservationTable*> FUReservationTableIndex::tables_
private

Stores all reservation tables.

Definition at line 56 of file FUReservationTableIndex.hh.

Referenced by at(), FUReservationTableIndex(), size(), and ~FUReservationTableIndex().


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