From 035fb35dbe73bc3974022680c3c480419fc56dd3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 15 Jul 2010 12:30:11 +0000 Subject: [PATCH] Unuseds too. --- mauka/src/mauka/BBPlacer.h.noRefactor | 126 --------------- mauka/src/mauka/Bin.h.noRefactor | 119 -------------- mauka/src/mauka/Container.h.noRefactor | 92 ----------- mauka/src/mauka/Mauka.h.noRefactor | 152 ------------------ mauka/src/mauka/MaukaBox.h.noRefactor | 48 ------ mauka/src/mauka/MaukaEngine.h.noRefactor | 152 ------------------ mauka/src/mauka/Move.h.noRefactor | 104 ------------ mauka/src/mauka/Row.h.noRefactor | 106 ------------ .../src/mauka/SimAnnealingPlacer.h.noRefactor | 126 --------------- mauka/src/mauka/SubRow.h.noRefactor | 109 ------------- mauka/src/mauka/Surface.h.noRefactor | 118 -------------- 11 files changed, 1252 deletions(-) delete mode 100644 mauka/src/mauka/BBPlacer.h.noRefactor delete mode 100644 mauka/src/mauka/Bin.h.noRefactor delete mode 100644 mauka/src/mauka/Container.h.noRefactor delete mode 100644 mauka/src/mauka/Mauka.h.noRefactor delete mode 100644 mauka/src/mauka/MaukaBox.h.noRefactor delete mode 100644 mauka/src/mauka/MaukaEngine.h.noRefactor delete mode 100644 mauka/src/mauka/Move.h.noRefactor delete mode 100644 mauka/src/mauka/Row.h.noRefactor delete mode 100644 mauka/src/mauka/SimAnnealingPlacer.h.noRefactor delete mode 100644 mauka/src/mauka/SubRow.h.noRefactor delete mode 100644 mauka/src/mauka/Surface.h.noRefactor diff --git a/mauka/src/mauka/BBPlacer.h.noRefactor b/mauka/src/mauka/BBPlacer.h.noRefactor deleted file mode 100644 index 1d5cfed9..00000000 --- a/mauka/src/mauka/BBPlacer.h.noRefactor +++ /dev/null @@ -1,126 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __BBPLACER_H -#define __BBPLACER_H - -#include "Instance.h" -USING_NAMESPACE_HURRICANE - -#include "SubRow.h" -#include "Mauka.h" - -namespace MAUKA { - -// **************************************************************************************************** -// BBPlacer declaration -// **************************************************************************************************** - -class BBPlacer { -// ************* - - friend class Mauka; - -// Types -// ***** - public: typedef vector SubRowVector; -// Attributes -// ********** - private: Mauka* _mauka; - private: SubRowVector _subRowVector; - private: Mauka::UTable _subRowInstances; - private: Mauka::UnitVector _instanceMarginWidth; - private: Mauka::UnitVector _instanceX; //Left Corner X position - private: Mauka::UnitVector _instanceY; - private: Mauka::BVector _instancePlaced; - private: Mauka::NetVector _netVector; - private: Mauka::BBoxes _netBBoxes; - private: Mauka::Costs _netCosts; - private: Mauka::UVector _netCurrCostMark; - private: Mauka::UVector _netFlags; - // For the optimization engine itself - private: Mauka::UVector _instanceToOptimize; - private: Unit _leftEdge; - private: Unit _rightEdge; - private: double _oldCost; - private: double _cost; - private: double _bestCost; - // _costFlag is for computing nets costs - // Each net must be visited only one time - private: unsigned _costFlag; - private: unsigned _saveFlag; - private: deque _queue; // ordering - private: Mauka::UVector _stack; - private: Mauka::UVector _loopVect; // use for loop - private: Mauka::UnitVector _bestSolution; - private: int _idx; - -// Constructors -// ************ - public: BBPlacer(Mauka* mauka); - -// Accessors -// ********* - public: Unit GetInstanceIdX(unsigned id) const { return _instanceX[id]; } - -// Updators -// ******** - -// Others -// ****** - - public: void Run(); - public: void Save(); - private: bool Optimize(); - private: double InitCost(); - private: double CurrentCost(); - private: void PlaceAll(); - private: void UnplaceAll(); - private: void AddIns(); - private: void RemoveIns(); - private: double UpdateInstanceCost(unsigned instanceid); - private: double UpdateNetCost(unsigned netid); - private: double ComputeCost(const Box& box) const; - private: double InitInstanceCost(unsigned instanceid); - private: double CurrentInstanceCost(unsigned instanceid); - private: void ComputeNetBBox(unsigned netid); - private: void SaveNetTempValue(unsigned netid); - private: double CurrentNetCost(unsigned netid); - private: void Plot(ofstream& out) const; -}; - -} - -#endif // __BBPLACER_H diff --git a/mauka/src/mauka/Bin.h.noRefactor b/mauka/src/mauka/Bin.h.noRefactor deleted file mode 100644 index d64aa8c3..00000000 --- a/mauka/src/mauka/Bin.h.noRefactor +++ /dev/null @@ -1,119 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __BIN_H -#define __BIN_H - -#include "Occurrences.h" -USING_NAMESPACE_HURRICANE - -#include "Container.h" -#include "Mauka.h" - -namespace MAUKA { - -class SubRow; -class SimAnnealingPlacer; - -// **************************************************************************************************** -// Bin declaration -// **************************************************************************************************** - -class Bin : public Container { -// ************************* - -// Friends -// ******* - friend class BBPlacer; - friend class SubRow; - -// Types -// ***** - public: typedef Container Inherit; - -// Attributes -// ********** - private: SubRow* _subRow; - private: Mauka* _mauka; - private: Mauka::UList _instanceOccurrenceIds; - private: Unit _size; // sum of the contained instances width - private: Unit _capa; // ideal occupation of the bin - private: unsigned _sourceHits; - private: unsigned _targetHits; - -// Constructors -// ************ - protected: Bin(const Cell* cell, SubRow* subrow, const Box& box); - public: static Bin* Create(const Cell* cell, SubRow* subrow, const Box& box); - -// Accessors -// ********* - public: virtual Cell* GetCell() const; - public: Unit GetCapaVsSize() const { return (_capa - _size);} - public: Unit GetSize() const { return _size; } - public: Unit GetCapa() const { return _capa; } - public: SubRow* GetSubRow() { return _subRow; } - public: unsigned GetFirstInstanceOccurrenceId() const { return _instanceOccurrenceIds.front(); } - public: double GetCost() const; - public: unsigned GetInstanceOccurrenceIdSize() const { return _instanceOccurrenceIds.size(); } - public: const Mauka::UList::const_iterator InstanceOccurrenceIdsBegin() const { return _instanceOccurrenceIds.begin(); } - public: const Mauka::UList::const_iterator InstanceOccurrenceIdsEnd() const { return _instanceOccurrenceIds.end(); } - public: Occurrences GetInstanceOccurrences() const; - -// Updators -// ******** - public: void RemoveInstance(unsigned instanceid); - public: void RemoveFrontInstance(unsigned instanceid); - public: void RemoveBackInstance(unsigned instanceid); - public: void AddInstance(unsigned instanceid); - private:void _AddSize(Unit value); - -// Others -// ****** - private: void _ComputeCapacity(double margin); - public: void DisplayHits() const; - public: void IncrementSourceHits(); - public: void IncrementTargetHits(); - public: bool TryAddInstance(unsigned instanceid); - public: bool UnderOccupied() const; - protected: virtual void _PostCreate(); - public: virtual string _GetTypeName() const {return _TName("Bin");}; - public: void PlotStats(ofstream& out) const; - public: void Plot(ofstream& out) const; -}; - -} - -#endif // __BIN_H diff --git a/mauka/src/mauka/Container.h.noRefactor b/mauka/src/mauka/Container.h.noRefactor deleted file mode 100644 index 889beafb..00000000 --- a/mauka/src/mauka/Container.h.noRefactor +++ /dev/null @@ -1,92 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 29/01/2004 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __CONTAINER_H -#define __CONTAINER_H - -#include "Box.h" -#include "UserGo.h" -USING_NAMESPACE_HURRICANE - -namespace MAUKA { - -class Container: public UserGo { -// ****************************** - -// Types -// ***** - public: typedef UserGo Inherit; - -// Attributes -// ********** - protected: Box _box; - -// Constructors -// ************ - protected: Container(const Cell* cell, const Box& box); -// -// Accessors -// ********* - - public: Box GetBoundingBox() const { return _box; }; - public: const Box& GetBox() const { return _box; }; - public: const Unit& GetXMin() const { return _box.GetXMin(); }; - public: const Unit& GetYMin() const { return _box.GetYMin(); }; - public: const Unit& GetXMax() const { return _box.GetXMax(); }; - public: const Unit& GetYMax() const { return _box.GetYMax(); }; - public: Unit GetHeight() const { return _box.GetHeight(); }; - public: Unit GetWidth() const { return _box.GetWidth(); }; - public: Point GetCenter() const { return _box.GetCenter(); } - -// Updators -// ******** - - public: virtual void Translate(const Unit& dx, const Unit& dy) {} - -// Others -// ****** - public: virtual bool _IsInterceptedBy(View* view, const Point& point, const Unit& aperture) const; - public: virtual void _Draw(View* view, BasicLayer* basiclayer, const Box& updatearea, const Transformation& transformation); - public: virtual void _Highlight(View* view, const Box& updatearea, const Transformation& transformation); - - public: virtual string _GetTypeName() const {return _TName("Container");}; - public: virtual string _GetString() const; - public: virtual Record* _GetRecord() const; - -}; - -} - -#endif // __CONTAINER_H diff --git a/mauka/src/mauka/Mauka.h.noRefactor b/mauka/src/mauka/Mauka.h.noRefactor deleted file mode 100644 index c1c3a7df..00000000 --- a/mauka/src/mauka/Mauka.h.noRefactor +++ /dev/null @@ -1,152 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag - -#ifndef __MAUKA_H -#define __MAUKA_H - -#include "Instance.h" -USING_NAMESPACE_HURRICANE - -#include "CEngine.h" -using namespace CRL; - -#include "GCell.h" -using namespace NIMBUS; - -namespace MAUKA { - -class Surface; -class SimAnnealingPlacer; -class BBPlacer; - -class Mauka: public CEngine -// ************************ -{ - //Mauka: a cool, light, Hawaiian wind descending from the montains. - friend class Surface; - friend class SimAnnealingPlacer; - friend class Move; - friend class Bin; - friend class SubRow; - friend class BBPlacer; -// Types -// ***** - public: typedef CEngine Inherit; - public: typedef vector InstanceOccurrencesVector; - public: typedef map InstanceOccurrencesMap; - public: typedef vector UVector; - public: typedef list UList; - public: typedef vector UTable; - public: typedef vector BVector; - public: typedef vector UnitVector; - public: typedef vector NetVector; - public: typedef vector BoxVector; - public: typedef vector BBoxes; - public: typedef vector > Costs; - public: typedef vector PrePlaceRow; - public: typedef vector PrePlaceTab; - public: - class Parameters - { - public: bool standardSimulatedAnnealing; - public: bool ignorePins; - public: bool plotBins; //plot bins utilisation - public: Parameters() - : standardSimulatedAnnealing(false) - , ignorePins(false) - , plotBins(true) - {} - }; - -// Attributes -// ********** - public: Parameters _params; - private: DisplaySlot* _displaySlot; - private: InstanceOccurrencesVector _instanceOccurrencesVector; - private: InstanceOccurrencesMap _instanceOccurrencesMap; - private: UnitVector _instanceWidths; - private: UTable _instanceNets; - private: NetVector _nets; - private: UTable _netInstances; - private: UVector _netInitX; - private: UVector _netInitY; - private: BVector _hasInitX; - private: BVector _hasInitY; - private: Surface* _surface; - private: SimAnnealingPlacer* _simAnnealingPlacer; - private: BBPlacer* _bbPlacer; - - -// Constructor -// *********** - private: Mauka(Cell* cell); - public: static Mauka* Create(Cell* cell, double searchratio = 0.5, Box placementbox = Box()); - -// Accessors -// ********* - public: virtual const Name& GetName() const; - private: Surface* _GetSurface() const { return _surface; } - public: Unit GetInstanceIdWidth(unsigned id) const { return _instanceWidths[id]; } - public: unsigned GetRandomInstanceId() const; - -// Others -// ****** - private: void _PostCreate(Box& placementbox, double searchratio); - private: void _PreDelete(); - //public: void ReInit(); - public: bool Iterate(); - public: void Run(); - public: void Test(); - public: virtual string _GetTypeName() const {return _TName("Mauka");}; - public: virtual Record* _GetRecord() const; - public: void Save() const; - public: void PlotBinsStats() const; - public: void Plot() const; - private: Box PlotFixedPointsLabels(ofstream& out) const; - private: void Construct(); - public: void Hide(); - public: void Show(); - -}; - -void SetPlacementStatusRecursivelyToPlaced(Instance* instance); - -Mauka* GetMauka (const Cell* cell); -bool TestMaukaConstruction(Cell* cell, GCell* gcell); - -} - -#endif /* __MAUKA_H */ diff --git a/mauka/src/mauka/MaukaBox.h.noRefactor b/mauka/src/mauka/MaukaBox.h.noRefactor deleted file mode 100644 index 6896d050..00000000 --- a/mauka/src/mauka/MaukaBox.h.noRefactor +++ /dev/null @@ -1,48 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __MAUKABOX_H -#define __MAUKABOX_H - -#include "Box.h" -USING_NAMESPACE_HURRICANE - -namespace MAUKA { - -Box& Update(Box& box, const Point& src, const Point& dst); - -} - -#endif /* __MAUKABOX_H */ diff --git a/mauka/src/mauka/MaukaEngine.h.noRefactor b/mauka/src/mauka/MaukaEngine.h.noRefactor deleted file mode 100644 index 8cfd3900..00000000 --- a/mauka/src/mauka/MaukaEngine.h.noRefactor +++ /dev/null @@ -1,152 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag - -#ifndef __MAUKA_H -#define __MAUKA_H - -#include "Instance.h" -USING_NAMESPACE_HURRICANE - -#include "ToolEngine.h" -using namespace CRL; - -#include "GCell.h" -using namespace NIMBUS; - -namespace MAUKA { - -class Surface; -class SimAnnealingPlacer; -class BBPlacer; - -class Mauka: public ToolEngine -// ************************ -{ - //Mauka: a cool, light, Hawaiian wind descending from the montains. - friend class Surface; - friend class SimAnnealingPlacer; - friend class Move; - friend class Bin; - friend class SubRow; - friend class BBPlacer; -// Types -// ***** - public: typedef ToolEngine Inherit; - public: typedef vector InstanceOccurrencesVector; - public: typedef map InstanceOccurrencesMap; - public: typedef vector UVector; - public: typedef list UList; - public: typedef vector UTable; - public: typedef vector BVector; - public: typedef vector DbU::UnitVector; - public: typedef vector NetVector; - public: typedef vector BoxVector; - public: typedef vector BBoxes; - public: typedef vector > Costs; - public: typedef vector PrePlaceRow; - public: typedef vector PrePlaceTab; - public: - class Parameters - { - public: bool standardSimulatedAnnealing; - public: bool ignorePins; - public: bool plotBins; //plot bins utilisation - public: Parameters() - : standardSimulatedAnnealing(false) - , ignorePins(false) - , plotBins(true) - {} - }; - -// Attributes -// ********** - public: Parameters _params; - private: DisplaySlot* _displaySlot; - private: InstanceOccurrencesVector _instanceOccurrencesVector; - private: InstanceOccurrencesMap _instanceOccurrencesMap; - private: DbU::UnitVector _instanceWidths; - private: UTable _instanceNets; - private: NetVector _nets; - private: UTable _netInstances; - private: UVector _netInitX; - private: UVector _netInitY; - private: BVector _hasInitX; - private: BVector _hasInitY; - private: Surface* _surface; - private: SimAnnealingPlacer* _simAnnealingPlacer; - private: BBPlacer* _bbPlacer; - - -// Constructor -// *********** - private: Mauka(Cell* cell); - public: static Mauka* create(Cell* cell, double searchratio = 0.5, Box placementbox = Box()); - -// Accessors -// ********* - public: virtual const Name& getName() const; - private: Surface* _getSurface() const { return _surface; } - public: DbU::Unit getInstanceIdWidth(unsigned id) const { return _instanceWidths[id]; } - public: unsigned getRandomInstanceId() const; - -// Others -// ****** - private: void _postCreate(Box& placementbox, double searchratio); - private: void _preDestroy(); - //public: void ReInit(); - public: bool Iterate(); - public: void Run(); - public: void Test(); - public: virtual string _getTypeName() const {return _TName("Mauka");}; - public: virtual Record* _getRecord() const; - public: void Save() const; - public: void PlotBinsStats() const; - public: void Plot() const; - private: Box PlotFixedPointsLabels(ofstream& out) const; - private: void Construct(); - public: void hide(); - public: void show(); - -}; - -void setPlacementStatusRecursivelyToPlaced(Instance* instance); - -Mauka* getMauka (const Cell* cell); -bool TestMaukaConstruction(Cell* cell, GCell* gcell); - -} - -#endif /* __MAUKA_H */ diff --git a/mauka/src/mauka/Move.h.noRefactor b/mauka/src/mauka/Move.h.noRefactor deleted file mode 100644 index 1eaeca25..00000000 --- a/mauka/src/mauka/Move.h.noRefactor +++ /dev/null @@ -1,104 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __MOVE_H -#define __MOVE_H -#include -using namespace std; - -#include "Instance.h" -#include "Net.h" -USING_NAMESPACE_HURRICANE - -// **************************************************************************************************** -// Move declaration -// **************************************************************************************************** - -namespace MAUKA { - -class Bin; -class Row; -class SubRow; - -class Move { -// ********* - -// Types -// ***** - public: typedef map AffectedNets; - -// Attributes -// ********** - private: SimAnnealingPlacer* _simAnnealingPlacer; - private: Mauka* _mauka; - private: Surface* _surface; - private: bool _exchange; - private: unsigned _srcIns; - private: Bin* _srcBin; - private: double _srcBinInitCost; - private: SubRow* _srcSubRow; - private: Row* _srcRow; - private: double _srcRowInitCost; - private: Unit _srcWidth; - private: Bin* _dstBin; - private: double _dstBinInitCost; - private: SubRow* _dstSubRow; - private: Row* _dstRow; - private: double _dstRowInitCost; - private: unsigned _dstIns; - private: Unit _dstWidth; - private: AffectedNets _affectedNets; - -// Constructors -// ************ - public: Move(SimAnnealingPlacer* simannealingplacer); - -// Accessors -// ********* - public: double GetDeltaRowCost() const; - public: double GetDeltaBinCost() const; - public: double GetDeltaNetCost(); - -// Others -// ****** - public: bool Next(const double dist); - public: void Accept(); - public: void Reject(); - public: void TryMove(); -}; - -} - -#endif /* __MOVE_H */ diff --git a/mauka/src/mauka/Row.h.noRefactor b/mauka/src/mauka/Row.h.noRefactor deleted file mode 100644 index 14f6dd9b..00000000 --- a/mauka/src/mauka/Row.h.noRefactor +++ /dev/null @@ -1,106 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __ROW_H -#define __ROW_H - -#include "Container.h" -#include "SubRow.h" - -namespace MAUKA { - -class Surface; - -// **************************************************************************************************** -// Row declaration -// **************************************************************************************************** - -class Row : public Container { -// ************************* - friend class Surface; - friend class SubRow; - friend class BBPlacer; - -// Types -// ***** - public: typedef Container Inherit; - public: typedef vector SubRowVector; - public: typedef map > SubRowXMax; - public: typedef map > SubRowXMinInv; - -// Attributes -// ********** - private: Surface* _surface; - private: SubRowVector _subRowVector; - private: SubRowXMax _subRowXMax; - private: SubRowXMinInv _subRowXMinInv; - private: bool _orientation; - private: Unit _size; // sum of the subrows size - private: Unit _capa; - -// Constructors -// ************ - protected: Row(Cell* cell, Surface* surface, const Box& box, bool orientation); - public: static Row* Create(Cell* cell, Surface* surface, const Box& box, bool orientation); - -// Accessors -// ********* - public: SubRow* GetSubRowBetween(Unit x1, Unit x2); - public: double GetCost() const; - public: bool GetOrientation() const { return _orientation; } - public: Unit GetSubRowsWidth() const; - public: Unit GetSubRowsCapa() const; - public: double GetBinCost() const; - public: Unit GetBinsSize() const; - public: Unit GetBinsCapa() const; - -// Updators -// ******** - private: void _ComputeCapacity(double margin); - private: void _AddSize(Unit value); - -// Others -// ****** - public: virtual Cell* GetCell() const; - protected: virtual void _PreDelete(); - private: void _InsertSubRow(SubRow* subrow); - private: void _ComputeSubRows(); - public: virtual string _GetTypeName() const {return _TName("Row");}; - public: void DisplayBinHits() const; -}; - -} - -#endif // __ROW_H diff --git a/mauka/src/mauka/SimAnnealingPlacer.h.noRefactor b/mauka/src/mauka/SimAnnealingPlacer.h.noRefactor deleted file mode 100644 index 23bdc4bd..00000000 --- a/mauka/src/mauka/SimAnnealingPlacer.h.noRefactor +++ /dev/null @@ -1,126 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __SIMANNEALINGPLACER_H -#define __SIMANNEALINGPLACER_H - -#include "Instance.h" -USING_NAMESPACE_HURRICANE - -#include "CVerbosity.h" -using namespace CRL; - -#include "Mauka.h" - -namespace MAUKA { - -class Mauka; -class Bin; - -class SimAnnealingPlacer { -// *********************** - friend class Mauka; - friend class Move; - friend class Bin; - friend class SubRow; - -// Types -// ***** - public: typedef vector InstanceBins; - -// Attributes -// ********** - private: Mauka* _mauka; - private: InstanceBins _instanceBins; - private: Mauka::BBoxes _netBBoxes; - private: Mauka::Costs _netCosts; - private: Mauka::UVector _netFlags; - private: double _netCost; - private: double _binCost; - private: double _rowCost; - private: double _initNetCost; - private: double _initBinCost; - private: double _initRowCost; - private: double _netMult; - private: double _binMult; - private: double _rowMult; - private: double _temperature; - private: double _distance; - private: unsigned _loop; - private: unsigned _iterationsFactor; - private: unsigned _iterations; - private: unsigned _moves; - private: unsigned _sourceEqualTargetMovementNumber; - private: unsigned _surOccupationTargetMovementNumber; - private: unsigned _impossibleExchangeMovementNumber; - - -// Constructor -// *********** - public: SimAnnealingPlacer(Mauka* mauka, double netmult = 0.8, double binmult = 0.1, double rowmult = 0.1); - -// Accessors -// ********* - public: double GetNetCost(); - public: double GetCost() const; - public: double& _GetNetIdCost(unsigned netid) { return _netCosts[netid][_netFlags[netid]]; } - public: double& _GetNetIdTmpCost(unsigned netid) { return _netCosts[netid][!_netFlags[netid]]; } - public: Box& _GetNetIdBBox(unsigned netid) { return _netBBoxes[netid][_netFlags[netid]]; } - public: Box& _GetNetTmpBBox(unsigned netid) { return _netBBoxes[netid][!_netFlags[netid]]; } - public: Mauka* GetMauka() { return _mauka; } - public: unsigned GetMoves() const { return _moves; } - public: unsigned GetRandInstance(); - -// Others -// ****** - public: bool Iterate(); - private: bool Accept(double deltacost) const; - public: double DebugNetCost(); - public: void DisplayResults() const; - public: void _SetInstanceIdBin(unsigned instanceid, Bin* bin) { _instanceBins[instanceid] = bin; } - public: void _InvertNetIdFlag(unsigned netid) { _netFlags[netid] = !_netFlags[netid]; } - public: double ComputeCost(double rowcost, double bincost, double netcost) const; - public: void IncrImpossibleExchangeMovementNumber() { ++_impossibleExchangeMovementNumber; } - public: void IncrSourceEqualTargetMovementNumber() { ++_sourceEqualTargetMovementNumber; } - public: void IncrSurOccupationTargetMovementNumber() { ++_surOccupationTargetMovementNumber; } - public: void Init(); - public: void Save() const; - private: void Plot(ofstream& out) const; - -}; - -} - -#endif /* __SIMANNEALINGPLACER_H */ diff --git a/mauka/src/mauka/SubRow.h.noRefactor b/mauka/src/mauka/SubRow.h.noRefactor deleted file mode 100644 index 7efa1436..00000000 --- a/mauka/src/mauka/SubRow.h.noRefactor +++ /dev/null @@ -1,109 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 19/07/2006 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __SUBROW_H -#define __SUBROW_H - -#include "Container.h" -#include "Bin.h" - -namespace MAUKA { - -class Surface; -class Row; - -// **************************************************************************************************** -// SubRow declaration -// **************************************************************************************************** - -class SubRow : public Container { -// ************************* - friend class Surface; - friend class Bin; - friend class Row; - friend class BBPlacer; -// Types -// ***** - public: typedef Container Inherit; - public: typedef vector BinVector; - public: typedef map BinXMax; - public: typedef vector InstanceVector; // for bbplacer - -// Attributes -// ********** - private: Surface* _surface; - private: Row* _row; - private: BinVector _binVector; - private: BinXMax _binXMax; - private: Unit _size; // sum of the bins size - private: Unit _capa; // ideal occupation of the subrow - -// Constructors -// ************ - protected: SubRow(const Cell* cell, Surface* surface, const Box& box); - public: static SubRow* Create(const Cell* cell, Surface* surface, const Box& box, bool orientation); - -// Accessors -// ********* - public: virtual Cell* GetCell() const; - public: Row* GetRow() { return _row; } - public: Surface* GetSurface() { return _surface; } - public: Unit GetCapa() const { return _capa; } - public: Unit GetSize() const { return _size; } - public: Unit GetCapaVsSize() const { return (_capa - _size);} - public: Unit GetWidthVsSize() const { return (GetWidth() - _size);} - public: Bin* GetBinBetween(Unit lowerX, Unit upperX, const Bin* srcbin); - -// Updators -// ******** - private: void _AddSize(Unit value); - -// Others -// ****** - private: void _ComputeCapacity(double margin); - private: bool _MergeBins(); - public: void DisplayBinHits() const; - protected: virtual void _PostCreate(bool orientation); - protected: virtual void _PreDelete(); - public: double GetBinCost() const; - public: Unit GetBinsSize() const; - public: Unit GetBinsCapa() const; - public: double GetCost() const; - public: virtual string _GetTypeName() const {return _TName("SubRow");}; -}; - -} - -#endif // __SUBROW_H diff --git a/mauka/src/mauka/Surface.h.noRefactor b/mauka/src/mauka/Surface.h.noRefactor deleted file mode 100644 index de3627ea..00000000 --- a/mauka/src/mauka/Surface.h.noRefactor +++ /dev/null @@ -1,118 +0,0 @@ - -// This file is part of the Coriolis Project. -// Copyright (C) Laboratoire LIP6 - Departement ASIM -// Universite Pierre et Marie Curie -// -// Main contributors : -// Christophe Alexandre -// Sophie Belloeil -// Hugo Clément -// Jean-Paul Chaput -// Damien Dupuis -// Christian Masson -// Marek Sroka -// -// The Coriolis Project is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// The Coriolis Project is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with the Coriolis Project; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// -// License-Tag -// -// Date : 29/01/2004 -// Author : Christophe Alexandre -// -// Authors-Tag -#ifndef __SURFACE_H -#define __SURFACE_H - -#include "Container.h" -#include "Mauka.h" - -namespace MAUKA{ - -class Bin; -class Row; -class SubRow; -class Mauka; - -class Surface: public Container { -// **************************** - friend class Mauka; - friend class SimAnnealingPlacer; - friend class Row; - friend class SubRow; - friend class BBPlacer; - -// Types -// ***** - public: typedef Container Inherit; - public: typedef vector RowVector; - public: typedef list SubRowList; - public: typedef map > RowYMax; - public: typedef map > RowYMinInv; - //public: typedef map RowMap; - -// Attributes -// ********** - private: Mauka* _mauka; - //private: RowMap _rowMap; - private: RowVector _rowVector; - private: RowYMax _rowYMax; - private: RowYMinInv _rowYMinInv; - private: bool _rowZeroOrientation; - private: double _margin; - private: Unit _binWidthMax; - private: Unit _binWidthMin; - private: double _searchRatio; - private: Unit _searchWidth; - private: Unit _searchHeight; - -// Constructors -// ************ - protected: Surface(Mauka* mauka, const Box& placementbox, double searchratio); - public: static Surface* Create(Mauka* mauka, const Box& placementbox, double searchratio); - -// Accessors -// ********* - public: virtual Cell* GetCell() const { return _mauka->GetCell(); } - public: Bin* GetBinInSurface(Bin* srcbin, double dist); - public: double GetBinCost() const; - public: double GetRowCost() const; - public: Unit GetBinsSize() const; - public: Unit GetBinsCapa() const; - public: Unit GetSubRowsCapa() const; - public: double GetMargin() const { return _margin; }; - public: Mauka* GetMauka() { return _mauka; }; - -// Others -// ****** - public: void DisplayBinHits() const; - protected: virtual void _PreDelete(); - private: void InsertRow(Row* row); - private: void RemoveRow(Row* row); - private: Row* InsertSubRow(SubRow* subrow, bool orientation); - private: void RemoveSubRow(SubRow* subrow); - private: void PlotBinsStats(ofstream& out) const; - private: void Plot(ofstream& out) const; - public: virtual string _GetTypeName() const {return _TName("Surface");}; - public: virtual Record* _GetRecord() const; - private: Row* InsertSubRowInRow(SubRow* subrow, bool orientation); - private: void _ComputeRowsAndSubRows(); - private: void _DisplayInstances(Mauka::UVector& instanceids, SubRowList& subrowlist); - private: void _ComputeCapacity(); - private: void _PostCreate(); -}; - -} -#endif /* __SURFACE_H */