OpenASIP
2.0
|
#include <OutputPSocketResource.hh>
Public Member Functions | |
virtual | ~OutputPSocketResource () |
OutputPSocketResource (const std::string &name, unsigned int initiationInterval=0) | |
virtual bool | isAvailable (const int cycle) const override |
virtual bool | isOutputPSocketResource () const override |
virtual void | assign (const int cycle, MoveNode &node) override |
virtual void | unassign (const int cycle, MoveNode &node) override |
virtual bool | canAssign (const int cycle, const MoveNode &node) const override |
virtual bool | operator< (const SchedulingResource &other) const override |
void | clear () override |
Public Member Functions inherited from PSocketResource | |
virtual | ~PSocketResource () |
PSocketResource (const std::string &name, unsigned int initiationInterval=0) | |
virtual bool | isInUse (const int cycle) const 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 | 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 void | setMaxCycle (unsigned int) |
Protected Member Functions | |
virtual bool | validateDependentGroups () override |
virtual bool | validateRelatedGroups () override |
Private Member Functions | |
OutputPSocketResource (const OutputPSocketResource &) | |
OutputPSocketResource & | operator= (const OutputPSocketResource &) |
Private Attributes | |
int | activeCycle_ |
std::map< int, std::pair< const TTAMachine::Port *, int > > | storedPorts_ |
Additional Inherited Members | |
Protected Types inherited from PSocketResource | |
typedef std::map< int, std::set< MoveNode * > > | ResourceRecordType |
Protected Attributes inherited from PSocketResource | |
ResourceRecordType | resourceRecord_ |
Protected Attributes inherited from SchedulingResource | |
int | initiationInterval_ |
An interface for scheduling resources of Resource Model The derived class OutputPSocketResource
Definition at line 52 of file OutputPSocketResource.hh.
|
virtual |
OutputPSocketResource::OutputPSocketResource | ( | const std::string & | name, |
unsigned int | initiationInterval = 0 |
||
) |
Constructor.
name | Name of resource. |
Definition at line 48 of file OutputPSocketResource.cc.
|
private |
|
overridevirtual |
Assign resource to given node for given cycle.
cycle | Cycle to assign |
node | MoveNode to assign |
Reimplemented from PSocketResource.
Definition at line 83 of file OutputPSocketResource.cc.
References PSocketResource::assign(), SchedulingResource::instructionIndex(), MoveNode::move(), TTAProgram::Terminal::port(), TTAProgram::Move::source(), and storedPorts_.
|
overridevirtual |
Return true if resource can be assigned for given resource in given cycle.
cycle | Cycle to test |
node | MoveNode to test |
Reimplemented from PSocketResource.
Definition at line 124 of file OutputPSocketResource.cc.
References activeCycle_, TTAProgram::Terminal::equals(), TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), TTAProgram::Terminal::index(), SchedulingResource::instructionIndex(), TTAProgram::Terminal::isFUPort(), TTAProgram::Terminal::isGPR(), TTAProgram::Terminal::isImmediateRegister(), TTAMachine::Guard::isOpposite(), TTAProgram::Move::isUnconditional(), MoveNode::move(), TTAMachine::Port::parentUnit(), TTAProgram::Terminal::port(), PSocketResource::resourceRecord_, TTAProgram::Move::source(), and storedPorts_.
|
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 305 of file OutputPSocketResource.cc.
References PSocketResource::clear(), and storedPorts_.
|
overridevirtual |
Test if resource OutputPSocketResource is available.
cycle | Cycle which to test. |
Reimplemented from PSocketResource.
Definition at line 63 of file OutputPSocketResource.cc.
|
overridevirtual |
Return true always.
Reimplemented from SchedulingResource.
Definition at line 73 of file OutputPSocketResource.cc.
|
overridevirtual |
Comparison operator.
Favours sockets which have less connections.
TODO: precalc/cache these to optimize scheduling time?
Reimplemented from SchedulingResource.
Definition at line 232 of file OutputPSocketResource.cc.
References activeCycle_, SchedulingResource::relatedResource(), SchedulingResource::relatedResourceCount(), and PSocketResource::resourceRecord_.
|
private |
|
overridevirtual |
Unassign resource from given node for given cycle.
cycle | Cycle to remove assignment from |
node | MoveNode to remove assignment from |
Reimplemented from PSocketResource.
Definition at line 103 of file OutputPSocketResource.cc.
References SchedulingResource::instructionIndex(), storedPorts_, and PSocketResource::unassign().
|
overrideprotectedvirtual |
Tests if all referred resources in dependent groups are of proper types.
Reimplemented from SchedulingResource.
Definition at line 194 of file OutputPSocketResource.cc.
References SchedulingResource::dependentResourceCount(), and SchedulingResource::dependentResourceGroupCount().
|
overrideprotectedvirtual |
Tests if all referred resources in related groups are of proper types.
Reimplemented from SchedulingResource.
Reimplemented in ShortImmPSocketResource.
Definition at line 211 of file OutputPSocketResource.cc.
References SchedulingResource::isBusResource(), SchedulingResource::isIUResource(), SchedulingResource::isOutputFUResource(), SchedulingResource::relatedResource(), SchedulingResource::relatedResourceCount(), and SchedulingResource::relatedResourceGroupCount().
|
mutableprivate |
Definition at line 69 of file OutputPSocketResource.hh.
Referenced by canAssign(), and operator<().
|
private |
Definition at line 75 of file OutputPSocketResource.hh.
Referenced by assign(), canAssign(), clear(), and unassign().