HAL
hal::NetLayoutJunctionRange Class Reference

#include <net_layout_junction.h>

Collaboration diagram for hal::NetLayoutJunctionRange:
Collaboration graph

Public Member Functions

 NetLayoutJunctionRange (u32 netId_, int first, int last)
 
bool conflict (const NetLayoutJunctionRange &other) const
 
bool contains (int pos) const
 
bool innerPos (int pos) const
 
bool canJoin (const NetLayoutJunctionRange &other) const
 
bool isEntry (int iTestMax) const
 
bool operator== (const NetLayoutJunctionRange &other) const
 
bool operator== (const NetLayoutJunctionWire &wire) const
 
u32 netId () const
 
int first () const
 
void setFirst (int fst)
 
int last () const
 
void setLast (int lst)
 
int length () const
 
int endPosition (int iGetLast) const
 
void expand (const NetLayoutJunctionRange &other)
 
QString toString () const
 

Static Public Member Functions

static NetLayoutJunctionRange entryRange (NetLayoutDirection dir, int ilane, u32 netId)
 

Static Public Attributes

static const int MinInf = -32767
 
static const int MaxInf = 32767
 

Detailed Description

Range including first and last grid point (potentially) on lane used by net id. External nets leading to junction start at MinInf or MaxInf.

Definition at line 105 of file net_layout_junction.h.

Constructor & Destructor Documentation

◆ NetLayoutJunctionRange()

hal::NetLayoutJunctionRange::NetLayoutJunctionRange ( u32  netId_,
int  first,
int  last 
)

Definition at line 827 of file net_layout_junction.cpp.

References first(), and last().

Referenced by entryRange().

Member Function Documentation

◆ canJoin()

bool hal::NetLayoutJunctionRange::canJoin ( const NetLayoutJunctionRange other) const

Checks whether ranges of same net can be joined to bigger range

Parameters
otherRange which might be joined
Returns
true if range can be joined, false otherwise

Definition at line 844 of file net_layout_junction.cpp.

◆ conflict()

bool hal::NetLayoutJunctionRange::conflict ( const NetLayoutJunctionRange other) const

Check whether range instance would overlap with instance from other net

Parameters
otherPossibly conflicting range
Returns
true if nets are different and share at least a common point, false otherwise

Definition at line 865 of file net_layout_junction.cpp.

Referenced by hal::NetLayoutJunctionOccupied::conflict().

◆ contains()

bool hal::NetLayoutJunctionRange::contains ( int  pos) const
inline

Checks whether position is within range including first and last grid point

Parameters
posRelevant coordinate from grid point to check
Returns
true if in range according to condition above, false otherwise

Definition at line 128 of file net_layout_junction.h.

Referenced by hal::NetLayoutJunctionOccupied::canJoin().

◆ endPosition()

int hal::NetLayoutJunctionRange::endPosition ( int  iGetLast) const

Getter for the first or last grid position in range

Parameters
iGetLastget first position if 0, last positon otherwise
Returns
the first or last grid position in range

Definition at line 872 of file net_layout_junction.cpp.

◆ entryRange()

NetLayoutJunctionRange hal::NetLayoutJunctionRange::entryRange ( NetLayoutDirection  dir,
int  ilane,
u32  netId 
)
static

Generate an entry range

Parameters
dirDirection (Left, Right, Up, Down)
ilaneLane index
netIdNet ID
Returns
The range

Definition at line 837 of file net_layout_junction.cpp.

References first(), hal::NetLayoutDirection::index(), last(), MaxInf, MinInf, netId(), and NetLayoutJunctionRange().

◆ expand()

void hal::NetLayoutJunctionRange::expand ( const NetLayoutJunctionRange other)

Expand the range by joining other range

Parameters
otherThe other range

Definition at line 884 of file net_layout_junction.cpp.

◆ first()

int hal::NetLayoutJunctionRange::first ( ) const
inline

Getter for first grid point position in range

Returns
the first grid point position in range

Definition at line 171 of file net_layout_junction.h.

Referenced by entryRange(), and NetLayoutJunctionRange().

◆ innerPos()

bool hal::NetLayoutJunctionRange::innerPos ( int  pos) const
inline

Checks whether position is within range excluding first and last grid point

Parameters
posRelevant coordinate from grid point to check
Returns
true if in range according to condition above, false otherwise

Definition at line 135 of file net_layout_junction.h.

◆ isEntry()

bool hal::NetLayoutJunctionRange::isEntry ( int  iTestMax) const

Checks whether range is entry from external net

Parameters
iTestMaxTest for MinInf if 0, MaxInf otherwise
Returns
true if range is entry from external net

Definition at line 878 of file net_layout_junction.cpp.

References MaxInf, and MinInf.

Referenced by hal::NetLayoutJunctionWire::isEntry().

◆ last()

int hal::NetLayoutJunctionRange::last ( ) const
inline

Getter for last grid point position in range

Returns
the last grid point position in range

Definition at line 183 of file net_layout_junction.h.

Referenced by entryRange(), and NetLayoutJunctionRange().

◆ length()

int hal::NetLayoutJunctionRange::length ( ) const
inline

Getter for the difference between first and last grid point of range

Returns
the differnce between first and last

Definition at line 195 of file net_layout_junction.h.

◆ netId()

u32 hal::NetLayoutJunctionRange::netId ( ) const
inline

Getter for net ID

Returns
the net ID

Definition at line 165 of file net_layout_junction.h.

Referenced by hal::NetLayoutJunctionOccupiedHash::addOrMerge(), hal::NetLayoutJunctionOccupied::canJoin(), and entryRange().

◆ operator==() [1/2]

bool hal::NetLayoutJunctionRange::operator== ( const NetLayoutJunctionRange other) const

Checks whether two ranges are equal

Definition at line 852 of file net_layout_junction.cpp.

◆ operator==() [2/2]

bool hal::NetLayoutJunctionRange::operator== ( const NetLayoutJunctionWire wire) const

Checks whether range from wire is equal with this range

Definition at line 859 of file net_layout_junction.cpp.

References hal::NetLayoutJunctionWire::mRange.

◆ setFirst()

void hal::NetLayoutJunctionRange::setFirst ( int  fst)
inline

Setter for first grid point position in range

Parameters
fstthe new first grid point position in range

Definition at line 177 of file net_layout_junction.h.

◆ setLast()

void hal::NetLayoutJunctionRange::setLast ( int  lst)
inline

Setter for last grid point position in range

Parameters
lstthe new last grid point position in range

Definition at line 189 of file net_layout_junction.h.

◆ toString()

QString hal::NetLayoutJunctionRange::toString ( ) const
inline

Return range parameter as human readable string

Returns
The string

Definition at line 214 of file net_layout_junction.h.

References QString::arg().

Member Data Documentation

◆ MaxInf

const int hal::NetLayoutJunctionRange::MaxInf = 32767
static

Definition at line 112 of file net_layout_junction.h.

Referenced by entryRange(), and isEntry().

◆ MinInf

const int hal::NetLayoutJunctionRange::MinInf = -32767
static

Definition at line 111 of file net_layout_junction.h.

Referenced by entryRange(), and isEntry().


The documentation for this class was generated from the following files: