Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members

parquetfp::Node Class Reference

#include <Node.h>

Collaboration diagram for parquetfp::Node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool calcAllPinsAtCenter (Nets &nets)
 Node (const char *block_name, double block_area, double minAr, double maxAr, int index, bool type)
 Node ()
void addVoltage (int voltage)
int getVoltage ()
bool getType () const
float getIndex (void) const
ORIENT getOrient (void) const
bool isOrientFixed (void) const
double getHeight (void) const
double getWidth (void) const
double getOrigHeight (void) const
double getOrigWidth (void) const
char * getName (void)
double getX (void) const
double getY (void) const
double getslackX (void) const
double getslackY (void) const
double getminAR (void) const
double getmaxAR (void) const
double getArea (void) const
bool isMacro (void) const
void updateMacroInfo (bool isMacro)
itNodePin pinsBegin ()
itNodePin pinsEnd ()
unsigned getDegree () const
void clearPins ()
vector< int >::iterator subBlocksBegin ()
vector< int >::iterator subBlocksEnd ()
unsigned numSubBlocks ()
vector< int > & getSubBlocks ()
void putArea (double area)
void putWidth (double w)
void putHeight (double h)
void putX (double x)
void putY (double y)
void putslackX (double x)
void putslackY (double y)
void addPin (NodePin &pinTemp)
void putOrient (ORIENT newOrient)
void putmaxAR (double newMaxAR)
void putminAR (double newMinAR)
void putIsOrientFixed (bool value)
void addSubBlockIndex (int index)
void changeOrient (ORIENT newOrient, Nets &nets)
void syncOrient (Nets &nets)

Public Attributes

bool allPinsAtCenter
bool needSyncOrient

Private Attributes

string _name
double _area
double _minAr
double _maxAr
double _origWidth
double _origHeight
double _width
double _height
ORIENT _orient
bool _isOrientFixed
double _slackX
double _slackY
int _index
bool _type
bool _isMacro
Point _placement
vector< NodePin_pins
vector< int > _subBlockIndices
int _voltage

Constructor & Destructor Documentation

Node::Node const char *  block_name,
double  block_area,
double  minAr,
double  maxAr,
int  index,
bool  type
 

Definition at line 38 of file Node.cxx.

References _area, _height, _minAr, _name, _origHeight, _origWidth, _placement, _width, parquetfp::N, parquetfp::Point::x, and parquetfp::Point::y.

00040    : _area(block_area),_minAr(minAr),_maxAr(maxAr),_orient(N), 
00041      _isOrientFixed(false),_slackX(0), _slackY(0),_index(index),_type(type),
00042      _isMacro(false),allPinsAtCenter(false),needSyncOrient(true)
00043    {
00044      //strncpy(_name,block_name,199);
00045      //_name[199] = '\0';
00046      _name = block_name;
00047      _placement.x=0;
00048      _placement.y=0;
00049      _width = sqrt(_area*_minAr);   //by default orientation is N
00050      _height = _width/_minAr;
00051      _origWidth = _width;
00052      _origHeight = _height;
00053    }

Node::Node  ) 
 

Definition at line 56 of file Node.cxx.

References _height, _name, _placement, _width, parquetfp::N, parquetfp::Point::x, and parquetfp::Point::y.

00057   : _area(0),_minAr(0),_maxAr(0),_orient(N),_isOrientFixed(false),_slackX(0),
00058     _slackY(0),_index(0),_type(true),_isMacro(false),allPinsAtCenter(false)
00059 {
00060   //strcpy(_name,"");
00061   _name = "";
00062   _placement.x=0;
00063   _placement.y=0;
00064   _height = 0;
00065   _width = 0;
00066 }


Member Function Documentation

void parquetfp::Node::addPin NodePin pinTemp  )  [inline]
 

Definition at line 174 of file Node.h.

References _pins.

Referenced by parquetfp::Nodes::updatePinsInfo().

00175          {_pins.push_back(pinTemp);}

void parquetfp::Node::addSubBlockIndex int  index  )  [inline]
 

Definition at line 184 of file Node.h.

References _subBlockIndices.

Referenced by parquetfp::ClusterDB::cluster1Layer(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), and parquetfp::Nodes::parseNodes().

00185          { _subBlockIndices.push_back(index); }

void parquetfp::Node::addVoltage int  voltage  )  [inline]
 

Definition at line 99 of file Node.h.

References _voltage.

Referenced by parquetfp::Nodes::parseNodes().

00100          { _voltage = voltage;}

bool Node::calcAllPinsAtCenter Nets nets  ) 
 

Definition at line 113 of file Node.cxx.

References _pins, parquetfp::Nets::getNet(), parquetfp::Net::getPin(), parquetfp::pin::getXOffset(), parquetfp::pin::getYOffset(), and parquetfp::itNodePin.

00114 {
00115   itNodePin itP;
00116   bool localAllPinsAtCenter=true;
00117   for(itP = _pins.begin(); itP != _pins.end(); ++itP)
00118     {
00119       pin& netPin = nets.getNet(itP->netIndex).getPin(itP->pinOffset);
00120       if(netPin.getXOffset() != 0 || netPin.getYOffset() != 0)
00121         {
00122           localAllPinsAtCenter = false;
00123           break;
00124         }
00125     }
00126   return(localAllPinsAtCenter);
00127 }

Here is the call graph for this function:

void Node::changeOrient ORIENT  newOrient,
Nets nets
 

Definition at line 68 of file Node.cxx.

References _height, _orient, _pins, _width, parquetfp::pin::changeOrient(), parquetfp::Nets::getNet(), parquetfp::Net::getPin(), and parquetfp::itNodePin.

Referenced by parquetfp::Nodes::changeOrient(), parquetfp::SolveMulti::placeSubBlocks(), parquetfp::DB::updateNodeSlim(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00069 {
00070   if(_orient == newOrient)
00071     return;
00072   
00073   if(_orient%2 != newOrient%2)
00074     {
00075       double tempHeight = _height;
00076       _height = _width;
00077       _width = tempHeight;
00078     }
00079 
00080   //update the pinoffsets of the netlist now
00081   itNodePin itP;
00082   for(itP = _pins.begin(); itP != _pins.end(); ++itP)
00083     {
00084       pin& netPin = nets.getNet(itP->netIndex).getPin(itP->pinOffset);
00085       netPin.changeOrient(newOrient);
00086     }
00087   _orient = newOrient;
00088 
00089 }

Here is the call graph for this function:

void parquetfp::Node::clearPins  )  [inline]
 

Definition at line 147 of file Node.h.

References _pins.

00148          { _pins.clear(); }

double parquetfp::Node::getArea void   )  const [inline]
 

Definition at line 134 of file Node.h.

References _area.

Referenced by parquetfp::ClusterDB::addNetsToNewDB(), parquetfp::ClusterDB::cluster1Layer(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::Annealer::makeIndexSoftBlMove(), and parquetfp::Annealer::makeSoftBlMove().

00135          {return _area;}

unsigned parquetfp::Node::getDegree void   )  const [inline]
 

Definition at line 145 of file Node.h.

References _pins.

Referenced by parquetfp::AnalytSolve::getOptLoc().

00146          { return _pins.size(); }

double parquetfp::Node::getHeight void   )  const [inline]
 

Definition at line 112 of file Node.h.

References _height.

Referenced by parquetfp::DB::evalHPWL(), parquetfp::AnalytSolve::getDesignOptLoc(), parquetfp::AnalytSolve::getOptLoc(), parquetfp::Annealer::makeIndexSoftBlMove(), parquetfp::Annealer::makeSoftBlMove(), parquetfp::DB::plot(), parquetfp::DB::saveCapoNets(), and parquetfp::DB::updateNodeSlim().

00113          {return _height;}

float parquetfp::Node::getIndex void   )  const [inline]
 

Definition at line 106 of file Node.h.

References _index.

Referenced by parquetfp::ClusterDB::cluster1Layer(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), and parquetfp::ClusterDB::getClosestNode().

00107          {return _index;} 

double parquetfp::Node::getmaxAR void   )  const [inline]
 

Definition at line 132 of file Node.h.

References _maxAr.

Referenced by parquetfp::ClusterDB::cluster1Layer(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::Annealer::makeIndexSoftBlMove(), and parquetfp::Annealer::makeSoftBlMove().

00133          {return _maxAr;}

double parquetfp::Node::getminAR void   )  const [inline]
 

Definition at line 130 of file Node.h.

References _minAr.

Referenced by parquetfp::ClusterDB::cluster1Layer(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::Annealer::makeIndexSoftBlMove(), and parquetfp::Annealer::makeSoftBlMove().

00131          {return _minAr;}

char* parquetfp::Node::getName void   )  [inline]
 

Definition at line 120 of file Node.h.

References _name.

Referenced by parquetfp::ClusterDB::addNetsToNewDB(), parquetfp::ClusterDB::cluster1Layer(), parquetfp::ClusterDB::clusterMultiPhysical(), and parquetfp::DB::DB().

