OpenASIP  2.0
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
ShortImmPSocketResource Class Reference

#include <ShortImmPSocketResource.hh>

Inheritance diagram for ShortImmPSocketResource:
Inheritance graph
Collaboration diagram for ShortImmPSocketResource:
Collaboration graph

Public Member Functions

virtual ~ShortImmPSocketResource ()
 
 ShortImmPSocketResource (const std::string &name, int immediateWidth, bool signExtends, unsigned int initiationInterval=0)
 
virtual bool isShortImmPSocketResource () const
 
int immediateWidth () const
 
bool signExtends () const
 
bool zeroExtends () const
 
- Public Member Functions inherited from OutputPSocketResource
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 SchedulingResourcerelatedResource (const int group, const int index) const
 
virtual SchedulingResourcedependentResource (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 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 validateRelatedGroups ()
 
- Protected Member Functions inherited from OutputPSocketResource
virtual bool validateDependentGroups () override
 

Private Member Functions

 ShortImmPSocketResource (const ShortImmPSocketResource &)
 Copying forbidden. More...
 
ShortImmPSocketResourceoperator= (const ShortImmPSocketResource &)
 Assignment forbidden. More...
 

Private Attributes

int immediateWidth_
 Width of immediates carried by the related bus. More...
 
bool signExtends_
 Extension mode of related bus. More...
 

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_
 

Detailed Description

An interface for scheduling resources of Resource Model The derived class ShortImmPSocketResource

Definition at line 43 of file ShortImmPSocketResource.hh.

Constructor & Destructor Documentation

◆ ~ShortImmPSocketResource()

ShortImmPSocketResource::~ShortImmPSocketResource ( )
virtual

Destructor.

Definition at line 50 of file ShortImmPSocketResource.cc.

50 {}

◆ ShortImmPSocketResource() [1/2]

ShortImmPSocketResource::ShortImmPSocketResource ( const std::string &  name,
int  immediateWidth,
bool  signExtends,
unsigned int  initiationInterval = 0 
)

Constructor.

Parameters
nameName of socket.

Definition at line 40 of file ShortImmPSocketResource.cc.

◆ ShortImmPSocketResource() [2/2]

ShortImmPSocketResource::ShortImmPSocketResource ( const ShortImmPSocketResource )
private

Copying forbidden.

Member Function Documentation

◆ immediateWidth()

int ShortImmPSocketResource::immediateWidth ( ) const

Return the width of immediate carried by the related bus.

Returns
The width of immediate carried by the related bus.

Definition at line 68 of file ShortImmPSocketResource.cc.

68  {
69  return immediateWidth_;
70 }

References immediateWidth_.

Referenced by BusBroker::canTransportImmediate().

◆ isShortImmPSocketResource()

bool ShortImmPSocketResource::isShortImmPSocketResource ( ) const
virtual

Return true always.

Returns
True always.

Reimplemented from SchedulingResource.

Definition at line 58 of file ShortImmPSocketResource.cc.

58  {
59  return true;
60 }

◆ operator=()

ShortImmPSocketResource& ShortImmPSocketResource::operator= ( const ShortImmPSocketResource )
private

Assignment forbidden.

◆ signExtends()

bool ShortImmPSocketResource::signExtends ( ) const

Return true if the related bus sign extends.

Returns
True if the related bus sign extends.

Definition at line 78 of file ShortImmPSocketResource.cc.

78  {
79  return signExtends_;
80 }

References signExtends_.

Referenced by BusBroker::canTransportImmediate().

◆ validateRelatedGroups()

bool ShortImmPSocketResource::validateRelatedGroups ( )
protectedvirtual

Tests if all referred resources in related groups are of proper types.

Returns
true If all resources in related groups are bus resources.

Reimplemented from OutputPSocketResource.

Definition at line 99 of file ShortImmPSocketResource.cc.

99  {
100  for (int i = 0; i < relatedResourceGroupCount(); i++) {
101  for (int j = 0; j < relatedResourceCount(i); j++) {
102  if (!relatedResource(i, j).isBusResource()) {
103  return false;
104  }
105  }
106  }
107  return true;
108 }

References SchedulingResource::isBusResource(), SchedulingResource::relatedResource(), SchedulingResource::relatedResourceCount(), and SchedulingResource::relatedResourceGroupCount().

Here is the call graph for this function:

◆ zeroExtends()

bool ShortImmPSocketResource::zeroExtends ( ) const

Return true if the related bus does not sign extend.

Returns
True if the related bus does not sign extend.

Definition at line 88 of file ShortImmPSocketResource.cc.

88  {
89  return !signExtends_;
90 }

References signExtends_.

Member Data Documentation

◆ immediateWidth_

int ShortImmPSocketResource::immediateWidth_
private

Width of immediates carried by the related bus.

Definition at line 68 of file ShortImmPSocketResource.hh.

Referenced by immediateWidth().

◆ signExtends_

bool ShortImmPSocketResource::signExtends_
private

Extension mode of related bus.

Definition at line 70 of file ShortImmPSocketResource.hh.

Referenced by signExtends(), and zeroExtends().


The documentation for this class was generated from the following files:
ShortImmPSocketResource::immediateWidth_
int immediateWidth_
Width of immediates carried by the related bus.
Definition: ShortImmPSocketResource.hh:68
OutputPSocketResource::OutputPSocketResource
OutputPSocketResource(const std::string &name, unsigned int initiationInterval=0)
Definition: OutputPSocketResource.cc:48
ShortImmPSocketResource::signExtends_
bool signExtends_
Extension mode of related bus.
Definition: ShortImmPSocketResource.hh:70
ShortImmPSocketResource::signExtends
bool signExtends() const
Definition: ShortImmPSocketResource.cc:78
SchedulingResource::relatedResource
virtual SchedulingResource & relatedResource(const int group, const int index) const
Definition: SchedulingResource.cc:120
SchedulingResource::isBusResource
virtual bool isBusResource() const
ShortImmPSocketResource::immediateWidth
int immediateWidth() const
Definition: ShortImmPSocketResource.cc:68
SchedulingResource::initiationInterval
int initiationInterval() const
Definition: SchedulingResource.cc:385
SchedulingResource::relatedResourceCount
int relatedResourceCount(const int group) const
SchedulingResource::name
virtual const std::string & name() const
SchedulingResource::relatedResourceGroupCount
virtual int relatedResourceGroupCount() const
Definition: SchedulingResource.cc:61