coriolis/etesian/src/Configuration.cpp

128 lines
3.5 KiB
C++
Raw Normal View History

Update to Qt 5, requires cmake 2.8.9. New placer: Etesian. Update to Qt 5: * Change: Now requires at least cmake 2.8.9. * Change: CMakeLists.txt needs small changes. Qt modules must be found one by one (Core, Gui, Widgets). Must add "set(CMAKE_AUTOMOC ON)" in the top file and replace "qt4" prefix in macros by "qt5". Added simpler macro "setup_qt()" in FindBootstrap.cmake. * Change: No longer need to include <QGtkStyle> is is choosen by default according to the current desktop environment. * Change: In <hurricane>, In HApplication, launch ExceptionWidget when a std::exception is catched instead of silently discarting it. New placer Tool: Etesian * New: <etesian> analytical placer. Encapsulate Coloquinte from Gabriel Gouvine. * New: in <documentation>, add stub demonstration ToolEngine <smurf>. Needs to be commented. Miscellaneous: * New: in <boostrap> and <unicorn>, added support for Etesian, the new analytic placer. The tool itself will be added in the next commit. * Bug: in <CellWidget>, when shifting the display buffer, we no longer can copy the buffer on itself (we should never have). Now go through a temporary one (PlaneId::AutoCopy) which is added to the DrawingPlanes. Affect "goLeft()" and "goUp()". * Bug: In <CellWidget>, remove the WA_PaintOnScreen flag/attribute. When it's on, no PaintEvent is transmitted to the CellWidget when it's the central widget of the <CellViewer> (QMainWindow). It's something I still don't understand from the doc of Qt. * Change: In <AreaCommand>, use the PlaneId enumeration instead of a anonymous numerical index. * Change: In <HApplication>, no longer catch and silently discard standartd exceptions but launch the ExceptionWidget... Suppress the now deprecated constructor with "Type" argument. * Change: In <SelectionModel>, the "reset()" method is deprecated in Qt5, instead enclose the "clear()" by a "beginResetModel()" and "endResetModel()" pair. * New: In <crlcore>, add support for ISPD05 benchmarks (in Bookshelf format). Forked from ISPD04 and not finished yet. * Change: In <Mauka>, distinguish the Action string identifier from <Etesian> * New: In <unicorn>, add entry for ISPD05 loader. Add entry for <Etesian> analytic placer.
2014-03-22 05:50:36 -05:00
// -*- mode: C++; explicit-buffer-name: "Configuration.cpp<etesian>" -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC 2014-2014, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | E t e s i a n - A n a l y t i c P l a c e r |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Module : "./Configuration.cpp" |
// +-----------------------------------------------------------------+
#include <iostream>
#include <iomanip>
#include <vector>
#include "vlsisapd/configuration/Configuration.h"
#include "hurricane/Warning.h"
#include "hurricane/Technology.h"
#include "hurricane/DataBase.h"
#include "hurricane/Cell.h"
#include "crlcore/Utilities.h"
#include "crlcore/RoutingLayerGauge.h"
#include "crlcore/AllianceFramework.h"
#include "etesian/Configuration.h"
namespace Etesian {
using std::cout;
using std::cerr;
using std::endl;
using std::setprecision;
using std::ostringstream;
using std::vector;
using Hurricane::tab;
using Hurricane::inltrace;
using Hurricane::Warning;
using Hurricane::Technology;
using Hurricane::DataBase;
using CRL::AllianceFramework;
using CRL::RoutingGauge;
using CRL::RoutingLayerGauge;
// -------------------------------------------------------------------
// Class : "Etesian::Configuration".
Configuration::Configuration () { }
Configuration::~Configuration () { }
// -------------------------------------------------------------------
// Class : "Etesian::ConfigurationConcrete".
ConfigurationConcrete::ConfigurationConcrete ( const RoutingGauge* rg )
: Configuration()
, _rg (NULL)
{
if ( rg == NULL ) rg = AllianceFramework::get()->getRoutingGauge();
_rg = rg->getClone();
}
ConfigurationConcrete::ConfigurationConcrete ( const ConfigurationConcrete& other )
: Configuration()
, _rg (NULL)
{
if ( other._rg ) _rg = other._rg->getClone();
}
ConfigurationConcrete::~ConfigurationConcrete ()
{
ltrace(89) << "About to delete attribute _rg (RoutingGauge)." << endl;
_rg->destroy ();
}
ConfigurationConcrete* ConfigurationConcrete::clone () const
{ return new ConfigurationConcrete(*this); }
RoutingGauge* ConfigurationConcrete::getRoutingGauge () const
{ return _rg; }
void ConfigurationConcrete::print ( Cell* cell ) const
{
cout << " o Configuration of ToolEngine<Etesian> for Cell <" << cell->getName() << ">" << endl;
cout << Dots::asIdentifier(" - Routing Gauge" ,getString(_rg->getName())) << endl;
}
string ConfigurationConcrete::_getTypeName () const
{ return "ConfigurationConcrete"; }
string ConfigurationConcrete::_getString () const
{
ostringstream os;
os << "<" << _getTypeName() << " " << _rg->getName() << ">";
return os.str();
}
Record* ConfigurationConcrete::_getRecord () const
{
Record* record = new Record ( _getString() );
record->add ( getSlot ( "_rg" , _rg ) );
return ( record );
}
} // etesian namespace.