00121          {return const_cast<char*>(_name.c_str());}

ORIENT parquetfp::Node::getOrient void   )  const [inline]
 

Definition at line 108 of file Node.h.

References _orient, and parquetfp::ORIENT.

Referenced by parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::Annealer::makeIndexSoftBlMove(), parquetfp::Annealer::makeMoveOrient(), parquetfp::Annealer::makeMoveSlacksOrient(), parquetfp::Annealer::makeSoftBlMove(), and parquetfp::DB::updateNodeSlim().

00109          {return _orient;}

double parquetfp::Node::getOrigHeight void   )  const [inline]
 

Definition at line 116 of file Node.h.

References _origHeight.

00117          {return _origHeight;}

double parquetfp::Node::getOrigWidth void   )  const [inline]
 

Definition at line 118 of file Node.h.

References _origWidth.

00119          {return _origWidth;}

double parquetfp::Node::getslackX void   )  const [inline]
 

Definition at line 126 of file Node.h.

References _slackX.

00127          {return _slackX;}

double parquetfp::Node::getslackY void   )  const [inline]
 

Definition at line 128 of file Node.h.

References _slackY.

00129          {return _slackY;}

vector<int>& parquetfp::Node::getSubBlocks  )  [inline]
 

Definition at line 156 of file Node.h.

References _subBlockIndices.

00157          { return _subBlockIndices; }

bool parquetfp::Node::getType  )  const [inline]
 

Definition at line 104 of file Node.h.

References _type.

00105          { return _type;}

int parquetfp::Node::getVoltage  )  [inline]
 

Definition at line 101 of file Node.h.

References _voltage.

Referenced by parquetfp::Annealer::makeIslands().

00102         {  return _voltage;}

double parquetfp::Node::getWidth void   )  const [inline]
 

Definition at line 114 of file Node.h.

References _width.

Referenced by parquetfp::DB::evalHPWL(), parquetfp::AnalytSolve::getDesignOptLoc(), parquetfp::AnalytSolve::getOptLoc(), parquetfp::Annealer::makeIndexSoftBlMove(), parquetfp::Annealer::makeSoftBlMove(), parquetfp::DB::plot(), parquetfp::DB::saveCapoNets(), and parquetfp::DB::updateNodeSlim().

00115          {return _width;}

double parquetfp::Node::getX void   )  const [inline]
 

Definition at line 122 of file Node.h.

References _placement, and parquetfp::Point::x.

Referenced by parquetfp::ClusterDB::addNetsToNewDB(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::DB::evalHPWL(), parquetfp::AnalytSolve::getDesignOptLoc(), parquetfp::DB::getOptimalRangeStart(), parquetfp::AnalytSolve::getOptLoc(), parquetfp::DB::plot(), parquetfp::DB::updateNodeSlim(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00123          {return _placement.x;}

double parquetfp::Node::getY void   )  const [inline]
 

Definition at line 124 of file Node.h.

References _placement, and parquetfp::Point::y.

Referenced by parquetfp::ClusterDB::addNetsToNewDB(), parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::DB::evalHPWL(), parquetfp::AnalytSolve::getDesignOptLoc(), parquetfp::DB::getOptimalRangeStart(), parquetfp::AnalytSolve::getOptLoc(), parquetfp::DB::plot(), parquetfp::DB::updateNodeSlim(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00125          {return _placement.y;}

bool parquetfp::Node::isMacro void   )  const [inline]
 

Definition at line 136 of file Node.h.

References _isMacro.

Referenced by parquetfp::ClusterDB::cluster1Layer(), and parquetfp::ClusterDB::clusterMultiPhysical().

00137          {return _isMacro;}

bool parquetfp::Node::isOrientFixed void   )  const [inline]
 

Definition at line 110 of file Node.h.

References _isOrientFixed.

Referenced by parquetfp::ClusterDB::cluster1Layer(), BTreeAreaWireAnnealer::constructor_core(), parquetfp::Annealer::makeMoveOrient(), and parquetfp::Annealer::makeMoveSlacksOrient().

00111         {return _isOrientFixed;}

unsigned parquetfp::Node::numSubBlocks  )  [inline]
 

Definition at line 154 of file Node.h.

References _subBlockIndices.

Referenced by parquetfp::ClusterDB::addNetsToNewDB().

00155          {return _subBlockIndices.size();}

itNodePin parquetfp::Node::pinsBegin  )  [inline]
 

Definition at line 141 of file Node.h.

References _pins, and parquetfp::itNodePin.

