OpenASIP
2.0
|
#include <InputFUResource.hh>
Public Member Functions | |
virtual | ~InputFUResource () |
InputFUResource (const std::string &name, int opCount, int nopSlotWeight, unsigned int initiationInterval=0) | |
virtual bool | canAssign (const int cycle, const MoveNode &node) const override |
virtual void | assign (const int cycle, MoveNode &node) override |
virtual bool | isAvailable (const int cycle) const override |
virtual bool | isInUse (const int cycle) const override |
virtual void | unassign (const int cycle, MoveNode &node) override |
virtual bool | canAssign (const int cycle, const MoveNode &node, const InputPSocketResource &pSocket, const bool triggers=false) const |
virtual bool | isInputFUResource () const override |
Public Member Functions inherited from FUResource | |
FUResource (const std::string &name, int operationCount, int nopSlotWeight, unsigned int initiationInterval=0) | |
virtual | ~FUResource () |
virtual bool | operator< (const SchedulingResource &other) const override |
Public Member Functions inherited from SchedulingResource | |
virtual | ~SchedulingResource () |
SchedulingResource (const std::string &name, const unsigned int ii=0) | |
virtual int | relatedResourceGroupCount () const |
virtual int | dependentResourceGroupCount () const |
int | relatedResourceCount (const int group) const |
int | dependentResourceCount (const int group) const |
virtual void | addToRelatedGroup (const int group, SchedulingResource &resource) |
virtual void | addToDependentGroup (const int group, SchedulingResource &resource) |
virtual SchedulingResource & | relatedResource (const int group, const int index) const |
virtual SchedulingResource & | dependentResource (const int group, const int index) const |
virtual bool | hasRelatedResource (const SchedulingResource &sResource) const |
virtual bool | hasDependentResource (const SchedulingResource &sResource) const |
virtual const std::string & | name () const |
virtual int | useCount () const |
virtual void | increaseUseCount () |
virtual void | decreaseUseCount () |
virtual bool | isInputPSocketResource () const |
virtual bool | isOutputPSocketResource () const |
virtual bool | isShortImmPSocketResource () const |
virtual bool | isOutputFUResource () const |
virtual bool | isExecutionPipelineResource () const |
virtual bool | isBusResource () const |
virtual bool | isSegmentResource () const |
virtual bool | isIUResource () const |
virtual bool | isITemplateResource () const |
int | instructionIndex (int cycle) const |
void | setInitiationInterval (unsigned int ii) |
int | initiationInterval () const |
virtual void | clear () |
virtual void | setMaxCycle (unsigned int) |
Protected Member Functions | |
virtual bool | validateDependentGroups () override |
virtual bool | validateRelatedGroups () override |
Private Member Functions | |
InputFUResource (const InputFUResource &) | |
InputFUResource & | operator= (const InputFUResource &) |
Additional Inherited Members | |
Protected Attributes inherited from SchedulingResource | |
int | initiationInterval_ |
An interface for scheduling resources of Resource Model. The derived class InputFUResource.
Definition at line 49 of file InputFUResource.hh.
|
virtual |
InputFUResource::InputFUResource | ( | const std::string & | name, |
int | opCount, | ||
int | nopSlotWeight, | ||
unsigned int | initiationInterval = 0 |
||
) |
Constructor defining name of resource.
name | Name of resource |
Definition at line 52 of file InputFUResource.cc.
|
private |
|
overridevirtual |
Assign resource to given node for given cycle as a side effect, assign also execution pipeline for triggering moves.
cycle | Cycle to assign |
node | MoveNode assigned |
pSocket | InputPSocket used for writting operand |
In | case the assignment is impossible, should have been tested with canAssing first. |
Reimplemented from FUResource.
Definition at line 86 of file InputFUResource.cc.
References abortWithError, ExecutionPipelineResource::assignDestination(), SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), SchedulingResource::increaseUseCount(), and SchedulingResource::isExecutionPipelineResource().
Referenced by InputFUBroker::assign().
|
overridevirtual |
Not to be used, aborts!
Use version with third InputPSocket operand!
Reimplemented from FUResource.
Definition at line 70 of file InputFUResource.cc.
References abortWithError.
Referenced by InputFUBroker::allAvailableResources().
|
virtual |
Return true if resource can be assigned for given node in given cycle.
cycle | Cycle to test |
node | MoveNode to test |
pSocket | InputPSocket used for writting operand |
Internal | error, PSocket is not conencted to FU or ExecutionPipeline |
Definition at line 144 of file InputFUResource.cc.
References __func__, InputPSocketResource::canAssign(), ExecutionPipelineResource::canAssignDestination(), debugLogRM, SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), SchedulingResource::hasDependentResource(), SchedulingResource::isExecutionPipelineResource(), and SchedulingResource::name().
|
overridevirtual |
Test if resource InputFUResource is available.
Not all the PSocket are inUse and there is some operation possible for triggering moves.
cycle | Cycle which to test |
Reimplemented from FUResource.
Definition at line 194 of file InputFUResource.cc.
References SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), FUResource::isAvailable(), SchedulingResource::isAvailable(), and SchedulingResource::isExecutionPipelineResource().
Referenced by InputFUBroker::allAvailableResources().
|
overridevirtual |
Allways return true
Reimplemented from SchedulingResource.
Definition at line 242 of file InputFUResource.cc.
|
overridevirtual |
Test if resource InputFUResource is used in given cycle.
True if some of InputPSockets are already used or there is operation already in execution pipeline.
cycle | Cycle which to test |
Reimplemented from FUResource.
Definition at line 220 of file InputFUResource.cc.
References SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), SchedulingResource::isExecutionPipelineResource(), FUResource::isInUse(), and SchedulingResource::isInUse().
|
private |
|
overridevirtual |
Unassign resource from given node for given cycle, for triggering moves also unassign execution pipeline.
cycle | Cycle to remove assignment from |
node | MoveNode to remove assignment from |
pSocket | InputPSocket used for writting operand |
In | case PSocket is not connected to FU |
Reimplemented from FUResource.
Definition at line 115 of file InputFUResource.cc.
References abortWithError, SchedulingResource::decreaseUseCount(), SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), SchedulingResource::isExecutionPipelineResource(), and ExecutionPipelineResource::unassignDestination().
Referenced by InputFUBroker::unassign().
|
overrideprotectedvirtual |
Tests if all referred resource in dependent groups are of proper types.
Reimplemented from SchedulingResource.
Definition at line 254 of file InputFUResource.cc.
References SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), SchedulingResource::isExecutionPipelineResource(), SchedulingResource::isInputPSocketResource(), and SchedulingResource::isOutputPSocketResource().
|
overrideprotectedvirtual |
Tests if related resource groups are empty.
Reimplemented from SchedulingResource.
Definition at line 274 of file InputFUResource.cc.
References SchedulingResource::relatedResourceCount(), and SchedulingResource::relatedResourceGroupCount().