bug when no instance in preplacement

This commit is contained in:
Christophe Alexandre 2008-01-07 17:22:51 +00:00
parent 450f8dbd9c
commit 2c032796cc
3 changed files with 11 additions and 2 deletions

View File

@ -1533,7 +1533,8 @@ PPlacement::InitPlaceWithPrePlace()
int numsubrows = CheckCreateRow(tabpreplace, yit, Width);
if (numsubrows > 0)
{
_rows.push_back(new PRow(*this, (double)(yit * ROWHEIGHT), Width, numsubrows, orientation));
PRow* row = new PRow(*this, (double)(yit * ROWHEIGHT), Width, numsubrows, orientation);
_rows.push_back(row);
_rowsYMax[(yit + 1) * ROWHEIGHT] = numrows;
_rowsYMinInv[yit * ROWHEIGHT] = numrows;
++numrows;

View File

@ -160,6 +160,7 @@ class PPlacement {
struct phfig* physfig,
char* filename):
_prePlaceFig(physfig),
_rowZeroOrientation(false),
RowMult(rowmult), BinMult(binmult), NetMult(netmult),
_placeCons(conflg), _ringPlaceCons(ringflg), _iocFile(iocfile), _iocFileName(iocfilename),
_boolPlot(plotflg), _verbose(verbose), _prePlace(preflg), _eqMargin(eqmargin),

View File

@ -206,5 +206,12 @@ double PRow::GetSubRowsCapa() const
ostream& PRow::Print(ostream& os) const
{
return os << "PRow: " << GetMinX() << ',' << GetMinY() << " : " << GetMaxX() << ',' << GetMaxY();
string orientation;
if (_orientation) {
orientation = "ON";
} else {
orientation = "OFF";
}
return os << "PRow: " << GetMinX() << ',' << GetMinY() <<
" : " << GetMaxX() << ',' << GetMaxY() << "," << orientation;
}