Referenced by parquetfp::DB::DB(), parquetfp::ClusterDB::getClosestNode(), and parquetfp::AnalytSolve::getOptLoc().

00142          {return _pins.begin(); }

itNodePin parquetfp::Node::pinsEnd  )  [inline]
 

Definition at line 143 of file Node.h.

References _pins, and parquetfp::itNodePin.

Referenced by parquetfp::DB::DB(), parquetfp::ClusterDB::getClosestNode(), and parquetfp::AnalytSolve::getOptLoc().

00144          {return _pins.end(); }

void parquetfp::Node::putArea double  area  )  [inline]
 

Definition at line 160 of file Node.h.

References _area.

00161          {_area=area;}

void parquetfp::Node::putHeight double  h  )  [inline]
 

Definition at line 164 of file Node.h.

References _height.

Referenced by parquetfp::SolveMulti::placeSubBlocks(), parquetfp::Nodes::updateHW(), parquetfp::DB::updateNodeDimensions(), parquetfp::DB::updateNodeSlim(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00165          {_height=h;}

void parquetfp::Node::putIsOrientFixed bool  value  )  [inline]
 

Definition at line 182 of file Node.h.

References _isOrientFixed.

Referenced by parquetfp::ClusterDB::cluster1Layer().

00183         { _isOrientFixed = value;}

void parquetfp::Node::putmaxAR double  newMaxAR  )  [inline]
 

Definition at line 179 of file Node.h.

References _maxAr.

00179 { _maxAr = newMaxAR; }

void parquetfp::Node::putminAR double  newMinAR  )  [inline]
 

Definition at line 180 of file Node.h.

References _minAr.

00180 { _minAr = newMinAR; }

void parquetfp::Node::putOrient ORIENT  newOrient  )  [inline]
 

Definition at line 177 of file Node.h.

References _orient.

Referenced by parquetfp::ClusterDB::clusterMultiPhysical(), and parquetfp::Nodes::updateOrient().

00178          { _orient = newOrient; }          //else use changeOrient

void parquetfp::Node::putslackX double  x  )  [inline]
 

Definition at line 170 of file Node.h.

References _slackX.

Referenced by parquetfp::DB::updateSlacks().

00171          {_slackX=x;}

void parquetfp::Node::putslackY double  y  )  [inline]
 

Definition at line 172 of file Node.h.

References _slackY.

Referenced by parquetfp::DB::updateSlacks().

00173          {_slackY=y;}

void parquetfp::Node::putWidth double  w  )  [inline]
 

Definition at line 162 of file Node.h.

References _width.

Referenced by parquetfp::SolveMulti::placeSubBlocks(), parquetfp::Nodes::updateHW(), parquetfp::DB::updateNodeDimensions(), parquetfp::DB::updateNodeSlim(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00163          {_width=w;}

void parquetfp::Node::putX double  x  )  [inline]
 

Definition at line 166 of file Node.h.

References _placement, and parquetfp::Point::x.

Referenced by parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::SolveMulti::placeSubBlocks(), parquetfp::DB::updateNodeLocation(), parquetfp::DB::updateNodeSlim(), parquetfp::Nodes::updatePlacement(), parquetfp::DB::updatePlacement(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00167          {_placement.x=x;}

void parquetfp::Node::putY double  y  )  [inline]
 

Definition at line 168 of file Node.h.

References _placement, and parquetfp::Point::y.

Referenced by parquetfp::ClusterDB::clusterMultiPhysical(), parquetfp::DB::DB(), parquetfp::SolveMulti::placeSubBlocks(), parquetfp::DB::updateNodeLocation(), parquetfp::DB::updateNodeSlim(), parquetfp::Nodes::updatePlacement(), parquetfp::DB::updatePlacement(), and parquetfp::SolveMulti::updatePlaceUnCluster().

00169          {_placement.y=y;}

vector<int>::iterator parquetfp::Node::subBlocksBegin  )  [inline]
 

Definition at line 150 of file Node.h.

References _subBlockIndices.

Referenced by parquetfp::ClusterDB::cluster1Layer().

00151          {return _subBlockIndices.begin();}

vector<int>::iterator parquetfp::Node::subBlocksEnd  )  [inline]
 

Definition at line 152 of file Node.h.

References _subBlockIndices.

Referenced by parquetfp::ClusterDB::cluster1Layer().

00153          {return _subBlockIndices.end();}

void Node::syncOrient Nets nets  ) 
 

Definition at line 91 of file Node.cxx.

References _height, _orient, _pins, _width, parquetfp::pin::changeOrient(), parquetfp::Nets::getNet(), parquetfp::Net::getPin(), parquetfp::itNodePin, and needSyncOrient.

