Class Net - Net.h, Net.cc
-
Definition:
-
A Net is a collection of Pins that should be connected. Once a routing
for the net is found the class will contain a collection of Edges that
make up the routing.
-
-
Typedefs:
-
typedef list<EdgeHolder *> EdgeList;
-
typedef EdgeList::iterator EdgeListItr;
-
typedef vector<Pin *> PinVector;
-
typedef PinVector::iterator PinVectorItr;
-
typedef vector<Segment> SegmentVector;
-
typedef SegmentVector::iterator SegmentVectorItr;
-
Included:
-
#include <vector>
-
#include <list>
-
#include <string.h>
-
#include <iostream>
-
#include "Pin.h"
-
#include "Box.h"
-
#include "Segment.h"

PinVector
* pinVect
STL Vector class for holding the pins of the net.
int id
A identifying integer for the net.
char[] name
The alphanumeric name for the net.
EdgeList * edgeList
A list of the edges for the routed net. NOTE: the net must be routed
in order to have a non-empty edge list.
bool permanent
A boolean variable used during rip-up and reroute (R+R). If set,
this net will not be considered for R+R. This variable is initially
unset.
Box * boundingBox
The bounding box of the net. NOTE: this variable is NULL until the
function calculateBoundingBox is called.

-
Net()
-
Default constructor.
-
-
Net(int numPins)
-
Constructor which instiantiates the pinVect list with size "numPins".
The actual pins within the pin vector are set as NULL.
-
-
Net(int numPins,
int netID, char *netName)
-
Constructor which instiantiates the pinVect list with size "numPins".
The actual pins within the pin vector are set as NULL. Also, the
id and the name are set as "netID" and "netName", respectively.
-
-
~Net()
-
Deconstructor. Deallocates the Pin pointers in the pin vector, the
Edge pointers in the edge list as well as the pin vector and the edge list.
-

-
Pin
* getPin(int pinNum)
-
Returns the Pin pointer at the specified index.
-
int getNumPins()
-
Returns the size of the pin vector (pinVect)i.e.
the number of pins in this net.
-
int getID()
-
Returns the id of this net
-
char * getName()
-
Returns the name of this net.
-
PinVector * getPinVector()
-
Returns a pointer to the pin vector, pinVect.
-
EdgeList * getEdgeList()
-
Returns a pointer to the edge list, edgeList.
-
int getNumEdges()
-
Returns the size of the edge list, edgeList, i.e.
the number of edges currently connecting the net.
-
bool isPermanent()
-
Returns the permanancy status of the net stored in permanent.
A 'true' value indictates that the net will NOT be considered for ripup
and reroute; ripup and reroute will possibly reroute nets with a
'false' value.
-
Box
* getBoundingBox()
-
Returns a pointer to the bounding box variable, boundingBox.
If the variable boundingBox is NULL, the function
calls calculateBoundingBox() and
returns that bounding box. Hence this function should never return
NULL, though it may not always return the proper bounding box. To
be insure that the bounding box returned is correct, you should first call
calculateBoundingBox()
and then this function. An incorrect bounding box will be returned
only when the pins of the net are altered.
-
void calculateBoundingBox()
-
Calculates the bounding box of the net and sets the variable boundingBox.
This should be called after every pin insertion/deletion to insure that
the boundingBox variable is correct.
-
SegmentVector *
getUpperLSegments()
-
Returns a vector (of size 2) containing the vertical and horizontal segments
associated with an "upper-L" routing. Returns NULL when the net is
not of size 2 (it makes no sense otherwise).
-
SegmentVector *
getLowerLSegments()
-
Returns a vector (of size 2) containing the vertical and horizontal segments
associated with an "lower-L" routing. Returns NULL when the net is
not of size 2 (it makes no sense otherwise).
-
void setPin(int
pinNum, Pin * thePin)
-
Sets the pin located at position 'pinNum' to the pin specified by 'thePin'
-
void setID(int
newID)
-
Sets id to the specified id, 'newID'.
-
void setName(char
*newName)
-
Sets name to the specified name, 'newName'.
-
void addEdge(bool
horiz, int trackNum, int edgeNum)
-
Adds an edge to the edge list, edgeList.
'horiz' determines the direction of the edge (true = horizontal edge, false
= vertical edge), 'trackNum' and 'edgeNum' specify the location in the
grid graph.
-
void addEdgesBetween(bool
horiz, int trackNum, int start, int end)
-
Adds end - start number of edges to the edge list, edgeList. 'horiz'
determines the direction of the edge (true = horizontal edge, false = vertical
edge), 'trackNum' specifies the track number and 'start' and 'end' specify
the edges which should be added to the list.
-
void removeEdge(bool
horiz, int trackNum, int edgeNum)
-
Removes the edges specified by the passed variables. 'horiz' determines
the direction of the edge (true = horizontal edge, false = vertical edge),
'trackNum' and 'edgeNum' specify the location in the grid graph.
-
void removeAllEdges()
-
Clears the edge list, edgeList ,of all of the edges
it contained, effectively unrouting the net.
-
void removeLastPin()
-
Removes the last pin from the pin vector, pinVect.
-
void printEdges()
-
Debugging function. Prints the edges to cout.
-
void printPins()
-
Debugging function. Prints the pins to cout.
-