OpenASIP
2.0
|
#include <ITemplateResource.hh>
Public Member Functions | |
virtual | ~ITemplateResource () |
ITemplateResource (TTAMachine::InstructionTemplate &templ, unsigned int initiationInterval=0) | |
virtual bool | isInUse (const int cycle) const override |
virtual bool | isAvailable (const int cycle) const override |
virtual bool | canAssign (const int cycle, const MoveNode &node) const override |
virtual bool | canAssign (const int cycle) const |
virtual void | assign (const int cycle, MoveNode &node) override |
virtual void | assign (const int cycle) |
virtual void | unassign (const int cycle, MoveNode &node) override |
virtual void | unassign (const int cycle) |
virtual bool | isITemplateResource () const override |
void | clear () override |
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 | isInputFUResource () const |
virtual bool | isOutputFUResource () const |
virtual bool | isExecutionPipelineResource () const |
virtual bool | isBusResource () const |
virtual bool | isSegmentResource () const |
virtual bool | isIUResource () const |
int | instructionIndex (int cycle) const |
void | setInitiationInterval (unsigned int ii) |
int | initiationInterval () const |
virtual void | setMaxCycle (unsigned int) |
Protected Member Functions | |
virtual bool | validateDependentGroups () override |
virtual bool | validateRelatedGroups () override |
Private Types | |
typedef std::map< int, int > | ResourceRecordType |
Private Member Functions | |
ITemplateResource (const ITemplateResource &) | |
ITemplateResource & | operator= (const ITemplateResource &) |
Private Attributes | |
ResourceRecordType | resourceRecord_ |
TTAMachine::InstructionTemplate * | template_ |
Additional Inherited Members | |
Protected Attributes inherited from SchedulingResource | |
int | initiationInterval_ |
An interface for scheduling resources of Resource Model The derived class ITemplateResource
Definition at line 51 of file ITemplateResource.hh.
|
private |
Definition at line 76 of file ITemplateResource.hh.
|
virtual |
ITemplateResource::ITemplateResource | ( | TTAMachine::InstructionTemplate & | templ, |
unsigned int | initiationInterval = 0 |
||
) |
|
private |
|
virtual |
Assign instruction template resource to given cycle.
cycle | Cycle to assign. |
Definition at line 97 of file ITemplateResource.cc.
References canAssign(), MapTools::containsKey(), SchedulingResource::instructionIndex(), and resourceRecord_.
|
overridevirtual |
The overridden method should be used instead.
Implements SchedulingResource.
Definition at line 87 of file ITemplateResource.cc.
References abortWithError.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), ITemplateBroker::instruction(), and ITemplateBroker::reselectTemplate().
|
virtual |
Return true if instruction template resource can be assigned on given cycle.
cycle | Cycle to test. |
Definition at line 146 of file ITemplateResource.cc.
References isInUse().
|
overridevirtual |
The overridden method should be used instead.
Implements SchedulingResource.
Definition at line 134 of file ITemplateResource.cc.
References abortWithError.
Referenced by assign().
|
overridevirtual |
Clears bookkeeping of the scheduling resource.
After this call the state of the resource should be identical to a newly-created and initialized resource.
Reimplemented from SchedulingResource.
Definition at line 204 of file ITemplateResource.cc.
References SchedulingResource::clear(), and resourceRecord_.
|
overridevirtual |
Test if instruction tempalte resource is available in given cycle.
cycle | Cycle to test. |
Implements SchedulingResource.
Definition at line 79 of file ITemplateResource.cc.
References isInUse().
|
overridevirtual |
Test if instruction template resource is used in given cycle.
cycle | Cycle to test. |
Implements SchedulingResource.
Definition at line 63 of file ITemplateResource.cc.
References MapTools::containsKey(), SchedulingResource::instructionIndex(), and resourceRecord_.
Referenced by canAssign(), isAvailable(), and unassign().
|
overridevirtual |
Return true always.
Reimplemented from SchedulingResource.
Definition at line 156 of file ITemplateResource.cc.
|
overridevirtual |
Comparison operator.
Favours itemplates with more nop slots.
Reimplemented from SchedulingResource.
Definition at line 215 of file ITemplateResource.cc.
References SchedulingResource::operator<().
|
private |
|
virtual |
Unassign instruction template from given cycle.
cycle | Cycle to remove assignment from. |
Definition at line 123 of file ITemplateResource.cc.
References SchedulingResource::instructionIndex(), isInUse(), and resourceRecord_.
|
overridevirtual |
The overridden method should be used instead.
Implements SchedulingResource.
Definition at line 112 of file ITemplateResource.cc.
References abortWithError.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), and ITemplateBroker::unassignImmediate().
|
overrideprotectedvirtual |
Tests if all referred resources in dependent groups are of proper types.
Reimplemented from SchedulingResource.
Definition at line 168 of file ITemplateResource.cc.
References SchedulingResource::dependentResource(), SchedulingResource::dependentResourceCount(), SchedulingResource::dependentResourceGroupCount(), SchedulingResource::isBusResource(), and SchedulingResource::isIUResource().
|
overrideprotectedvirtual |
Tests if related resource groups are empty.
Reimplemented from SchedulingResource.
Definition at line 187 of file ITemplateResource.cc.
References SchedulingResource::relatedResourceCount(), and SchedulingResource::relatedResourceGroupCount().
|
private |
Definition at line 82 of file ITemplateResource.hh.
Referenced by assign(), clear(), isInUse(), and unassign().
|
private |
Definition at line 83 of file ITemplateResource.hh.