OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
ProGe::PortConnectionProperty Class Reference

#include <PortConnectionProperty.hh>

Collaboration diagram for ProGe::PortConnectionProperty:
Collaboration graph

Public Member Functions

 PortConnectionProperty (int port1FirstBit, int port2FirstBit, int width)
 
 PortConnectionProperty (bool inverted)
 
 PortConnectionProperty ()
 
virtual ~PortConnectionProperty ()
 
int width () const
 
bool fullyConnected () const
 
bool inverted () const
 
void setInverted (bool setting)
 
int port1FirstBit () const
 
int port2FirstBit () const
 

Private Attributes

int port1FirstBit_
 The first bit of the first port to connect. More...
 
int port2FirstBit_
 The first bit of the second port to connect. More...
 
int width_
 The width of the connection. More...
 
bool inverted_
 The inversion flag. More...
 

Detailed Description

Holds the properties of an edge of the netlist graph.

Edges represent connections between ports of netlist blocks. A port connection really consists of one or more connections between the bits of two ports.

Multi-bit ports may be connected completely or partially. In the latter case, the connection involves only a subset of the bits of each port at its ends.

Definition at line 51 of file PortConnectionProperty.hh.

Constructor & Destructor Documentation

◆ PortConnectionProperty() [1/3]

ProGe::PortConnectionProperty::PortConnectionProperty ( int  port1FirstBit,
int  port2FirstBit,
int  width 
)

The constructor.

Parameters
port1FirstBitThe first bit of the first port to connect.
port2FirstBitThe first bit of the second port to connect.
widthThe width of the connection.

Definition at line 44 of file PortConnectionProperty.cc.

◆ PortConnectionProperty() [2/3]

ProGe::PortConnectionProperty::PortConnectionProperty ( bool  inverted)

Definition at line 51 of file PortConnectionProperty.cc.

◆ PortConnectionProperty() [3/3]

ProGe::PortConnectionProperty::PortConnectionProperty ( )

The constructor.

This constructor is used when all the bits of the ports are connected.

Parameters
nameName of the connection.

Definition at line 61 of file PortConnectionProperty.cc.

62  : port1FirstBit_(0), port2FirstBit_(0), width_(0), inverted_(false) {}

◆ ~PortConnectionProperty()

ProGe::PortConnectionProperty::~PortConnectionProperty ( )
virtual

The destructor.

Definition at line 67 of file PortConnectionProperty.cc.

67  {
68 }

Member Function Documentation

◆ fullyConnected()

bool ProGe::PortConnectionProperty::fullyConnected ( ) const

Tells whether the ports are fully connected.

Returns
True if the ports are fully connected, otherwise false.

Definition at line 88 of file PortConnectionProperty.cc.

88  {
89  return width() == 0;
90 }

References width().

Here is the call graph for this function:

◆ inverted()

bool ProGe::PortConnectionProperty::inverted ( ) const

Returns true if signal between connected ports are inverted.

Definition at line 96 of file PortConnectionProperty.cc.

96  {
97  return inverted_;
98 }

References inverted_.

◆ port1FirstBit()

int ProGe::PortConnectionProperty::port1FirstBit ( ) const

Returns the lowest bit of the port1 that is connected.

Returns
The lowest connected bit.

Definition at line 116 of file PortConnectionProperty.cc.

116  {
117  return port1FirstBit_;
118 }

References port1FirstBit_.

◆ port2FirstBit()

int ProGe::PortConnectionProperty::port2FirstBit ( ) const

Returns the lowest bit of the port2 that is connected.

Returns
The lowest connected bit.

Definition at line 127 of file PortConnectionProperty.cc.

127  {
128  return port2FirstBit_;
129 }

References port2FirstBit_.

◆ setInverted()

void ProGe::PortConnectionProperty::setInverted ( bool  setting)

Define inversion of connection.

If set to true the signal need to be inverted.

Definition at line 106 of file PortConnectionProperty.cc.

106  {
107  inverted_ = setting;
108 }

References inverted_.

◆ width()

int ProGe::PortConnectionProperty::width ( ) const

Returns the width of the connection.

Returns
The width of the connection.

Definition at line 77 of file PortConnectionProperty.cc.

77  {
78  return width_;
79 }

References width_.

Referenced by fullyConnected().

Member Data Documentation

◆ inverted_

bool ProGe::PortConnectionProperty::inverted_
private

The inversion flag.

Definition at line 77 of file PortConnectionProperty.hh.

Referenced by inverted(), and setInverted().

◆ port1FirstBit_

int ProGe::PortConnectionProperty::port1FirstBit_
private

The first bit of the first port to connect.

Definition at line 71 of file PortConnectionProperty.hh.

Referenced by port1FirstBit().

◆ port2FirstBit_

int ProGe::PortConnectionProperty::port2FirstBit_
private

The first bit of the second port to connect.

Definition at line 73 of file PortConnectionProperty.hh.

Referenced by port2FirstBit().

◆ width_

int ProGe::PortConnectionProperty::width_
private

The width of the connection.

Definition at line 75 of file PortConnectionProperty.hh.

Referenced by width().


The documentation for this class was generated from the following files:
ProGe::PortConnectionProperty::port2FirstBit
int port2FirstBit() const
Definition: PortConnectionProperty.cc:127
ProGe::PortConnectionProperty::port1FirstBit
int port1FirstBit() const
Definition: PortConnectionProperty.cc:116
ProGe::PortConnectionProperty::inverted_
bool inverted_
The inversion flag.
Definition: PortConnectionProperty.hh:77
ProGe::PortConnectionProperty::port2FirstBit_
int port2FirstBit_
The first bit of the second port to connect.
Definition: PortConnectionProperty.hh:73
ProGe::PortConnectionProperty::port1FirstBit_
int port1FirstBit_
The first bit of the first port to connect.
Definition: PortConnectionProperty.hh:71
ProGe::PortConnectionProperty::inverted
bool inverted() const
Definition: PortConnectionProperty.cc:96
ProGe::PortConnectionProperty::width_
int width_
The width of the connection.
Definition: PortConnectionProperty.hh:75
ProGe::PortConnectionProperty::width
int width() const
Definition: PortConnectionProperty.cc:77