OpenASIP
2.0
|
#include <PSocketResource.hh>
Public Member Functions | |
virtual | ~PSocketResource () |
PSocketResource (const std::string &name, 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 void | assign (const int cycle, MoveNode &node) override |
virtual void | unassign (const int cycle, MoveNode &node) override |
void | clear () 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 |
virtual bool | isITemplateResource () const |
int | instructionIndex (int cycle) const |
void | setInitiationInterval (unsigned int ii) |
int | initiationInterval () const |
virtual bool | operator< (const SchedulingResource &other) const |
virtual void | setMaxCycle (unsigned int) |
Protected Types | |
typedef std::map< int, std::set< MoveNode * > > | ResourceRecordType |
Protected Attributes | |
ResourceRecordType | resourceRecord_ |
Protected Attributes inherited from SchedulingResource | |
int | initiationInterval_ |
Private Member Functions | |
PSocketResource (const PSocketResource &) | |
PSocketResource & | operator= (const PSocketResource &) |
Additional Inherited Members | |
Protected Member Functions inherited from SchedulingResource | |
virtual bool | validateDependentGroups () |
virtual bool | validateRelatedGroups () |
An interface for scheduling resources of Resource Model.
The derived class PSocketResource represents a combined resource of a FU/RF port and a socket that connects it to a bus.
Definition at line 48 of file PSocketResource.hh.
|
protected |
Definition at line 61 of file PSocketResource.hh.
|
virtual |
PSocketResource::PSocketResource | ( | const std::string & | name, |
unsigned int | initiationInterval = 0 |
||
) |
Constructor defining name of resource
name | Name of resource |
Definition at line 46 of file PSocketResource.cc.
|
private |
|
overridevirtual |
Assign resource to given node for given cycle.
cycle | Cycle to assign |
node | MoveNode to assign |
In | case PSocket can not be assigned |
Implements SchedulingResource.
Reimplemented in OutputPSocketResource.
Definition at line 105 of file PSocketResource.cc.
References SchedulingResource::increaseUseCount(), SchedulingResource::instructionIndex(), and resourceRecord_.
Referenced by OutputPSocketResource::assign().
|
overridevirtual |
Return true if resource can be assigned for given resource in given cycle.
cycle | Cycle to test |
node | MoveNode to test |
Implements SchedulingResource.
Reimplemented in OutputPSocketResource, and InputPSocketResource.
Definition at line 139 of file PSocketResource.cc.
References TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), TTAMachine::Guard::isOpposite(), TTAProgram::Move::isUnconditional(), MoveNode::move(), and resourceRecord_.
|
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 171 of file PSocketResource.cc.
References SchedulingResource::clear(), and resourceRecord_.
Referenced by OutputPSocketResource::clear().
|
overridevirtual |
Test if resource PSocketResource is available
cycle | Cycle which to test |
Implements SchedulingResource.
Reimplemented in OutputPSocketResource.
Definition at line 80 of file PSocketResource.cc.
References SchedulingResource::instructionIndex(), and resourceRecord_.
|
overridevirtual |
Test if resource PSocketResource is used in given cycle
The PSocket is inUse if it is read from or written to at least once.
cycle | Cycle which to test |
Implements SchedulingResource.
Definition at line 64 of file PSocketResource.cc.
References SchedulingResource::instructionIndex(), and resourceRecord_.
Referenced by unassign().
|
private |
|
overridevirtual |
Unassign resource from given node for given cycle.
cycle | Cycle to remove assignment from |
node | MoveNode to remove assignment from |
In | case the PSocket was not assigned before. |
Implements SchedulingResource.
Reimplemented in OutputPSocketResource.
Definition at line 120 of file PSocketResource.cc.
References __func__, SchedulingResource::decreaseUseCount(), SchedulingResource::instructionIndex(), isInUse(), and resourceRecord_.
Referenced by OutputPSocketResource::unassign().
|
protected |
Definition at line 63 of file PSocketResource.hh.
Referenced by assign(), InputPSocketResource::canAssign(), canAssign(), OutputPSocketResource::canAssign(), clear(), isAvailable(), isInUse(), OutputPSocketResource::operator<(), and unassign().