OpenASIP
2.0
|
#include <CollisionMatrix.hh>
Public Member Functions | |
CollisionMatrix (FUReservationTableIndex &reservationTables, std::size_t index) | |
CollisionMatrix (std::size_t width, std::size_t height, bool value) | |
virtual | ~CollisionMatrix () |
virtual bool | isCollision (std::size_t row, std::size_t column) const |
![]() | |
BitMatrix (int width, int height, bool initialValue) | |
BitMatrix (const BitMatrix &another) | |
virtual | ~BitMatrix () |
bool | bitAt (int column, int row) const |
void | setBit (int column, int row, bool value) |
void | setAllToZero () |
void | setAllToOne () |
void | shiftLeft () |
void | orWith (const BitMatrix &another) |
bool | conflictsWith (const BitMatrix &another) const |
int | rowCount () const |
int | columnCount () const |
std::string | toString () const |
std::string | toDotString () const |
bool | operator== (const BitMatrix &other) const |
bool | operator< (const BitMatrix &rightHand) const |
Represents a collision matrix.
Definition at line 49 of file CollisionMatrix.hh.
CollisionMatrix::CollisionMatrix | ( | FUReservationTableIndex & | reservationTables, |
std::size_t | index | ||
) |
Builds a collision matrix out of a set of reservation tables and an index that points to a row in the index.
The first column is included, that is, it is possible to test whether an operation can be issued at the same cycle than other operation. This is useful for the scheduler.
reservationTables | Reservation tables of all operations in the FU. |
index | Index of reservation table we compute the matrix for. |
Definition at line 62 of file CollisionMatrix.cc.
References FUReservationTableIndex::at(), BitMatrix::columnCount(), ReservationTable::conflictsWith(), BitMatrix::rowCount(), and BitMatrix::setBit().
CollisionMatrix::CollisionMatrix | ( | std::size_t | width, |
std::size_t | height, | ||
bool | value = false |
||
) |
Constructor.
Builds a collision matrix with given dimensions and with each value the same.
Definition at line 87 of file CollisionMatrix.cc.
|
virtual |
|
virtual |
Returns the value of the collision matrix at the given location.
row | The row number (operation). |
column | The column number (cycle). |
Definition at line 106 of file CollisionMatrix.cc.
References BitMatrix::bitAt().
Referenced by FUFiniteStateAutomaton::resolveState().