2010-06-08 07:09:50 -05:00
|
|
|
|
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
|
|
|
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
|
|
|
//
|
|
|
|
// ===================================================================
|
|
|
|
//
|
|
|
|
// $Id$
|
|
|
|
//
|
|
|
|
// x-----------------------------------------------------------------x
|
|
|
|
// | |
|
|
|
|
// | 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" |
|
|
|
|
// | *************************************************************** |
|
|
|
|
// | U p d a t e s |
|
|
|
|
// | |
|
|
|
|
// x-----------------------------------------------------------------x
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <iomanip>
|
|
|
|
|
2010-06-18 09:14:54 -05:00
|
|
|
#include "vlsisapd/configuration/Configuration.h"
|
2010-06-08 07:09:50 -05:00
|
|
|
#include "hurricane/Cell.h"
|
|
|
|
#include "crlcore/Utilities.h"
|
2010-06-13 16:02:45 -05:00
|
|
|
#include "crlcore/AllianceFramework.h"
|
2010-06-08 07:09:50 -05:00
|
|
|
#include "mauka/Configuration.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|