From df8da45edd2beb36f6d6d5eb99980f907a56002e Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Tue, 15 Jul 2008 16:29:10 +0000 Subject: [PATCH] do not export phcons when they were present in the prepplaced phfig --- alliance/src/ocp/src/placer/PCon.cpp | 28 +++++++++++-------- alliance/src/ocp/src/placer/PPlacement.cpp | 9 ++---- .../src/ocp/src/placer/PPlacementFinal.cpp | 20 ++++++------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/alliance/src/ocp/src/placer/PCon.cpp b/alliance/src/ocp/src/placer/PCon.cpp index 010f789e..d3155090 100644 --- a/alliance/src/ocp/src/placer/PCon.cpp +++ b/alliance/src/ocp/src/placer/PCon.cpp @@ -52,9 +52,8 @@ PCon::PCon(const locon* con, PPos pos, char orient) {} void -PCon::Save(struct phfig *physicalfig, const double dx, const double dy) const -{ - if (!_phcon) +PCon::Save(struct phfig *physicalfig, const double dx, const double dy) const { + if (!_phcon) { addphcon(physicalfig , _orient , _con->NAME @@ -62,15 +61,20 @@ PCon::Save(struct phfig *physicalfig, const double dx, const double dy) const , (int)(GetPosY() * PITCH + dy) , _orient==NORTH || _orient == SOUTH ? ALU2 : ALU3 , (_orient==NORTH || _orient == SOUTH ? 2 : 1) * (PITCH/5)); - else - addphcon(physicalfig - , _phcon->ORIENT - , _phcon->NAME - , _phcon->XCON - , _phcon->YCON - , _phcon->LAYER - , _phcon->WIDTH - ); + } else { +#if 0 + addphcon(physicalfig, + _phcon->ORIENT, + _phcon->NAME, + _phcon->XCON, + _phcon->YCON, + _phcon->LAYER, + _phcon->WIDTH); + //modification 15/07/2008 (xtof) + //why should we add the physical connectors + //on the existing phfig ? +#endif + } diff --git a/alliance/src/ocp/src/placer/PPlacement.cpp b/alliance/src/ocp/src/placer/PPlacement.cpp index 57ca5554..1301b434 100644 --- a/alliance/src/ocp/src/placer/PPlacement.cpp +++ b/alliance/src/ocp/src/placer/PPlacement.cpp @@ -224,14 +224,11 @@ PPlacement::Init(lofig* fig, int NbRows) it = it->NEXT) { locon_list* con = (locon_list*)(it->DATA); - if (con->TYPE == EXTERNAL) - { + if (con->TYPE == EXTERNAL) { if ( (_prePlaceFig && _prePlaceFig->PHCON) - || _placeCons || _ringPlaceCons || _iocFile) - { + || _placeCons || _ringPlaceCons || _iocFile) { PConMap::iterator cit = pconmap.find(con->NAME); - if (cit != pconmap.end()) - { + if (cit != pconmap.end()) { ++totreatinscpt; } } diff --git a/alliance/src/ocp/src/placer/PPlacementFinal.cpp b/alliance/src/ocp/src/placer/PPlacementFinal.cpp index d3be0031..0b0bf84a 100644 --- a/alliance/src/ocp/src/placer/PPlacementFinal.cpp +++ b/alliance/src/ocp/src/placer/PPlacementFinal.cpp @@ -258,13 +258,11 @@ PPlacement::FinalOptimize() // int Save() // ====================================================================== int -PPlacement::Save() -{ +PPlacement::Save() { char* phfigname; struct phfig* physicalfig; - if (!_prePlaceFig) - { + if (!_prePlaceFig) { physicalfig = addphfig(_fileName); phfigname = _fileName; if (_verbose) cout << "NO PREPLACEMENT GIVEN" << endl; @@ -272,9 +270,7 @@ PPlacement::Save() physicalfig->XAB2 =(int)(BBox.GetMaxX() * PITCH); physicalfig->YAB1 =(int)(BBox.GetMinY() * PITCH); physicalfig->YAB2 =(int)(BBox.GetMaxY() * PITCH); - } - else - { + } else { if (_verbose) cout << "PREPLACEMENT GIVEN" << endl; physicalfig = _prePlaceFig; phfigname = physicalfig->NAME; @@ -291,12 +287,14 @@ PPlacement::Save() } } - for (PCons::const_iterator cit = _cons.begin(); cit != _cons.end(); cit++) - { - if (_ringPlaceCons) + for (PCons::const_iterator cit = _cons.begin(); + cit != _cons.end(); + cit++) { + if (_ringPlaceCons) { (*cit)->RingSave(physicalfig, _dx, _dy); - else + } else { (*cit)->Save(physicalfig, _dx, _dy); + } } int superr = AddRowend(physicalfig);