2010-06-08 07:09:50 -05:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2016-01-20 17:41:19 -06:00
|
|
|
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved
|
2010-06-08 07:09:50 -05:00
|
|
|
//
|
2012-11-16 06:53:00 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-06-08 07:09:50 -05:00
|
|
|
// | C O R I O L I S |
|
|
|
|
// | M a u k a - P l a c e r |
|
|
|
|
// | |
|
|
|
|
// | Author : Jean-Paul CHAPUT |
|
|
|
|
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
|
|
|
// | =============================================================== |
|
|
|
|
// | C++ Module : "./Configuration.cpp" |
|
2012-11-16 06:53:00 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-06-08 07:09:50 -05:00
|
|
|
|
|
|
|
|
Support of RoutingGauge, part 2.
In Katabatic & Kite, remove all hard-coded values related to track pitches.
* New: In <Session>, add more convenience function to access RoutingGauge
characteristics.
* New: In <AutoSegment>, <AutoContact>, add support for the "depth spin",
that is, if the source/target contacts are going "top" or "down".
Used to compute the perpandicular pitch. Need a small modification
of the revalidation mechanism. The observers of <AutoSegment> are
notified when the spin changes.
* New: In <AutoSegment>, the getPPitch() method allow to compute the
"perpandicular pitch". For now it is simply the greatest from the
source perpandicular pitch and the target perpandicular pitch.
Make uses of the "depth spin".
* New: In <TrackElement>, <TrackSegment>, cache the perpandicular pitch.
Updated through the notification from the observable.
2014-05-19 10:58:38 -05:00
|
|
|
#include <iostream>
|
|
|
|
#include <iomanip>
|
|
|
|
#include "vlsisapd/configuration/Configuration.h"
|
|
|
|
#include "hurricane/Cell.h"
|
|
|
|
#include "crlcore/Utilities.h"
|
|
|
|
#include "crlcore/AllianceFramework.h"
|
|
|
|
#include "mauka/Configuration.h"
|
2010-06-08 07:09:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Mauka {
|
|
|
|
|
|
|
|
|
|
|
|
using std::cout;
|
|
|
|
using std::cerr;
|
|
|
|
using std::endl;
|
|
|
|
using std::setprecision;
|
|
|
|
using std::ostringstream;
|
|
|
|
using std::string;
|
|
|
|
using Hurricane::tab;
|
|
|
|
using Hurricane::inltrace;
|
2010-06-13 16:02:45 -05:00
|
|
|
using CRL::AllianceFramework;
|
2010-06-08 07:09:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "Mauka::Configuration".
|
|
|
|
|
|
|
|
|
2010-06-13 16:02:45 -05:00
|
|
|
Configuration::Configuration ( CellGauge* cg )
|
|
|
|
: _cellGauge (NULL)
|
|
|
|
, _refreshCb ()
|
2010-06-18 09:14:54 -05:00
|
|
|
, _standardSimulatedAnnealing(Cfg::getParamBool ("mauka.standardAnnealing",false)->asBool())
|
|
|
|
, _ignorePins (Cfg::getParamBool ("mauka.ignorePins" ,false)->asBool())
|
|
|
|
, _plotBins (Cfg::getParamBool ("mauka.plotBins" ,true )->asBool())
|
2010-06-25 03:50:50 -05:00
|
|
|
, _insertFeeds (Cfg::getParamBool ("mauka.insertFeeds" ,true )->asBool())
|
2010-06-18 09:14:54 -05:00
|
|
|
, _searchRatio (Cfg::getParamPercentage("mauka.searchRatio" , 50.0)->asDouble())
|
|
|
|
, _annealingNetMult (Cfg::getParamPercentage("mauka.annealingNetMult" , 90.0)->asDouble())
|
|
|
|
, _annealingBinMult (Cfg::getParamPercentage("mauka.annealingBinMult" , 5.0)->asDouble())
|
|
|
|
, _annealingRowMult (Cfg::getParamPercentage("mauka.annealingRowMult" , 5.0)->asDouble())
|
2010-06-13 16:02:45 -05:00
|
|
|
{
|
2010-06-18 09:14:54 -05:00
|
|
|
_cellGauge = (cg != NULL) ? cg->getClone() : AllianceFramework::get()->getCellGauge();
|
2010-06-13 16:02:45 -05:00
|
|
|
}
|
2010-06-08 07:09:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
Configuration::Configuration ( const Configuration& other )
|
2010-06-13 16:02:45 -05:00
|
|
|
: _cellGauge (other._cellGauge->getClone())
|
|
|
|
, _refreshCb (other._refreshCb)
|
|
|
|
, _standardSimulatedAnnealing(other._standardSimulatedAnnealing)
|
2010-06-08 07:09:50 -05:00
|
|
|
, _ignorePins (other._ignorePins)
|
|
|
|
, _plotBins (other._plotBins)
|
|
|
|
, _searchRatio (other._searchRatio)
|
|
|
|
, _annealingNetMult (other._annealingNetMult)
|
|
|
|
, _annealingBinMult (other._annealingBinMult)
|
|
|
|
, _annealingRowMult (other._annealingRowMult)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
Configuration::~Configuration ()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
void Configuration::print ( Cell* cell ) const
|
|
|
|
{
|
|
|
|
cout << " o Configuration of ToolEngine<Mauka> for Cell <" << cell->getName() << ">" << endl;
|
2010-06-13 16:02:45 -05:00
|
|
|
cout << Dots::asIdentifier(" - Cell Gauge" ,getString(_cellGauge->getName())) << endl;
|
2010-06-08 07:09:50 -05:00
|
|
|
cout << Dots::asBool (" - Use standard simulated annealing" ,_standardSimulatedAnnealing) << endl;
|
|
|
|
cout << Dots::asBool (" - Ignore Pins" ,_ignorePins) << endl;
|
|
|
|
cout << Dots::asBool (" - Plot Bins" ,_plotBins) << endl;
|
|
|
|
cout << Dots::asPercentage(" - Search Ratio" ,_searchRatio) << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string Configuration::_getTypeName () const
|
|
|
|
{
|
|
|
|
return "Mauka::Configuration";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
string Configuration::_getString () const
|
|
|
|
{
|
|
|
|
ostringstream os;
|
|
|
|
|
|
|
|
os << "<" << _getTypeName() << ">";
|
|
|
|
|
|
|
|
return os.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Record* Configuration::_getRecord () const
|
|
|
|
{
|
|
|
|
Record* record = new Record ( _getString() );
|
2010-06-13 16:02:45 -05:00
|
|
|
record->add ( getSlot( "_cellGauge" , _cellGauge ) );
|
2010-06-08 07:09:50 -05:00
|
|
|
record->add ( getSlot( "_standardSimulatedAnnealing", _standardSimulatedAnnealing) );
|
|
|
|
record->add ( getSlot( "_ignorePins" , _ignorePins ) );
|
|
|
|
record->add ( getSlot( "_plotBins" , _plotBins ) );
|
|
|
|
record->add ( getSlot( "_searchRatio" , _searchRatio ) );
|
|
|
|
|
|
|
|
return ( record );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} // End of Mauka namespace.
|