Representation of a task resource requirements. These requirements are specified for each different resource type (or RBType) and used to determine a set of reconfigurable zones (RZs) that could possibly host tasks based on these resource requirements.
More...
#include <resourceRequirements.h>
List of all members.
Public Member Functions |
| | ResourceRequirements (std::map< RBType, int > m, Device *dev) |
| | Class constructor. Infers a unique object identifier.
|
| Device * | getDevicePtr (void) |
| | Get a pointer to the deivce linked to these resource requirements.
|
| std::map< RBType, int > | getPhysicalResources (void) |
| | Get the physical resources needed.
|
| std::vector< RZ > | getRZSet (void) |
| | Get the set of reconfigurable zones that fit the resource requirements.
|
| std::vector< RZ > * | getRZSetPtr (void) |
| | Get the set of reconfigurable zones that fit the resource requirements.
|
| int | getTaskCost (void) const |
| | Computes the cost of these resource requirements based on the cost of each different type of resources (some are scarcer that the others).
|
|
void | findRZs (void) |
| | This function finds RZs in the given device regarding tasks needs in terms of resources.
|
| TailorRZState | createRectangularRZ (RZ *rz) |
| | Create a rectangular reconfigurable zone accomodating the resource requirements.
|
| TailorRZState | tailorRZ (RZ *rz) |
| | This method tailors the RZ passed as parameter to fit current task.
|
| bool | fitsRZ (RZ *rz) |
| | This method tests whether the task fits the RZ or not.
|
| void | addRZToSet (RZ *rz) |
| | Add a reconfigruable zone to the resulting set after some verification.
|
| bool | operator== (const ResourceRequirements &) const |
| | Definition of the == operator.
|
|
bool | operator< (const ResourceRequirements &) const |
| bool | requiresResources (RBType rbtype) const |
| | This method checks if a resource provided by a RZ is needed by the task. It takes care of particular cases such as CLBs to Slice conversion. Kind of like RZHasEnoughResources but with no quantification of the task needs.
|
| int | computeInternalFragmentation (RZ &rz) |
| | Computes the internal fragmentation (difference between the resource provided by the RZ and the resource requirements).
|
| bool | isRZOversized (RZ *rz) |
| | Verify if a reconfigurable zone is oversized compared to the resource requirements used to build it.
|
| void | findStaticResources (RZ &rz) const |
| | This function analyzes the RZ to be added to the set for potential STATIC blocks that cannot be used by other reconfigurable zones.
|
|
void | info (void) const |
| | Displays basic information about the requirements on the standard output.
|
| void | setRZResourceWastage (RZ *rz) |
| | Sets the resource wastage inside the reconfigurable zone (related to the internal fragmentation).
|
Static Public Member Functions |
| static void | setEnableNonRectangularRZ (bool) |
| | Enable/disable the search for non-rectangular reconfigurable zones.
|
| static void | setOversizedRZTrigger (double val) |
| | Set the trigger value for considering a zone as oversized.
|
Detailed Description
Representation of a task resource requirements. These requirements are specified for each different resource type (or RBType) and used to determine a set of reconfigurable zones (RZs) that could possibly host tasks based on these resource requirements.
Constructor & Destructor Documentation
| ResourceRequirements::ResourceRequirements |
( |
std::map< RBType, int > |
m, |
|
|
Device * |
dev | |
|
) |
| | [inline] |
Class constructor. Infers a unique object identifier.
- Parameters:
-
| m | The map representing the resource requirements |
| dev | Pointer to the device that sould be considered |
Member Function Documentation
| void ResourceRequirements::addRZToSet |
( |
RZ * |
rz |
) |
|
Add a reconfigruable zone to the resulting set after some verification.
- Parameters:
-
| rz | The reconfigurable zone to tailor |
| int ResourceRequirements::computeInternalFragmentation |
( |
RZ & |
rz |
) |
|
Computes the internal fragmentation (difference between the resource provided by the RZ and the resource requirements).
- Parameters:
-
| rz | The reconfigurable zone to consider |
- Returns:
- The internal fragmentation
Create a rectangular reconfigurable zone accomodating the resource requirements.
- Parameters:
-
| rz | The reconfigurable zone to tailor |
- Returns:
- EndOfLine if the zone could not be extended because the end of the FPGA has been reached, ColumnNotUsed if a column is not used (hence a similar zone has already been found and added to the set),
LineNotUsed if a whole line is not used (hence a similar zone has already been found and added to the set),
HasSiblings if some items in the reconfigurable zone may be re-arranged to create a new one,
RestrictedColumn if a column could not be used by the zone,
Success if the zone has been found and has no siblings.
| void ResourceRequirements::findStaticResources |
( |
RZ & |
rz |
) |
const |
This function analyzes the RZ to be added to the set for potential STATIC blocks that cannot be used by other reconfigurable zones.
- Parameters:
-
| rz | The reconfigurable zone to consider |
| bool ResourceRequirements::fitsRZ |
( |
RZ * |
rz |
) |
|
This method tests whether the task fits the RZ or not.
- Parameters:
-
| rz | The reconfigurable zone to consider |
- Returns:
- true if the RZ fits the requirements
| Device * ResourceRequirements::getDevicePtr |
( |
void |
|
) |
|
Get a pointer to the deivce linked to these resource requirements.
- Returns:
- Pointer to the device
| map< RBType, int > ResourceRequirements::getPhysicalResources |
( |
void |
|
) |
|
Get the physical resources needed.
- Returns:
- A map indicating for each type of resources the amount needed
| vector< RZ > ResourceRequirements::getRZSet |
( |
void |
|
) |
|
Get the set of reconfigurable zones that fit the resource requirements.
- Returns:
- A vector of reconfigurable zones
| vector< RZ > * ResourceRequirements::getRZSetPtr |
( |
void |
|
) |
|
Get the set of reconfigurable zones that fit the resource requirements.
- Returns:
- A pointer to vector of reconfigurable zones infered
| int ResourceRequirements::getTaskCost |
( |
void |
|
) |
const |
Computes the cost of these resource requirements based on the cost of each different type of resources (some are scarcer that the others).
- Returns:
- The resource requirements cost
| bool ResourceRequirements::isRZOversized |
( |
RZ * |
rz |
) |
|
Verify if a reconfigurable zone is oversized compared to the resource requirements used to build it.
- Parameters:
-
| rz | The reconfigurable zone to consider |
- Returns:
- true if the zone should be considered as oversized
Definition of the == operator.
- Parameters:
-
| res | Resource requirements to be compared to the current ones |
- Returns:
- true if resource requirements are equals
| bool ResourceRequirements::requiresResources |
( |
RBType |
rbtype |
) |
const |
This method checks if a resource provided by a RZ is needed by the task. It takes care of particular cases such as CLBs to Slice conversion. Kind of like RZHasEnoughResources but with no quantification of the task needs.
- Parameters:
-
| rbtype | the type of resources to consider |
- Returns:
- true if the task requires some of rbtype resources
| void ResourceRequirements::setEnableNonRectangularRZ |
( |
bool |
val |
) |
[static] |
Enable/disable the search for non-rectangular reconfigurable zones.
- Parameters:
-
| void ResourceRequirements::setOversizedRZTrigger |
( |
double |
val |
) |
[static] |
Set the trigger value for considering a zone as oversized.
- Parameters:
-
| void ResourceRequirements::setRZResourceWastage |
( |
RZ * |
rz |
) |
|
Sets the resource wastage inside the reconfigurable zone (related to the internal fragmentation).
- Parameters:
-
| rz | Pointer to the RZ to consider |
This method tailors the RZ passed as parameter to fit current task.
- Parameters:
-
| rz | The reconfigurable zone to tailor |
- Returns:
- EndOfLine if the zone could not be extended because the end of the FPGA has been reached, ColumnNotUsed if a column is not used (hence a similar zone has already been found and added to the set),
LineNotUsed if a whole line is not used (hence a similar zone has already been found and added to the set),
HasSiblings if some items in the reconfigurable zone may be re-arranged to create a new one,
RestrictedColumn if a column could not be used by the zone,
Success if the zone has been found and has no siblings.
The documentation for this class was generated from the following files: