From 2c032796cc82574d29365b69a69ee22791f30353 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Mon, 7 Jan 2008 17:22:51 +0000 Subject: [PATCH] bug when no instance in preplacement --- alliance/src/ocp/src/placer/PPlacement.cpp | 3 ++- alliance/src/ocp/src/placer/PPlacement.h | 1 + alliance/src/ocp/src/placer/PRow.cpp | 9 ++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/alliance/src/ocp/src/placer/PPlacement.cpp b/alliance/src/ocp/src/placer/PPlacement.cpp index ae6781cb..57ca5554 100644 --- a/alliance/src/ocp/src/placer/PPlacement.cpp +++ b/alliance/src/ocp/src/placer/PPlacement.cpp @@ -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; diff --git a/alliance/src/ocp/src/placer/PPlacement.h b/alliance/src/ocp/src/placer/PPlacement.h index def4892f..f0bf95fb 100644 --- a/alliance/src/ocp/src/placer/PPlacement.h +++ b/alliance/src/ocp/src/placer/PPlacement.h @@ -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), diff --git a/alliance/src/ocp/src/placer/PRow.cpp b/alliance/src/ocp/src/placer/PRow.cpp index c2551924..60a822d5 100644 --- a/alliance/src/ocp/src/placer/PRow.cpp +++ b/alliance/src/ocp/src/placer/PRow.cpp @@ -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; }