00092 {
00093   //update the heights and widths only if not updated earlier in parsePl
00094   if(needSyncOrient)
00095     {
00096      if(int(_orient)%2 == 1)  //needs swap of height and width
00097       {
00098         double tempHeight = _height;
00099         _height = _width;
00100         _width = tempHeight;
00101       }
00102     }
00103     
00104   //update the pinoffsets of the netlist now
00105   itNodePin itP;
00106   for(itP = _pins.begin(); itP != _pins.end(); ++itP)
00107     {
00108       pin& netPin = nets.getNet(itP->netIndex).getPin(itP->pinOffset);
00109       netPin.changeOrient(_orient);
00110     }
00111 }

Here is the call graph for this function:

void parquetfp::Node::updateMacroInfo bool  isMacro  )  [inline]
 

Definition at line 138 of file Node.h.

References _isMacro.

Referenced by parquetfp::ClusterDB::cluster1Layer().

00139          {_isMacro = isMacro;}


Member Data Documentation

double parquetfp::Node::_area [private]
 

Definition at line 71 of file Node.h.

Referenced by getArea(), Node(), and putArea().

double parquetfp::Node::_height [private]
 

Definition at line 77 of file Node.h.

Referenced by changeOrient(), getHeight(), Node(), putHeight(), and syncOrient().

int parquetfp::Node::_index [private]
 

Definition at line 82 of file Node.h.

Referenced by getIndex().

bool parquetfp::Node::_isMacro [private]
 

Definition at line 84 of file Node.h.

Referenced by isMacro(), and updateMacroInfo().

bool parquetfp::Node::_isOrientFixed [private]
 

Definition at line 79 of file Node.h.

Referenced by isOrientFixed(), and putIsOrientFixed().

double parquetfp::Node::_maxAr [private]
 

Definition at line 73 of file Node.h.

Referenced by getmaxAR(), and putmaxAR().

double parquetfp::Node::_minAr [private]
 

Definition at line 72 of file Node.h.

Referenced by getminAR(), Node(), and putminAR().

string parquetfp::Node::_name [private]
 

Definition at line 70 of file Node.h.

Referenced by getName(), and Node().

ORIENT parquetfp::Node::_orient [private]
 

Definition at line 78 of file Node.h.

Referenced by changeOrient(), getOrient(), putOrient(), and syncOrient().

double parquetfp::Node::_origHeight [private]
 

Definition at line 75 of file Node.h.

Referenced by getOrigHeight(), and Node().

double parquetfp::Node::_origWidth [private]
 

Definition at line 74 of file Node.h.

Referenced by getOrigWidth(), and Node().

vector<NodePin> parquetfp::Node::_pins [private]
 

Definition at line 86 of file Node.h.

Referenced by addPin(), calcAllPinsAtCenter(), changeOrient(), clearPins(), getDegree(), pinsBegin(), pinsEnd(), and syncOrient().

Point parquetfp::Node::_placement [private]
 

Definition at line 85 of file Node.h.

Referenced by getX(), getY(), Node(), putX(), and putY().

double parquetfp::Node::_slackX [private]
 

Definition at line 80 of file Node.h.

Referenced by getslackX(), and putslackX().

double parquetfp::Node::_slackY [private]
 

Definition at line 81 of file Node.h.

Referenced by getslackY(), and putslackY().

vector<int> parquetfp::Node::_subBlockIndices [private]
 

Definition at line 87 of file Node.h.

Referenced by addSubBlockIndex(), getSubBlocks(), numSubBlocks(), subBlocksBegin(), and subBlocksEnd().

bool parquetfp::Node::_type [private]
 

Definition at line 83 of file Node.h.

Referenced by getType().

int parquetfp::Node::_voltage [private]
 

Definition at line 88 of file Node.h.

Referenced by addVoltage(), and getVoltage().

double parquetfp::Node::_width [private]
 

Definition at line 76 of file Node.h.

Referenced by changeOrient(), getWidth(), Node(), putWidth(), and syncOrient().

bool parquetfp::Node::allPinsAtCenter
 

Definition at line 91 of file Node.h.

Referenced by parquetfp::DB::evalHPWL().

bool parquetfp::Node::needSyncOrient
 

Definition at line 189 of file Node.h.

Referenced by parquetfp::Nodes::parsePl(), and syncOrient().


The documentation for this class was generated from the following files:
Generated on Mon Apr 25 01:18:06 2005 for Parquete by doxygen 1.3.2