OpenASIP  2.0
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. More...
 

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 }

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.

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:
TTAMachine::HWOperation
Definition: HWOperation.hh:52
FUReservationTableIndex::tables_
std::vector< ReservationTable * > tables_
Stores all reservation tables.
Definition: FUReservationTableIndex.hh:56
SequenceTools::deleteAllItems
static void deleteAllItems(SequenceType &aSequence)
TTAMachine::FunctionUnit::operationCount
virtual int operationCount() const
Definition: FunctionUnit.cc:419
ReservationTable
Definition: ReservationTable.hh:49
TTAMachine::FunctionUnit::operation
virtual HWOperation * operation(const std::string &name) const
Definition: FunctionUnit.cc:363