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.
This commit is contained in:
parent
f6ab7b87f0
commit
4842f21a2e
|
@ -5,9 +5,9 @@
|
|||
|
||||
projectdir = 'coriolis-2.x'
|
||||
|
||||
projects = [ { 'name' : "axep"
|
||||
, 'tools' : [ "AXE_Placer" ]
|
||||
, 'repository': 'https://github.com/alnurn/AXE_Placer' }
|
||||
projects = [ { 'name' : "coloquinte"
|
||||
, 'tools' : [ "Coloquinte" ]
|
||||
, 'repository': 'https://github.com/alnurn/Coloquinte' }
|
||||
|
||||
, { 'name' : "coriolis"
|
||||
, 'tools' : [ "bootstrap"
|
||||
|
@ -17,6 +17,7 @@ projects = [ { 'name' : "axep"
|
|||
, "nimbus"
|
||||
, "metis"
|
||||
, "mauka"
|
||||
, "etesian"
|
||||
, "knik"
|
||||
, "katabatic"
|
||||
, "kite"
|
||||
|
|
|
@ -202,6 +202,31 @@
|
|||
endmacro(setup_boost)
|
||||
|
||||
|
||||
#
|
||||
# Find Qt, the union of all the modules we need for the whole project.
|
||||
#
|
||||
macro(setup_qt)
|
||||
# For Qt4.
|
||||
#set(QT_USE_QTXML "true")
|
||||
#find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||
|
||||
# For Qt5
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Gui REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5PrintSupport REQUIRED)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(QtX_INCLUDE_DIR ${Qt5PrintSupport_INCLUDE_DIR}
|
||||
${Qt5Widgets_INCLUDE_DIR}
|
||||
${Qt5Gui_INCLUDE_DIR}
|
||||
${Qt5Core_INCLUDE_DIR} )
|
||||
set(QtX_LIBRARIES ${Qt5PrintSupport_LIBRARIES}
|
||||
${Qt5Widgets_LIBRARIES}
|
||||
${Qt5Gui_LIBRARIES}
|
||||
${Qt5Core_LIBRARIES} )
|
||||
endmacro()
|
||||
|
||||
|
||||
#
|
||||
# Guess the value of SYS_CONF_DIR according to INSTALLDIR.
|
||||
# if INSTALLDIR is either /usr or /opt, we uses the system-wide /etc,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(CRLCORE)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
OPTION(BUILD_DOC "Build the documentation (latex+doxygen)" OFF)
|
||||
|
||||
|
@ -17,32 +17,25 @@
|
|||
set_lib_link_mode()
|
||||
setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
|
||||
setup_boost(program_options python regex wave)
|
||||
message(STATUS "${Boost_LIBRARIES}")
|
||||
setup_qt()
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(LEFDEF)
|
||||
find_package(OPENACCESS)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
#if(BUILD_DOC)
|
||||
# include(UseLATEX)
|
||||
#endif(BUILD_DOC)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(etc)
|
||||
add_subdirectory(cmake_modules)
|
||||
|
||||
if(BUILD_DOC)
|
||||
FIND_PACKAGE(Doxygen)
|
||||
endif(BUILD_DOC)
|
||||
|
||||
if(BUILD_DOC)
|
||||
# include(UseLATEX)
|
||||
find_package(Doxygen)
|
||||
add_subdirectory(doc)
|
||||
endif(BUILD_DOC)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<crlcore/src/ccore>" -*-
|
||||
|
||||
# Try to find a reasonable CORIOLIS_TOP value.
|
||||
if( NOT("$ENV{CORIOLIS_USER_TOP}" STREQUAL "") )
|
||||
|
@ -9,7 +10,7 @@
|
|||
endif( NOT("$ENV{CORIOLIS_USER_TOP}" STREQUAL "") )
|
||||
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${CRLCORE_SOURCE_DIR}/src/fonts
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore
|
||||
|
@ -17,6 +18,7 @@
|
|||
${CRLCORE_SOURCE_DIR}/src/ccore/bookshelf
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/acmsigda
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/ispd04
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/ispd05
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/iccad04
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/cspice
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/lefdef
|
||||
|
@ -32,6 +34,7 @@
|
|||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
${Boost_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}"
|
||||
|
@ -61,6 +64,7 @@
|
|||
crlcore/AcmSigda.h
|
||||
crlcore/Iccad04Lefdef.h
|
||||
crlcore/Ispd04Bookshelf.h
|
||||
crlcore/Ispd05Bookshelf.h
|
||||
crlcore/Ioc.h
|
||||
crlcore/NetExtension.h
|
||||
crlcore/Measures.h
|
||||
|
@ -146,6 +150,7 @@
|
|||
)
|
||||
set ( iccad04_cpps iccad04/Iccad04Lefdef.cpp )
|
||||
set ( ispd04_cpps ispd04/Ispd04Bookshelf.cpp )
|
||||
set ( ispd05_cpps ispd05/Ispd05Bookshelf.cpp )
|
||||
if ( LEFDEF_FOUND )
|
||||
include_directories ( ${LEFDEF_INCLUDE_DIR} )
|
||||
endif ( LEFDEF_FOUND )
|
||||
|
@ -272,7 +277,7 @@
|
|||
set_source_files_properties ( ${AcmSigdaParserGrammarCpp} GENERATED )
|
||||
|
||||
|
||||
qt4_wrap_cpp ( moc_cpps ${mocincludes} )
|
||||
qt5_wrap_cpp ( moc_cpps ${mocincludes} )
|
||||
|
||||
add_library ( crlcore ${ccore_cpps}
|
||||
${moc_cpps}
|
||||
|
@ -290,6 +295,7 @@
|
|||
${acmsigda_parser_cpps}
|
||||
${iccad04_cpps}
|
||||
${ispd04_cpps}
|
||||
${ispd05_cpps}
|
||||
${spice_cpps}
|
||||
${lefdef_cpps}
|
||||
${openaccess_cpps}
|
||||
|
@ -304,7 +310,7 @@
|
|||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | Alliance / Hurricane Interface |
|
||||
// | |
|
||||
|
@ -12,28 +12,22 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./crlcore/CellGauge.h" |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef __CRL_CELL_GAUGE_H__
|
||||
#define __CRL_CELL_GAUGE_H__
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "hurricane/Commons.h"
|
||||
#include "hurricane/DbU.h"
|
||||
#include "hurricane/Name.h"
|
||||
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/XmlParser.h"
|
||||
|
||||
#ifndef CRL_CELL_GAUGE_H
|
||||
#define CRL_CELL_GAUGE_H
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include "hurricane/Commons.h"
|
||||
#include "hurricane/DbU.h"
|
||||
#include "hurricane/Name.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
|
||||
using std::string;
|
||||
using std::map;
|
||||
|
||||
|
@ -103,7 +97,6 @@ namespace CRL {
|
|||
inline const DbU::Unit CellGauge::getSliceStep () const { return _sliceStep; }
|
||||
|
||||
|
||||
} // End of namespace CRL.
|
||||
} // namespace CRL.
|
||||
|
||||
|
||||
#endif // __CRL_CELL_GAUGE_H__
|
||||
#endif // CRL_CELL_GAUGE_H
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | ISPD05 IBM Standard Cell Benchmarks |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./crlcore/Ispd05Bookshelf.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef CRL_ISPD05_BOOKSHELF
|
||||
#define CRL_ISPD05_BOOKSHELF
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Hurricane {
|
||||
class Cell;
|
||||
}
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using Hurricane::Cell;
|
||||
|
||||
|
||||
class Ispd05 {
|
||||
public:
|
||||
static Cell* load ( std::string benchmark );
|
||||
};
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
||||
|
||||
|
||||
#endif // CRL_ISPD05_BOOKSHELF
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | ISPD04 IBM Standard Cell Benchmarks |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./Ispd05Bookshelf.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <memory>
|
||||
#include "vlsisapd/bookshelf/Exception.h"
|
||||
#include "vlsisapd/bookshelf/Node.h"
|
||||
#include "vlsisapd/bookshelf/Pin.h"
|
||||
#include "vlsisapd/bookshelf/Net.h"
|
||||
#include "vlsisapd/bookshelf/Circuit.h"
|
||||
#include "hurricane/Error.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/NetExternalComponents.h"
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/Vertical.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Library.h"
|
||||
#include "hurricane/UpdateSession.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
#include "crlcore/ToolBox.h"
|
||||
#include "crlcore/Ispd05Bookshelf.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace std;
|
||||
using namespace Hurricane;
|
||||
using namespace CRL;
|
||||
|
||||
|
||||
void addSupplyNets ( Cell* cell )
|
||||
{
|
||||
Net* vss = Net::create ( cell, "vss" );
|
||||
vss->setExternal ( true );
|
||||
vss->setGlobal ( true );
|
||||
vss->setType ( Net::Type::GROUND );
|
||||
|
||||
Net* vdd = Net::create ( cell, "vdd" );
|
||||
vdd->setExternal ( true );
|
||||
vdd->setGlobal ( true );
|
||||
vdd->setType ( Net::Type::POWER );
|
||||
}
|
||||
|
||||
|
||||
Cell* toMasterCell ( AllianceFramework* af, Bookshelf::Node* node )
|
||||
{
|
||||
if ( node->getHeight() > 16.0 ) return NULL;
|
||||
|
||||
Technology* technology = DataBase::getDB()->getTechnology();
|
||||
Layer* METAL1 = technology->getLayer ( "METAL1" );
|
||||
|
||||
Cell* master = af->createCell ( node->getName() );
|
||||
Box abutmentBox ( DbU::lambda( 0.0 )
|
||||
, DbU::lambda( 0.0 )
|
||||
, DbU::lambda( node->getWidth()*5.0 )
|
||||
, DbU::lambda( 50.0 )
|
||||
);
|
||||
master->setAbutmentBox ( abutmentBox );
|
||||
|
||||
addSupplyNets ( master );
|
||||
|
||||
Segment* segment = Horizontal::create ( master->getNet("vss")
|
||||
, METAL1
|
||||
, abutmentBox.getYMin()+DbU::lambda(3.0)
|
||||
, DbU::lambda(6.0)
|
||||
, abutmentBox.getXMin()
|
||||
, abutmentBox.getXMax()
|
||||
);
|
||||
NetExternalComponents::setExternal ( segment );
|
||||
|
||||
segment = Horizontal::create ( master->getNet("vdd")
|
||||
, METAL1
|
||||
, abutmentBox.getYMax()-DbU::lambda(3.0)
|
||||
, DbU::lambda( 6.0)
|
||||
, abutmentBox.getXMin()
|
||||
, abutmentBox.getXMax()
|
||||
);
|
||||
NetExternalComponents::setExternal ( segment );
|
||||
|
||||
map<size_t,Bookshelf::Pin*>& pins = node->getPins();
|
||||
map<size_t,Bookshelf::Pin*>::iterator ipin = pins.begin();
|
||||
|
||||
if ( node->getWidth() < (double)pins.size() )
|
||||
throw Error("Ispd05::load(): Node <%s> has only %.1f pitchs, cannot hold %zd terminals."
|
||||
,node->getName().c_str(),node->getWidth(),pins.size());
|
||||
|
||||
DbU::Unit pinXMin = abutmentBox.getXMin() + DbU::lambda(5.0);
|
||||
DbU::Unit pinXMax = abutmentBox.getXMax() - ((node->getWidth() > (double)pins.size()) ? DbU::lambda(5.0) : 0);
|
||||
DbU::Unit pinX;
|
||||
|
||||
for ( size_t pinnb=0 ; ipin != pins.end() ; ++ipin, ++pinnb ) {
|
||||
Net* net = Net::create ( master, (*ipin).second->getNet()->getName() );
|
||||
net->setExternal ( true );
|
||||
|
||||
if ( pinnb % 2 ) {
|
||||
pinX = pinXMax;
|
||||
pinXMax -= DbU::lambda(5.0);
|
||||
} else {
|
||||
pinX = pinXMin;
|
||||
pinXMin += DbU::lambda(5.0);
|
||||
}
|
||||
|
||||
segment = Vertical::create ( net
|
||||
, METAL1
|
||||
, pinX
|
||||
, DbU::lambda(1.0)
|
||||
, abutmentBox.getYMin() + DbU::lambda(10.0)
|
||||
, abutmentBox.getYMax() - DbU::lambda(10.0)
|
||||
);
|
||||
NetExternalComponents::setExternal ( segment );
|
||||
}
|
||||
|
||||
return master;
|
||||
}
|
||||
|
||||
|
||||
} // End of anonymous namespace.
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using std::string;
|
||||
using std::map;
|
||||
using std::auto_ptr;
|
||||
using Hurricane::Library;
|
||||
using Hurricane::Transformation;
|
||||
using Hurricane::UpdateSession;
|
||||
|
||||
|
||||
Cell* Ispd05::load ( string benchmark )
|
||||
{
|
||||
AllianceFramework* af = AllianceFramework::get ();
|
||||
|
||||
UpdateSession::open ();
|
||||
|
||||
auto_ptr<Bookshelf::Circuit> circuit ( Bookshelf::Circuit::parse(benchmark) );
|
||||
|
||||
Cell* cell = af->createCell ( benchmark );
|
||||
|
||||
addSupplyNets ( cell );
|
||||
|
||||
vector<Bookshelf::Net*>& nets = circuit->getNets ();
|
||||
vector<Bookshelf::Net*>::iterator inet = nets.begin();
|
||||
for ( ; inet != nets.end() ; ++inet ) {
|
||||
Net::create ( cell, (*inet)->getName() );
|
||||
}
|
||||
|
||||
map<string,Bookshelf::Node*>& nodes = circuit->getNodes();
|
||||
map<string,Bookshelf::Node*>::iterator inode = nodes.begin();
|
||||
|
||||
Box abutmentBox;
|
||||
|
||||
for ( ; inode != nodes.end() ; ++inode ) {
|
||||
Bookshelf::Node* node = (*inode).second;
|
||||
|
||||
if ( node->isTerminal () ) continue;
|
||||
Cell* master = toMasterCell ( af, node );
|
||||
|
||||
if ( master == NULL ) {
|
||||
cerr << Warning("Skipping megacell <%s>.",node->getName().c_str()) << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
Instance* instance = Instance::create ( cell, node->getName(), master );
|
||||
|
||||
map<size_t,Bookshelf::Pin*>& pins = node->getPins();
|
||||
map<size_t,Bookshelf::Pin*>::iterator ipin = pins.begin();
|
||||
|
||||
for ( size_t pinnb=0 ; ipin != pins.end() ; ++ipin, ++pinnb ) {
|
||||
Name netName ( (*ipin).second->getNet()->getName());
|
||||
Net* masterNet = master->getNet ( netName );
|
||||
instance->getPlug ( masterNet )->setNet ( cell->getNet(netName) );
|
||||
|
||||
DbU::Unit x = DbU::lambda( node->getX() * 5.0);
|
||||
DbU::Unit y = DbU::lambda((node->getY()/16.0) * 50.0);
|
||||
|
||||
if ( node->getOrientation() != Bookshelf::Orientation::N ) {
|
||||
cerr << Warning("Skipping cell <%s>, unsupported orientation.",node->getName().c_str()) << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
Box masterABox = master->getAbutmentBox();
|
||||
Transformation::Orientation orientation
|
||||
= ( (int)(node->getY())%32 ) ? Transformation::Orientation::MY
|
||||
: Transformation::Orientation::ID;
|
||||
//Transformation::Orientation orientation = Transformation::Orientation::ID;
|
||||
Transformation instanceTransformation = getTransformation(masterABox, x, y, orientation);
|
||||
|
||||
instance->setTransformation ( instanceTransformation );
|
||||
instance->setPlacementStatus ( Instance::PlacementStatus::PLACED );
|
||||
|
||||
abutmentBox.merge ( instance->getAbutmentBox() );
|
||||
}
|
||||
}
|
||||
cell->setAbutmentBox ( abutmentBox );
|
||||
|
||||
UpdateSession::close ();
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
} // End of CRL namespace.
|
|
@ -1,8 +1,10 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<crlcore/src/ccore/cyclop>" -*-
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${UTILITIES_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
|
@ -15,11 +17,11 @@
|
|||
CyclopMain.cpp
|
||||
)
|
||||
|
||||
qt4_wrap_cpp ( MOCcpps ${mocincludes} )
|
||||
qt5_wrap_cpp ( MOCcpps ${mocincludes} )
|
||||
|
||||
link_directories ( ${CRLCORE_BINARY_DIR}/src/ccore )
|
||||
|
||||
add_executable ( cyclop ${cpps} ${MOCcpps} )
|
||||
add_executable ( cyclop ${cpps} )
|
||||
target_link_libraries ( cyclop crlcore
|
||||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||
|
@ -31,7 +33,7 @@
|
|||
${UTILITIES_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${PYTHON_LIBRARIES}
|
||||
-lutil
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2008-2013, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -24,7 +23,9 @@ using namespace std;
|
|||
namespace boptions = boost::program_options;
|
||||
|
||||
#include <QtGui>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
# include <QGtkStyle>
|
||||
#endif
|
||||
|
||||
|
@ -196,7 +197,9 @@ int main ( int argc, char *argv[] )
|
|||
|
||||
if ( not textMode ) {
|
||||
auto_ptr<QApplication> qa ( new HApplication(argc,argv) );
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
qa->setStyle ( new QGtkStyle() );
|
||||
#endif
|
||||
Graphics::enable ();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<crlcore/src/pyCRL>" -*-
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
include_directories ( ${CRLCORE_SOURCE_DIR}/src/fonts
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore
|
||||
${CRLCORE_SOURCE_DIR}/src/ccore/properties
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<crlcore/src/x2y> -*-
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${UTILITIES_INCLUDE_DIR}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<smurf>" -*-
|
||||
|
||||
project(SMURF)
|
||||
|
||||
option(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
setup_project_paths(CORIOLIS)
|
||||
|
||||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options python regex)
|
||||
setup_qt()
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(AXEP REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(LEFDEF REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(cmake_modules)
|
||||
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
# if(DOXYGEN_FOUND)
|
||||
# add_subdirectory(doc)
|
||||
# endif()
|
||||
endif()
|
|
@ -0,0 +1 @@
|
|||
install ( FILES FindSMURF.cmake DESTINATION share/cmake/Modules )
|
|
@ -0,0 +1,37 @@
|
|||
# - Find the Smurf includes and libraries.
|
||||
# The following variables are set if Coriolis is found. If SMURF is not
|
||||
# found, SMURF_FOUND is set to false.
|
||||
# SMURF_FOUND - True when the Coriolis include directory is found.
|
||||
# SMURF_INCLUDE_DIR - the path to where the Coriolis include files are.
|
||||
# SMURF_LIBRARIES - The path to where the Coriolis library files are.
|
||||
|
||||
|
||||
SET(SMURF_INCLUDE_PATH_DESCRIPTION "directory containing the Smurf include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
|
||||
|
||||
SET(SMURF_DIR_MESSAGE "Set the SMURF_INCLUDE_DIR cmake cache entry to the ${SMURF_INCLUDE_PATH_DESCRIPTION}")
|
||||
|
||||
# don't even bother under WIN32
|
||||
IF(UNIX)
|
||||
#
|
||||
# Look for an installation.
|
||||
#
|
||||
FIND_PATH(SMURF_INCLUDE_PATH NAMES smurf/SmurfEngine.h PATHS
|
||||
# Look in other places.
|
||||
${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES include/coriolis
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${SMURF_INCLUDE_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SMURF_LIBRARY_PATH
|
||||
NAMES smurf
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib${LIB_SUFFIX}
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${SMURF_INCLUDE_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
SET_LIBRARIES_PATH(SMURF SMURF)
|
||||
HURRICANE_CHECK_LIBRARIES(SMURF)
|
||||
|
||||
ENDIF(UNIX)
|
|
@ -0,0 +1,66 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<smurf/src>" -*-
|
||||
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${SMURF_SOURCE_DIR}/src
|
||||
${AXEP_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
set ( includes smurf/Configuration.h
|
||||
smurf/SmurfEngine.h
|
||||
smurf/GraphicSmurfEngine.h
|
||||
)
|
||||
set ( pyIncludes smurf/PySmurfEngine.h
|
||||
smurf/PyGraphicSmurfEngine.h
|
||||
)
|
||||
set ( mocIncludes smurf/GraphicSmurfEngine.h )
|
||||
set ( cpps Configuration.cpp
|
||||
SmurfEngine.cpp
|
||||
GraphicSmurfEngine.cpp
|
||||
)
|
||||
set ( pyCpps PySmurf.cpp
|
||||
PySmurfEngine.cpp
|
||||
PyGraphicSmurfEngine.cpp
|
||||
)
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
add_library ( smurf ${cpps} ${mocCpps} ${pyCpps} )
|
||||
set_target_properties ( smurf PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( smurf ${CORIOLIS_LIBRARIES}
|
||||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||
${HURRICANE_LIBRARIES}
|
||||
${CONFIGURATION_LIBRARY}
|
||||
${BOOKSHELF_LIBRARY}
|
||||
${CIF_LIBRARY}
|
||||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
${LIBEXECINFO_LIBRARIES}
|
||||
)
|
||||
|
||||
add_library ( pySmurf MODULE ${pyCpps} )
|
||||
set_target_properties ( pySmurf PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||
PREFIX ""
|
||||
OUTPUT_NAME "Smurf"
|
||||
)
|
||||
|
||||
target_link_libraries ( pySmurf smurf
|
||||
${CORIOLIS_PYTHON_LIBRARIES}
|
||||
)
|
||||
install ( TARGETS smurf DESTINATION lib${LIB_SUFFIX} )
|
||||
install ( TARGETS pySmurf DESTINATION ${PYTHON_SITE_PACKAGES} )
|
||||
|
||||
install ( FILES ${includes}
|
||||
${mocIncludes}
|
||||
${pyIncludes} DESTINATION include/coriolis2/smurf )
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
// -*- mode: C++; explicit-buffer-name: "Configuration.cpp<smurf>" -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | 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 "smurf/Configuration.h"
|
||||
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
|
||||
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 : "Smurf::Configuration".
|
||||
|
||||
|
||||
Configuration::Configuration () { }
|
||||
Configuration::~Configuration () { }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Smurf::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<Smurf> 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 );
|
||||
}
|
||||
|
||||
|
||||
} // smurf namespace.
|
|
@ -0,0 +1,220 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./GraphicSmurfEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <functional>
|
||||
#include <boost/bind.hpp>
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QApplication>
|
||||
#include <hurricane/Warning.h>
|
||||
#include <hurricane/Error.h>
|
||||
#include <hurricane/Breakpoint.h>
|
||||
#include <hurricane/DebugSession.h>
|
||||
#include <hurricane/Go.h>
|
||||
#include <hurricane/Net.h>
|
||||
#include <hurricane/Cell.h>
|
||||
#include <hurricane/UpdateSession.h>
|
||||
#include <hurricane/viewer/Graphics.h>
|
||||
#include <hurricane/viewer/CellWidget.h>
|
||||
#include <hurricane/viewer/CellViewer.h>
|
||||
#include <hurricane/viewer/ControllerWidget.h>
|
||||
#include <crlcore/Utilities.h>
|
||||
#include <crlcore/AllianceFramework.h>
|
||||
#include <smurf/GraphicSmurfEngine.h>
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Breakpoint;
|
||||
using Hurricane::DebugSession;
|
||||
using Hurricane::UpdateSession;
|
||||
using Hurricane::Point;
|
||||
using Hurricane::Net;
|
||||
using Hurricane::Graphics;
|
||||
using Hurricane::ColorScale;
|
||||
using Hurricane::ControllerWidget;
|
||||
using CRL::Catalog;
|
||||
using CRL::AllianceFramework;
|
||||
|
||||
|
||||
size_t GraphicSmurfEngine::_references = 0;
|
||||
GraphicSmurfEngine* GraphicSmurfEngine::_singleton = NULL;
|
||||
|
||||
|
||||
SmurfEngine* GraphicSmurfEngine::createEngine ()
|
||||
{
|
||||
Cell* cell = getCell ();
|
||||
|
||||
SmurfEngine* smurf = SmurfEngine::get( cell );
|
||||
if (not smurf) {
|
||||
smurf = SmurfEngine::create( cell );
|
||||
} else
|
||||
cerr << Warning( "%s already has a Smurf engine.", getString(cell).c_str() ) << endl;
|
||||
|
||||
return smurf;
|
||||
}
|
||||
|
||||
|
||||
SmurfEngine* GraphicSmurfEngine::getForFramework ()
|
||||
{
|
||||
// Currently, only one framework is avalaible: Alliance.
|
||||
|
||||
SmurfEngine* smurf = SmurfEngine::get( getCell() );
|
||||
if (smurf) return smurf;
|
||||
|
||||
smurf = createEngine();
|
||||
|
||||
if (not smurf)
|
||||
throw Error( "Failed to create Smurf engine on %s.", getString(getCell()).c_str() );
|
||||
|
||||
return smurf;
|
||||
}
|
||||
|
||||
|
||||
void GraphicSmurfEngine::place ()
|
||||
{
|
||||
SmurfEngine* smurf = SmurfEngine::get( getCell() );
|
||||
if (not smurf) {
|
||||
smurf = createEngine();
|
||||
}
|
||||
//if (cmess1.enabled()) smurf->printConfiguration();
|
||||
|
||||
emit cellPreModificated();
|
||||
_viewer->clearToolInterrupt();
|
||||
smurf->place();
|
||||
emit cellPostModificated();
|
||||
}
|
||||
|
||||
|
||||
void GraphicSmurfEngine::postEvent ()
|
||||
{
|
||||
static unsigned int count = 0;
|
||||
|
||||
if (not (count++ % 500)) {
|
||||
QApplication::processEvents();
|
||||
|
||||
// if (_viewer->isToolInterrupted()) {
|
||||
// SmurfEngine* smurf = SmurfEngine::get( getCell() );
|
||||
// if (smurf) smurf->setInterrupt( true );
|
||||
// _viewer->clearToolInterrupt();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GraphicSmurfEngine::addToMenu ( CellViewer* viewer )
|
||||
{
|
||||
assert( _viewer == NULL );
|
||||
|
||||
_viewer = viewer;
|
||||
|
||||
QMenu* prMenu = _viewer->findChild<QMenu*>("viewer.menuBar.placeAndRoute");
|
||||
QMenu* stepMenu = _viewer->findChild<QMenu*>("viewer.menuBar.placeAndRoute.stepByStep");
|
||||
if (prMenu == NULL) {
|
||||
QMenuBar* menuBar = _viewer->findChild<QMenuBar*>("viewer.menuBar");
|
||||
if (menuBar == NULL) {
|
||||
cerr << Warning( "GraphicSmurfEngine::addToMenu() - No MenuBar in parent widget." ) << endl;
|
||||
return;
|
||||
}
|
||||
prMenu = menuBar->addMenu( tr("P&&R") );
|
||||
prMenu->setObjectName( "viewer.menuBar.placeAndRoute" );
|
||||
|
||||
stepMenu = prMenu->addMenu( tr("&Step by Step") );
|
||||
stepMenu->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep" );
|
||||
|
||||
prMenu->addSeparator();
|
||||
}
|
||||
|
||||
QAction* placeAction = _viewer->findChild<QAction*>("viewer.menuBar.placeAndRoute.place");
|
||||
if (placeAction)
|
||||
cerr << Warning( "GraphicSmurfEngine::addToMenu() - Smurf detailed router already hooked in." ) << endl;
|
||||
else {
|
||||
QAction* placeAction = new QAction ( tr("Smurf - &Place"), _viewer );
|
||||
placeAction->setObjectName( "viewer.menuBar.placeAndRoute.place" );
|
||||
placeAction->setStatusTip ( tr("Place the design") );
|
||||
placeAction->setVisible ( true );
|
||||
prMenu->addAction( placeAction );
|
||||
|
||||
connect( placeAction , SIGNAL(triggered()), this, SLOT(place ()) );
|
||||
}
|
||||
|
||||
connect( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) );
|
||||
connect( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) );
|
||||
}
|
||||
|
||||
|
||||
const Name& GraphicSmurfEngine::getName () const
|
||||
{ return SmurfEngine::staticGetName(); }
|
||||
|
||||
|
||||
Cell* GraphicSmurfEngine::getCell ()
|
||||
{
|
||||
if (_viewer == NULL) {
|
||||
throw Error( "<b>Smurf:</b> GraphicSmurfEngine not bound to any Viewer." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (_viewer->getCell() == NULL) {
|
||||
throw Error( "<b>Smurf:</b> No Cell is loaded into the Viewer." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return _viewer->getCell();
|
||||
}
|
||||
|
||||
|
||||
GraphicSmurfEngine* GraphicSmurfEngine::grab ()
|
||||
{
|
||||
if (not _references) {
|
||||
_singleton = new GraphicSmurfEngine ();
|
||||
}
|
||||
_references++;
|
||||
|
||||
return _singleton;
|
||||
}
|
||||
|
||||
|
||||
size_t GraphicSmurfEngine::release ()
|
||||
{
|
||||
--_references;
|
||||
if (not _references) {
|
||||
delete _singleton;
|
||||
_singleton = NULL;
|
||||
}
|
||||
return _references;
|
||||
}
|
||||
|
||||
|
||||
GraphicSmurfEngine::GraphicSmurfEngine ()
|
||||
: GraphicTool()
|
||||
, _viewer (NULL)
|
||||
{
|
||||
// addDrawGo( "Knik::Edge" , GraphicKnikEngine::initKnikEdges , GraphicKnikEngine::drawKnikEdges );
|
||||
// addDrawGo( "Knik::Vertex" , GraphicKnikEngine::initKnikVertex, GraphicKnikEngine::drawKnikVertex );
|
||||
// addDrawGo( "Katabatic::Ac" , initKatabaticAc , drawKatabaticAc );
|
||||
// addDrawGo( "Katabatic::GCell", initKatabaticGCell, drawKatabaticGCell );
|
||||
}
|
||||
|
||||
|
||||
GraphicSmurfEngine::~GraphicSmurfEngine ()
|
||||
{ }
|
||||
|
||||
|
||||
} // Smurf namespace.
|
|
@ -0,0 +1,123 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyGraphicSmurfEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "smurf/PyGraphicSmurfEngine.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/Cell.h"
|
||||
|
||||
|
||||
#undef ACCESS_OBJECT
|
||||
#undef ACCESS_CLASS
|
||||
#define ACCESS_OBJECT _baseObject._object
|
||||
#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(GraphicSmurfEngine,gtool,function)
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using namespace Hurricane;
|
||||
using namespace Isobar;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyGraphicSmurfEngine" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// +-------------------------------------------------------------+
|
||||
// | "PyGraphicSmurfEngine" Attribute Methods |
|
||||
// +-------------------------------------------------------------+
|
||||
|
||||
|
||||
static PyObject* PyGraphicSmurfEngine_grab ( PyObject* )
|
||||
{
|
||||
trace << "PyGraphicSmurfEngine_grab()" << endl;
|
||||
PyGraphicSmurfEngine* pyGraphicSmurfEngine = NULL;
|
||||
|
||||
HTRY
|
||||
pyGraphicSmurfEngine = PyObject_NEW ( PyGraphicSmurfEngine, &PyTypeGraphicSmurfEngine );
|
||||
if ( pyGraphicSmurfEngine == NULL ) return NULL;
|
||||
|
||||
pyGraphicSmurfEngine->ACCESS_OBJECT = GraphicSmurfEngine::grab();
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyGraphicSmurfEngine;
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyGraphicSmurfEngine_getCell ( PyGraphicSmurfEngine* self )
|
||||
{
|
||||
trace << "PyGraphicSmurfEngine_getCell ()" << endl;
|
||||
|
||||
Cell* cell = NULL;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("GraphicSmurfEngine.getCell()")
|
||||
cell = gtool->getCell ();
|
||||
HCATCH
|
||||
|
||||
if (cell == NULL) Py_RETURN_NONE;
|
||||
return PyCell_Link(cell);
|
||||
}
|
||||
|
||||
|
||||
GetNameMethod(GraphicSmurfEngine, gtool)
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
|
||||
|
||||
PyMethodDef PyGraphicSmurfEngine_Methods[] =
|
||||
{ { "grab" , (PyCFunction)PyGraphicSmurfEngine_grab , METH_NOARGS|METH_STATIC
|
||||
, "Returns the GraphicSmurfEngine singleton." }
|
||||
, { "getName" , (PyCFunction)PyGraphicSmurfEngine_getName , METH_NOARGS
|
||||
, "Returns the name of the GraphicSmurfEngine (class attribute)." }
|
||||
, { "getCell" , (PyCFunction)PyGraphicSmurfEngine_getCell , METH_NOARGS
|
||||
, "Returns the Cell on which this GraphicSmurfEngine is attached." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyGraphicSmurfEngine Type Methods.
|
||||
|
||||
|
||||
PythonOnlyDeleteMethod(GraphicSmurfEngine)
|
||||
PyTypeObjectLinkPyType(GraphicSmurfEngine)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyGraphicSmurfEngine" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
// Link/Creation Method.
|
||||
LinkCreateMethod(GraphicSmurfEngine)
|
||||
|
||||
PyTypeInheritedObjectDefinitions(GraphicSmurfEngine,GraphicTool)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // CRL namespace.
|
|
@ -0,0 +1,104 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PySmurf.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "smurf/PySmurfEngine.h"
|
||||
#include "smurf/PyGraphicSmurfEngine.h"
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::in_trace;
|
||||
using Isobar::__cs;
|
||||
using CRL::PyTypeToolEngine;
|
||||
using CRL::PyTypeGraphicTool;
|
||||
|
||||
|
||||
#if !defined(__PYTHON_MODULE__)
|
||||
|
||||
// +=================================================================+
|
||||
// | "PySmurf" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
# else // End of PyHurricane Shared Library Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PySmurf" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// +-------------------------------------------------------------+
|
||||
// | "PySmurf" Module Methods |
|
||||
// +-------------------------------------------------------------+
|
||||
|
||||
|
||||
static PyMethodDef PySmurf_Methods[] =
|
||||
{ {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Module Initialization : "initSmurf ()"
|
||||
|
||||
DL_EXPORT(void) initSmurf () {
|
||||
trace << "initSmurf()" << endl;
|
||||
|
||||
PySmurfEngine_LinkPyType();
|
||||
PyGraphicSmurfEngine_LinkPyType();
|
||||
|
||||
PYTYPE_READY_SUB( SmurfEngine , ToolEngine );
|
||||
PYTYPE_READY_SUB( GraphicSmurfEngine, GraphicTool );
|
||||
|
||||
|
||||
PyObject* module = Py_InitModule( "Smurf", PySmurf_Methods );
|
||||
if (module == NULL) {
|
||||
cerr << "[ERROR]\n"
|
||||
<< " Failed to initialize Smurf module." << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
Py_INCREF( &PyTypeSmurfEngine );
|
||||
PyModule_AddObject( module, "SmurfEngine", (PyObject*)&PyTypeSmurfEngine );
|
||||
Py_INCREF( &PyTypeGraphicSmurfEngine );
|
||||
PyModule_AddObject( module, "GraphicSmurfEngine", (PyObject*)&PyTypeGraphicSmurfEngine );
|
||||
|
||||
//PyObject* dictionnary = PyModule_GetDict( module );
|
||||
//PyObject* constant;
|
||||
|
||||
//LoadObjectConstant( dictionnary, KtBuildGlobalRouting, "KtBuildGlobalRouting" );
|
||||
//LoadObjectConstant( dictionnary, KtLoadGlobalRouting , "KtLoadGlobalRouting" );
|
||||
}
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
#endif // End of Python Module Code Part.
|
||||
|
||||
|
||||
} // End of Smurf namespace.
|
|
@ -0,0 +1,186 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PySmurfEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "smurf/PySmurfEngine.h"
|
||||
|
||||
# undef ACCESS_OBJECT
|
||||
# undef ACCESS_CLASS
|
||||
# define ACCESS_OBJECT _baseObject._object
|
||||
# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(SmurfEngine,smurf,function)
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
using std::ostringstream;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::in_trace;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Isobar::ProxyProperty;
|
||||
using Isobar::ProxyError;
|
||||
using Isobar::ConstructorError;
|
||||
using Isobar::HurricaneError;
|
||||
using Isobar::HurricaneWarning;
|
||||
using Isobar::ParseOneArg;
|
||||
using Isobar::ParseTwoArg;
|
||||
using Isobar::PyCell;
|
||||
using Isobar::PyCell_Link;
|
||||
using CRL::PyToolEngine;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PySmurfEngine" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
static PyObject* PySmurfEngine_get ( PyObject*, PyObject* args )
|
||||
{
|
||||
trace << "PySmurfEngine_get()" << endl;
|
||||
|
||||
SmurfEngine* smurf = NULL;
|
||||
|
||||
HTRY
|
||||
PyObject* arg0;
|
||||
|
||||
if (not ParseOneArg("Smurf.get", args, CELL_ARG, &arg0)) return NULL;
|
||||
smurf = SmurfEngine::get(PYCELL_O(arg0));
|
||||
HCATCH
|
||||
|
||||
return PySmurfEngine_Link(smurf);
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PySmurfEngine_create ( PyObject*, PyObject* args )
|
||||
{
|
||||
trace << "PySmurfEngine_create()" << endl;
|
||||
|
||||
SmurfEngine* smurf = NULL;
|
||||
|
||||
HTRY
|
||||
PyObject* arg0;
|
||||
|
||||
if (not ParseOneArg("Smurf.get", args, CELL_ARG, &arg0)) return NULL;
|
||||
|
||||
Cell* cell = PYCELL_O(arg0);
|
||||
smurf = SmurfEngine::get(cell);
|
||||
|
||||
if (smurf == NULL) {
|
||||
smurf = SmurfEngine::create(cell);
|
||||
//if (cmess1.enabled())
|
||||
// smurf->getSmurfConfiguration()->print(cell);
|
||||
} else
|
||||
cerr << Warning("%s already has a Smurf engine.",getString(cell).c_str()) << endl;
|
||||
HCATCH
|
||||
|
||||
return PySmurfEngine_Link(smurf);
|
||||
}
|
||||
|
||||
|
||||
PyObject* PySmurfEngine_place ( PySmurfEngine* self, PyObject* args )
|
||||
{
|
||||
trace << "PySmurfEngine_place()" << endl;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("SmurfEngine.place()")
|
||||
unsigned int flags = 0;
|
||||
if (PyArg_ParseTuple(args,"I:SmurfEngine.place", &flags)) {
|
||||
smurf->place(/*flags*/);
|
||||
} else {
|
||||
PyErr_SetString(ConstructorError, "SmurfEngine.place(): Invalid number/bad type of parameter.");
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
// DirectVoidMethod(SmurfEngine,smurf,runNegociate)
|
||||
// DirectVoidMethod(SmurfEngine,smurf,printConfiguration)
|
||||
// DirectVoidMethod(SmurfEngine,smurf,saveGlobalSolution)
|
||||
// DirectVoidMethod(SmurfEngine,smurf,finalizeLayout)
|
||||
// DirectVoidMethod(SmurfEngine,smurf,dumpMeasures)
|
||||
// DirectGetBoolAttribute(PySmurfEngine_getToolSuccess,getToolSuccess,PySmurfEngine,SmurfEngine)
|
||||
|
||||
// Standart Destroy (Attribute).
|
||||
DBoDestroyAttribute(PySmurfEngine_destroy,PySmurfEngine)
|
||||
|
||||
|
||||
PyMethodDef PySmurfEngine_Methods[] =
|
||||
{ { "get" , (PyCFunction)PySmurfEngine_get , METH_VARARGS|METH_STATIC
|
||||
, "Returns the Smurf engine attached to the Cell, None if there isnt't." }
|
||||
, { "create" , (PyCFunction)PySmurfEngine_create , METH_VARARGS|METH_STATIC
|
||||
, "Create a Smurf engine on this cell." }
|
||||
// , { "printConfiguration", (PyCFunction)PySmurfEngine_printConfiguration, METH_NOARGS
|
||||
// , "Display on the console the configuration of Smurf." }
|
||||
// , { "saveGlobalSolution", (PyCFunction)PySmurfEngine_saveGlobalSolution, METH_NOARGS
|
||||
// , "Save the global routing solution on disk." }
|
||||
// , { "getToolSuccess" , (PyCFunction)PySmurfEngine_getToolSuccess , METH_NOARGS
|
||||
// , "Returns True if the detailed routing has been successful." }
|
||||
// , { "loadGlobalRouting" , (PyCFunction)PySmurfEngine_loadGlobalRouting , METH_VARARGS
|
||||
// , "Read/load the global routing and build topologies for Smurf." }
|
||||
, { "place" , (PyCFunction)PySmurfEngine_place , METH_VARARGS
|
||||
, "Run the global router (Knik)." }
|
||||
// , { "layerAssign" , (PyCFunction)PySmurfEngine_layerAssign , METH_VARARGS
|
||||
// , "Run the layer assigment stage." }
|
||||
// , { "runNegociate" , (PyCFunction)PySmurfEngine_runNegociate , METH_NOARGS
|
||||
// , "Run the negociation stage of the detailed router." }
|
||||
// , { "finalizeLayout" , (PyCFunction)PySmurfEngine_finalizeLayout , METH_NOARGS
|
||||
// , "Revert to a pure Hurricane database, remove router's additionnal data structures." }
|
||||
// , { "dumpMeasures" , (PyCFunction)PySmurfEngine_dumpMeasures , METH_NOARGS
|
||||
// , "Dump to disk lots of statistical informations about the routing." }
|
||||
, { "destroy" , (PyCFunction)PySmurfEngine_destroy , METH_NOARGS
|
||||
, "Destroy the associated hurricane object. The python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
DBoDeleteMethod(SmurfEngine)
|
||||
PyTypeObjectLinkPyType(SmurfEngine)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PySmurfEngine" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
PyTypeInheritedObjectDefinitions(SmurfEngine,PyToolEngine)
|
||||
DBoLinkCreateMethod(SmurfEngine)
|
||||
|
||||
|
||||
#endif // Shared Library Code Part.
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Smurf namespace.
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./SmurfEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include "hurricane/DebugSession.h"
|
||||
#include "hurricane/Bug.h"
|
||||
#include "hurricane/Error.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/Breakpoint.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Pad.h"
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/Vertical.h"
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/UpdateSession.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/Measures.h"
|
||||
#include "smurf/SmurfEngine.h"
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::setw;
|
||||
using std::left;
|
||||
using std::string;
|
||||
using std::ostream;
|
||||
using std::ofstream;
|
||||
using std::ostringstream;
|
||||
using std::setprecision;
|
||||
using std::vector;
|
||||
using Hurricane::DebugSession;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::inltrace;
|
||||
using Hurricane::ltracein;
|
||||
using Hurricane::ltraceout;
|
||||
using Hurricane::ForEachIterator;
|
||||
using Hurricane::Bug;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Breakpoint;
|
||||
using Hurricane::Box;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::Cell;
|
||||
using CRL::ToolEngine;
|
||||
using CRL::addMeasure;
|
||||
using CRL::Measures;
|
||||
using CRL::MeasuresSet;
|
||||
|
||||
|
||||
const char* missingSmurf =
|
||||
"%s :\n\n"
|
||||
" Cell %s do not have any SmurfEngine (or not yet created).\n";
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Smurf::SmurfEngine".
|
||||
|
||||
Name SmurfEngine::_toolName = "Smurf";
|
||||
|
||||
|
||||
const Name& SmurfEngine::staticGetName ()
|
||||
{ return _toolName; }
|
||||
|
||||
|
||||
SmurfEngine* SmurfEngine::get ( const Cell* cell )
|
||||
{ return static_cast<SmurfEngine*>(ToolEngine::get(cell,staticGetName())); }
|
||||
|
||||
|
||||
SmurfEngine::SmurfEngine ( Cell* cell )
|
||||
: ToolEngine(cell)
|
||||
{ }
|
||||
|
||||
|
||||
void SmurfEngine::_postCreate ()
|
||||
{ }
|
||||
|
||||
|
||||
SmurfEngine* SmurfEngine::create ( Cell* cell )
|
||||
{
|
||||
SmurfEngine* smurf = new SmurfEngine ( cell );
|
||||
|
||||
smurf->_postCreate();
|
||||
return smurf;
|
||||
}
|
||||
|
||||
|
||||
void SmurfEngine::_preDestroy ()
|
||||
{
|
||||
ltrace(90) << "SmurfEngine::_preDestroy()" << endl;
|
||||
ltracein(90);
|
||||
|
||||
cmess1 << " o Deleting ToolEngine<" << getName() << "> from Cell <"
|
||||
<< getCell()->getName() << ">" << endl;
|
||||
|
||||
ltraceout(90);
|
||||
}
|
||||
|
||||
|
||||
SmurfEngine::~SmurfEngine ()
|
||||
{
|
||||
delete _configuration;
|
||||
}
|
||||
|
||||
|
||||
const Name& SmurfEngine::getName () const
|
||||
{ return _toolName; }
|
||||
|
||||
|
||||
Configuration* SmurfEngine::getConfiguration ()
|
||||
{
|
||||
return _configuration;
|
||||
}
|
||||
|
||||
|
||||
void SmurfEngine::place ( unsigned int slowMotion )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
string SmurfEngine::_getTypeName () const
|
||||
{ return "Smurf::SmurfEngine"; }
|
||||
|
||||
|
||||
string SmurfEngine::_getString () const
|
||||
{
|
||||
ostringstream os;
|
||||
os << "<" << "SmurfEngine " << getCell()->getName () << ">";
|
||||
return os.str();
|
||||
}
|
||||
|
||||
|
||||
Record* SmurfEngine::_getRecord () const
|
||||
{
|
||||
Record* record = ToolEngine::_getRecord ();
|
||||
|
||||
if (record) {
|
||||
//record->add( getSlot( "_routingPlanes", &_routingPlanes ) );
|
||||
record->add( getSlot( "_configuration", _configuration ) );
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // Smurf namespace.
|
|
@ -0,0 +1,104 @@
|
|||
// -*- mode: C++; explicit-buffer-name: "Configuration.h<smurf>" -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./smurf/Configuration.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef SMURF_CONFIGURATION_H
|
||||
#define SMURF_CONFIGURATION_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "hurricane/DbU.h"
|
||||
namespace Hurricane {
|
||||
class Layer;
|
||||
class Cell;
|
||||
}
|
||||
|
||||
#include "crlcore/RoutingGauge.h"
|
||||
namespace CRL {
|
||||
class RoutingLayerGauge;
|
||||
}
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
|
||||
using std::string;
|
||||
using Hurricane::Record;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::DbU;
|
||||
using Hurricane::Cell;
|
||||
using CRL::RoutingGauge;
|
||||
using CRL::RoutingLayerGauge;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Smurf::Configuration" (decorator).
|
||||
|
||||
|
||||
class Configuration {
|
||||
public:
|
||||
// Constructor & Destructor.
|
||||
virtual ~Configuration ();
|
||||
virtual Configuration* clone () const = 0;
|
||||
// Methods.
|
||||
virtual RoutingGauge* getRoutingGauge () const = 0;
|
||||
virtual void print ( Cell* ) const = 0;
|
||||
virtual Record* _getRecord () const = 0;
|
||||
virtual string _getString () const = 0;
|
||||
virtual string _getTypeName () const = 0;
|
||||
protected:
|
||||
Configuration ();
|
||||
private:
|
||||
Configuration ( const Configuration& );
|
||||
Configuration& operator= ( const Configuration& );
|
||||
private:
|
||||
static Configuration* _default;
|
||||
};
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Smurf::ConfigurationConcrete".
|
||||
|
||||
|
||||
class ConfigurationConcrete : public Configuration {
|
||||
friend class Configuration;
|
||||
public:
|
||||
// Constructor & Destructor.
|
||||
ConfigurationConcrete ( const RoutingGauge* rg=NULL );
|
||||
virtual ~ConfigurationConcrete ();
|
||||
virtual ConfigurationConcrete* clone () const;
|
||||
// Methods.
|
||||
virtual RoutingGauge* getRoutingGauge () const;
|
||||
virtual void print ( Cell* ) const;
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
protected:
|
||||
// Attributes.
|
||||
RoutingGauge* _rg;
|
||||
private:
|
||||
ConfigurationConcrete ( const ConfigurationConcrete& );
|
||||
ConfigurationConcrete& operator= ( const ConfigurationConcrete& );
|
||||
};
|
||||
|
||||
|
||||
} // Smurf namespace.
|
||||
|
||||
|
||||
INSPECTOR_P_SUPPORT(Smurf::Configuration);
|
||||
INSPECTOR_P_SUPPORT(Smurf::ConfigurationConcrete);
|
||||
|
||||
|
||||
#endif // SMURF_CONFIGURATION_H
|
|
@ -0,0 +1,76 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./smurf/GraphicSmurfEngine.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
#ifndef SMURF_GRAPHIC_SMURF_ENGINE_H
|
||||
#define SMURF_GRAPHIC_SMURF_ENGINE_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Hurricane {
|
||||
class Go;
|
||||
class BasicLayer;
|
||||
class Transformation;
|
||||
class CellWidget;
|
||||
class CellViewer;
|
||||
}
|
||||
|
||||
#include "crlcore/GraphicToolEngine.h"
|
||||
#include "smurf/SmurfEngine.h"
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using Hurricane::Go;
|
||||
using Hurricane::Box;
|
||||
using Hurricane::BasicLayer;
|
||||
using Hurricane::Transformation;
|
||||
using Hurricane::CellWidget;
|
||||
using Hurricane::CellViewer;
|
||||
using CRL::GraphicTool;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Smurf::GraphicSmurfEngine".
|
||||
|
||||
class GraphicSmurfEngine : public GraphicTool {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
SmurfEngine* createEngine ();
|
||||
SmurfEngine* getForFramework ();
|
||||
static GraphicSmurfEngine* grab ();
|
||||
virtual const Name& getName () const;
|
||||
Cell* getCell ();
|
||||
virtual size_t release ();
|
||||
virtual void addToMenu ( CellViewer* );
|
||||
void postEvent ();
|
||||
public slots:
|
||||
void place ();
|
||||
|
||||
protected:
|
||||
static size_t _references;
|
||||
static GraphicSmurfEngine* _singleton;
|
||||
CellViewer* _viewer;
|
||||
protected:
|
||||
GraphicSmurfEngine ();
|
||||
virtual ~GraphicSmurfEngine ();
|
||||
};
|
||||
|
||||
|
||||
} // Smurf namespace.
|
||||
|
||||
#endif // SMURF_GRAPHIC_SMURF_ENGINE_H
|
|
@ -0,0 +1,56 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./smurf/PyGraphicSmurfEngine.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef SMURF_PY_GRAPHIC_SMURF_ENGINE_H
|
||||
#define SMURF_PY_GRAPHIC_SMURF_ENGINE_H
|
||||
|
||||
#include "crlcore/PyGraphicToolEngine.h"
|
||||
#include "smurf/GraphicSmurfEngine.h"
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyGraphicSmurfEngine".
|
||||
|
||||
typedef struct {
|
||||
CRL::PyGraphicTool _baseObject;
|
||||
} PyGraphicSmurfEngine;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PySmurf.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeGraphicSmurfEngine;
|
||||
extern PyMethodDef PyGraphicSmurfEngine_Methods[];
|
||||
|
||||
extern void PyGraphicSmurfEngine_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyGraphicSmurfEngine(v) ( (v)->ob_type == &PyTypeGraphicSmurfEngine )
|
||||
#define PY_GRAPHIC_SMURF_ENGINE(v) ( (PyGraphicSmurfEngine*)(v) )
|
||||
#define PY_GRAPHIC_SMURF_ENGINE_O(v) ( PY_GRAPHIC_SMURF_ENGINE(v)->_baseObject._object )
|
||||
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Smurf namespace.
|
||||
|
||||
#endif // SMURF_PY_GRAPHIC_SMURF_ENGINE_H
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./smurf/PySmurfEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef PY_SMURF_ENGINE_H
|
||||
#define PY_SMURF_ENGINE_H
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
#include "crlcore/PyToolEngine.h"
|
||||
#include "smurf/SmurfEngine.h"
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PySmurfEngine".
|
||||
|
||||
typedef struct {
|
||||
CRL::PyToolEngine _baseObject;
|
||||
} PySmurfEngine;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PySmurf.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeSmurfEngine;
|
||||
extern PyMethodDef PySmurfEngine_Methods[];
|
||||
|
||||
extern PyObject* PySmurfEngine_Link ( Smurf::SmurfEngine* );
|
||||
extern void PySmurfEngine_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPySmurfEngine(v) ( (v)->ob_type == &PyTypeSmurfEngine )
|
||||
#define PYSMURFENGINE(v) ( (PySmurfEngine*)(v) )
|
||||
#define PYSMURFENGINE_O(v) ( PYSMURFENGINE(v)->_baseObject._object )
|
||||
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Smurf namespace.
|
||||
|
||||
#endif // PY_SMURF_ENGINE_H
|
|
@ -0,0 +1,91 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2014-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | S m u r f - A D e m o T o o l E n g i n e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./smurf/SmurfEngine.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef SMURF_SMURF_ENGINE_H
|
||||
#define SMURF_SMURF_ENGINE_H
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "hurricane/Name.h"
|
||||
namespace Hurricane {
|
||||
class Layer;
|
||||
class Net;
|
||||
class Cell;
|
||||
}
|
||||
|
||||
|
||||
#include "crlcore/ToolEngine.h"
|
||||
#include "smurf/Configuration.h"
|
||||
|
||||
|
||||
namespace Smurf {
|
||||
|
||||
using Hurricane::Name;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::Net;
|
||||
using Hurricane::Cell;
|
||||
using Hurricane::Record;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Smurf::SmurfEngine".
|
||||
|
||||
class SmurfEngine : public CRL::ToolEngine {
|
||||
|
||||
public:
|
||||
static const Name& staticGetName ();
|
||||
static SmurfEngine* create ( Cell* );
|
||||
static SmurfEngine* get ( const Cell* );
|
||||
public:
|
||||
virtual Configuration* getConfiguration ();
|
||||
virtual const Name& getName () const;
|
||||
void place ( unsigned int slowMotion=0 );
|
||||
virtual Record* _getRecord () const;
|
||||
virtual std::string _getString () const;
|
||||
virtual std::string _getTypeName () const;
|
||||
|
||||
private:
|
||||
// Attributes.
|
||||
static Name _toolName;
|
||||
protected:
|
||||
Configuration* _configuration;
|
||||
|
||||
protected:
|
||||
// Constructors & Destructors.
|
||||
SmurfEngine ( Cell* );
|
||||
virtual ~SmurfEngine ();
|
||||
virtual void _postCreate ();
|
||||
virtual void _preDestroy ();
|
||||
private:
|
||||
SmurfEngine ( const SmurfEngine& );
|
||||
SmurfEngine& operator= ( const SmurfEngine& );
|
||||
};
|
||||
|
||||
|
||||
// Inline Functions.
|
||||
|
||||
|
||||
// Variables.
|
||||
extern const char* missingSmurf;
|
||||
|
||||
|
||||
} // Smurf namespace.
|
||||
|
||||
|
||||
INSPECTOR_P_SUPPORT(Smurf::SmurfEngine);
|
||||
|
||||
|
||||
#endif // SMURF_SMURF_ENGINE_H
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(EQUINOX)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -11,9 +11,8 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_qt()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${EQUINOX_SOURCE_DIR}/src
|
||||
${EQUINOX_SOURCE_DIR}/src/intervalTree/src
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${UTILITIES_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
@ -35,13 +36,13 @@
|
|||
set ( intervalTreeIncludes intervalTree/src/equinox/Interval.h
|
||||
intervalTree/src/equinox/IntervalTree.h )
|
||||
set ( intervalTreeCpps intervalTree/src/IntervalTree.cpp )
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
add_library ( intervalTree ${intervalTreeCpps} )
|
||||
set_target_properties ( intervalTree PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( intervalTree ${HURRICANE_LIBRARIES} )
|
||||
|
||||
add_library ( equinox ${cpps} ${mocCpps} )
|
||||
add_library ( equinox ${cpps} )
|
||||
set_target_properties ( equinox PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( equinox intervalTree
|
||||
${CORIOLIS_LIBRARIES}
|
||||
|
@ -53,7 +54,7 @@
|
|||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<etesian>" -*-
|
||||
|
||||
project(ETESIAN)
|
||||
|
||||
option(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
setup_project_paths(CORIOLIS)
|
||||
setup_project_paths(COLOQUINTE)
|
||||
setup_qt()
|
||||
|
||||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options python regex)
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(COLOQUINTE REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(LEFDEF REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(cmake_modules)
|
||||
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
# if(DOXYGEN_FOUND)
|
||||
# add_subdirectory(doc)
|
||||
# endif()
|
||||
endif()
|
|
@ -0,0 +1 @@
|
|||
install ( FILES FindETESIAN.cmake DESTINATION share/cmake/Modules )
|
|
@ -0,0 +1,37 @@
|
|||
# - Find the Etesian includes and libraries.
|
||||
# The following variables are set if Coriolis is found. If ETESIAN is not
|
||||
# found, ETESIAN_FOUND is set to false.
|
||||
# ETESIAN_FOUND - True when the Coriolis include directory is found.
|
||||
# ETESIAN_INCLUDE_DIR - the path to where the Coriolis include files are.
|
||||
# ETESIAN_LIBRARIES - The path to where the Coriolis library files are.
|
||||
|
||||
|
||||
SET(ETESIAN_INCLUDE_PATH_DESCRIPTION "directory containing the Etesian include files. E.g /usr/local/include/coriolis or /asim/coriolis/include/coriolis")
|
||||
|
||||
SET(ETESIAN_DIR_MESSAGE "Set the ETESIAN_INCLUDE_DIR cmake cache entry to the ${ETESIAN_INCLUDE_PATH_DESCRIPTION}")
|
||||
|
||||
# don't even bother under WIN32
|
||||
IF(UNIX)
|
||||
#
|
||||
# Look for an installation.
|
||||
#
|
||||
FIND_PATH(ETESIAN_INCLUDE_PATH NAMES etesian/EtesianEngine.h PATHS
|
||||
# Look in other places.
|
||||
${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES include/coriolis
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${ETESIAN_INCLUDE_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(ETESIAN_LIBRARY_PATH
|
||||
NAMES etesian
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib${LIB_SUFFIX}
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${ETESIAN_INCLUDE_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
SET_LIBRARIES_PATH(ETESIAN ETESIAN)
|
||||
HURRICANE_CHECK_LIBRARIES(ETESIAN)
|
||||
|
||||
ENDIF(UNIX)
|
|
@ -0,0 +1,115 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<etesian/src>" -*-
|
||||
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${ETESIAN_SOURCE_DIR}/src
|
||||
${COLOQUINTE_INCLUDE_DIR}
|
||||
${EIGEN3_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
set ( includes #etesian/Constants.h
|
||||
#etesian/TrackCost.h
|
||||
#etesian/DataNegociate.h
|
||||
#etesian/TrackElement.h etesian/TrackElements.h
|
||||
#etesian/TrackSegment.h
|
||||
#etesian/TrackFixedSegment.h
|
||||
#etesian/TrackMarker.h
|
||||
#etesian/Track.h
|
||||
#etesian/Tracks.h
|
||||
#etesian/HorizontalTrack.h
|
||||
#etesian/VerticalTrack.h
|
||||
#etesian/RoutingPlane.h
|
||||
#etesian/Session.h
|
||||
#etesian/Manipulator.h
|
||||
#etesian/SegmentFsm.h
|
||||
#etesian/RoutingEvent.h
|
||||
#etesian/RoutingEventQueue.h
|
||||
#etesian/RoutingEventHistory.h
|
||||
#etesian/RoutingEventLoop.h
|
||||
#etesian/NegociateWindow.h
|
||||
etesian/Configuration.h
|
||||
etesian/EtesianEngine.h
|
||||
etesian/GraphicEtesianEngine.h
|
||||
)
|
||||
set ( pyIncludes etesian/PyEtesianEngine.h
|
||||
etesian/PyGraphicEtesianEngine.h
|
||||
)
|
||||
set ( mocIncludes etesian/GraphicEtesianEngine.h )
|
||||
set ( cpps #TrackCost.cpp
|
||||
#DataNegociate.cpp
|
||||
#TrackElement.cpp
|
||||
#TrackElements.cpp
|
||||
#TrackSegment.cpp
|
||||
#TrackFixedSegment.cpp
|
||||
#TrackMarker.cpp
|
||||
#Track.cpp
|
||||
#Tracks.cpp
|
||||
#HorizontalTrack.cpp
|
||||
#VerticalTrack.cpp
|
||||
#RoutingPlane.cpp
|
||||
#Session.cpp
|
||||
#Manipulator.cpp
|
||||
#SegmentFsm.cpp
|
||||
#RoutingEvent.cpp
|
||||
#RoutingEventQueue.cpp
|
||||
#RoutingEventHistory.cpp
|
||||
#RoutingEventLoop.cpp
|
||||
#NegociateWindow.cpp
|
||||
#BuildPowerRails.cpp
|
||||
#ProtectRoutingPads.cpp
|
||||
#PreProcess.cpp
|
||||
Configuration.cpp
|
||||
EtesianEngine.cpp
|
||||
GraphicEtesianEngine.cpp
|
||||
)
|
||||
set ( pyCpps PyEtesian.cpp
|
||||
PyEtesianEngine.cpp
|
||||
PyGraphicEtesianEngine.cpp
|
||||
)
|
||||
# set ( etesiancpps EtesianMain.cpp )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
add_library ( etesian ${cpps} ${mocCpps} ${pyCpps} )
|
||||
set_target_properties ( etesian PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( etesian ${CORIOLIS_LIBRARIES}
|
||||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||
${HURRICANE_LIBRARIES}
|
||||
${CONFIGURATION_LIBRARY}
|
||||
${BOOKSHELF_LIBRARY}
|
||||
${CIF_LIBRARY}
|
||||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${COLOQUINTE_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
${LIBEXECINFO_LIBRARIES}
|
||||
)
|
||||
|
||||
add_library ( pyEtesian MODULE ${pyCpps} )
|
||||
set_target_properties ( pyEtesian PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||
PREFIX ""
|
||||
OUTPUT_NAME "Etesian"
|
||||
)
|
||||
|
||||
# add_executable ( etesian.bin ${etesiancpps} )
|
||||
#target_link_libraries ( etesian.bin etesian )
|
||||
target_link_libraries ( pyEtesian etesian
|
||||
${CORIOLIS_PYTHON_LIBRARIES}
|
||||
)
|
||||
install ( TARGETS etesian DESTINATION lib${LIB_SUFFIX} )
|
||||
# install ( TARGETS etesian.bin DESTINATION bin )
|
||||
install ( TARGETS pyEtesian DESTINATION ${PYTHON_SITE_PACKAGES} )
|
||||
|
||||
install ( FILES ${includes}
|
||||
${mocIncludes}
|
||||
${pyIncludes} DESTINATION include/coriolis2/etesian )
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
// -*- 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.
|
|
@ -0,0 +1,434 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// 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@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./EtesianEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iomanip>
|
||||
#include "coloquinte/circuit_graph.hxx"
|
||||
#include "hurricane/DebugSession.h"
|
||||
#include "hurricane/Bug.h"
|
||||
#include "hurricane/Error.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/Breakpoint.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Pad.h"
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "hurricane/Occurrence.h"
|
||||
#include "hurricane/Instance.h"
|
||||
#include "hurricane/Vertical.h"
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/RoutingPad.h"
|
||||
#include "hurricane/UpdateSession.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/Measures.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
#include "etesian/EtesianEngine.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace std;
|
||||
using namespace Hurricane;
|
||||
|
||||
|
||||
string extractInstanceName ( const RoutingPad* rp )
|
||||
{
|
||||
ostringstream name;
|
||||
|
||||
Occurrence occurrence = rp->getOccurrence();
|
||||
|
||||
name << getString(occurrence.getOwnerCell()->getName()) << ':';
|
||||
|
||||
if (not rp->getOccurrence().getPath().getHeadPath().isEmpty())
|
||||
name << getString(rp->getOccurrence().getPath().getHeadPath().getName()) << ":";
|
||||
|
||||
name << "I." << getString(rp->getOccurrence().getPath().getTailInstance()->getName());
|
||||
|
||||
return name.str();
|
||||
}
|
||||
|
||||
|
||||
string extractPinName ( const RoutingPad* rp )
|
||||
{
|
||||
ostringstream name;
|
||||
|
||||
Occurrence occurrence = rp->getOccurrence();
|
||||
|
||||
name << getString(occurrence.getOwnerCell()->getName()) << ':';
|
||||
|
||||
if (not rp->getOccurrence().getPath().isEmpty())
|
||||
name << getString(rp->getOccurrence().getPath().getName()) << ":";
|
||||
|
||||
name << "T." << getString(rp->_getEntityAsComponent()->getNet()->getName());
|
||||
|
||||
return name.str();
|
||||
}
|
||||
|
||||
|
||||
string extractTerminalName ( const RoutingPad* rp )
|
||||
{
|
||||
ostringstream name;
|
||||
|
||||
Occurrence occurrence = rp->getOccurrence();
|
||||
|
||||
name << getString(occurrence.getOwnerCell()->getName()) << ':';
|
||||
|
||||
if (not rp->getOccurrence().getPath().isEmpty())
|
||||
name << getString(rp->getOccurrence().getPath().getName()) << ":";
|
||||
|
||||
name << "T." << getString(rp->_getEntityAsComponent()->getNet()->getName());
|
||||
|
||||
return name.str();
|
||||
}
|
||||
|
||||
|
||||
Coloquinte::cell::pin::pin_dir extractDirection ( const RoutingPad* rp )
|
||||
{
|
||||
switch ( rp->_getEntityAsComponent()->getNet()->getDirection() ) {
|
||||
case Net::Direction::IN: return Coloquinte::cell::pin::I;
|
||||
default:
|
||||
case Net::Direction::OUT:
|
||||
case Net::Direction::TRISTATE: return Coloquinte::cell::pin::O;
|
||||
case Net::Direction::INOUT: return Coloquinte::cell::pin::B;
|
||||
}
|
||||
|
||||
return Coloquinte::cell::pin::O;
|
||||
}
|
||||
|
||||
|
||||
Point extractRpOffset ( const RoutingPad* rp )
|
||||
{
|
||||
Cell* masterCell = rp->getOccurrence().getMasterCell();
|
||||
Component* component = rp->_getEntityAsComponent();
|
||||
|
||||
Point offset = masterCell->getAbutmentBox().getCenter();
|
||||
if (component) {
|
||||
offset.setX( component->getCenter().getX() - offset.getX() );
|
||||
offset.setY( component->getCenter().getY() - offset.getY() );
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
||||
} // Anonymous namespace.
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::setw;
|
||||
using std::left;
|
||||
using std::string;
|
||||
using std::ostream;
|
||||
using std::ofstream;
|
||||
using std::ostringstream;
|
||||
using std::setprecision;
|
||||
using std::vector;
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
using std::unordered_map;
|
||||
using Hurricane::DebugSession;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::inltrace;
|
||||
using Hurricane::ltracein;
|
||||
using Hurricane::ltraceout;
|
||||
using Hurricane::ForEachIterator;
|
||||
using Hurricane::Bug;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Breakpoint;
|
||||
using Hurricane::Box;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::Cell;
|
||||
using Hurricane::Instance;
|
||||
using Hurricane::RoutingPad;
|
||||
using Hurricane::Net;
|
||||
using Hurricane::Occurrence;
|
||||
using CRL::ToolEngine;
|
||||
using CRL::AllianceFramework;
|
||||
using CRL::addMeasure;
|
||||
using CRL::Measures;
|
||||
using CRL::MeasuresSet;
|
||||
|
||||
|
||||
const char* missingEtesian =
|
||||
"%s :\n\n"
|
||||
" Cell %s do not have any EtesianEngine (or not yet created).\n";
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Etesian::EtesianEngine".
|
||||
|
||||
Name EtesianEngine::_toolName = "Etesian";
|
||||
|
||||
|
||||
const Name& EtesianEngine::staticGetName ()
|
||||
{ return _toolName; }
|
||||
|
||||
|
||||
EtesianEngine* EtesianEngine::get ( const Cell* cell )
|
||||
{ return static_cast<EtesianEngine*>(ToolEngine::get(cell,staticGetName())); }
|
||||
|
||||
|
||||
EtesianEngine::EtesianEngine ( Cell* cell )
|
||||
: ToolEngine (cell)
|
||||
, _circuit (NULL)
|
||||
, _cellsToIds()
|
||||
{ }
|
||||
|
||||
|
||||
void EtesianEngine::_postCreate ()
|
||||
{ }
|
||||
|
||||
|
||||
EtesianEngine* EtesianEngine::create ( Cell* cell )
|
||||
{
|
||||
EtesianEngine* etesian = new EtesianEngine ( cell );
|
||||
|
||||
etesian->_postCreate();
|
||||
return etesian;
|
||||
}
|
||||
|
||||
|
||||
void EtesianEngine::_preDestroy ()
|
||||
{
|
||||
ltrace(90) << "EtesianEngine::_preDestroy()" << endl;
|
||||
ltracein(90);
|
||||
|
||||
cmess1 << " o Deleting ToolEngine<" << getName() << "> from Cell <"
|
||||
<< getCell()->getName() << ">" << endl;
|
||||
|
||||
ltraceout(90);
|
||||
}
|
||||
|
||||
|
||||
EtesianEngine::~EtesianEngine ()
|
||||
{
|
||||
if (_circuit) delete _circuit;
|
||||
delete _configuration;
|
||||
}
|
||||
|
||||
|
||||
const Name& EtesianEngine::getName () const
|
||||
{ return _toolName; }
|
||||
|
||||
|
||||
Configuration* EtesianEngine::getConfiguration ()
|
||||
{ return _configuration; }
|
||||
|
||||
|
||||
void EtesianEngine::place ( unsigned int slowMotion )
|
||||
{
|
||||
AllianceFramework* af = AllianceFramework::get();
|
||||
|
||||
getCell()->flattenNets( true );
|
||||
|
||||
// Coloquinte circuit description data-structures.
|
||||
_circuit = new Coloquinte::circuit();
|
||||
_circuit->cells .resize( getCell()->getLeafInstanceOccurrences().getSize() );
|
||||
_circuit->hypernets.resize( getCell()->getNets().getSize() );
|
||||
|
||||
Coloquinte::cell_id cellId = 0;
|
||||
forEach ( Occurrence, ioccurrence, getCell()->getLeafInstanceOccurrences() )
|
||||
{
|
||||
Instance* instance = static_cast<Instance*>((*ioccurrence).getEntity());
|
||||
Cell* masterCell = instance->getMasterCell();
|
||||
string instanceName = (*ioccurrence).getCompactString();
|
||||
// Remove the enclosing brackets...
|
||||
instanceName.erase( 0, 1 );
|
||||
instanceName.erase( instanceName.size()-1 );
|
||||
|
||||
cerr << instanceName << " " << (int)instance->getPlacementStatus().getCode() << endl;
|
||||
|
||||
Coloquinte::circuit_coordinate cellSize ( DbU::toLambda( masterCell->getAbutmentBox().getWidth () )
|
||||
, DbU::toLambda( masterCell->getAbutmentBox().getHeight() ));
|
||||
_cellsToIds.insert( make_pair(instanceName,cellId) );
|
||||
|
||||
_circuit->cells[cellId].name = instanceName;
|
||||
_circuit->cells[cellId].sizes = cellSize;
|
||||
_circuit->cells[cellId].area = cellSize.cast<Coloquinte::cell_area>().prod();
|
||||
_circuit->cells[cellId].movable = not instance->isFixed() and instance->isTerminal();
|
||||
//_circuit->cells[cellId].movable = (instance->getPlacementStatus() == Instance::PlacementStatus::UNPLACED);
|
||||
|
||||
cellId++;
|
||||
}
|
||||
|
||||
unsigned int netId = 0;
|
||||
forEach ( Net*, inet, getCell()->getNets() )
|
||||
{
|
||||
const char* excludedType = NULL;
|
||||
if ((*inet)->getType() == Net::Type::POWER ) excludedType = "POWER";
|
||||
if ((*inet)->getType() == Net::Type::GROUND) excludedType = "GROUND";
|
||||
if ((*inet)->getType() == Net::Type::CLOCK ) excludedType = "CLOCK";
|
||||
if (excludedType) {
|
||||
cparanoid << Warning( "%s is not a routable net (%s,excluded)."
|
||||
, getString(*inet).c_str(), excludedType ) << endl;
|
||||
continue;
|
||||
}
|
||||
if (af->isBLOCKAGE((*inet)->getName())) continue;
|
||||
|
||||
cerr << (*inet)->getName() << endl;
|
||||
forEach ( RoutingPad*, irp, (*inet)->getRoutingPads() ) {
|
||||
cerr << " " << (*irp)->getOccurrence().getCompactString() << endl;
|
||||
string insName = extractInstanceName( *irp );
|
||||
Point offset = extractRpOffset ( *irp );
|
||||
|
||||
cerr << " Master Cell: " << (*irp)->getOccurrence().getMasterCell() << endl;
|
||||
cerr << " Rebuilt instance name: " << insName << " " << offset << endl;
|
||||
|
||||
auto iid = _cellsToIds.find( insName );
|
||||
if (iid == _cellsToIds.end() ) {
|
||||
cerr << Error( "Unable to lookup instance <%s>.", insName.c_str() ) << endl;
|
||||
} else {
|
||||
Coloquinte::cell_id cellId = (*iid).second;
|
||||
Coloquinte::hypernet::pin_id netPinId ( cellId, _circuit->cells [cellId].pins.size() );
|
||||
Coloquinte::cell::pin_id cellPinId ( netId , _circuit->hypernets[netId ].pins.size() );
|
||||
_circuit->hypernets[netId].pins.push_back( netPinId );
|
||||
|
||||
Coloquinte::cell::pin cellPin;
|
||||
//cellPin.name = extractTerminalName( *irp );
|
||||
cellPin.d = extractDirection ( *irp );
|
||||
cellPin.offs.x() = DbU::toLambda( offset.getX() );
|
||||
cellPin.offs.y() = DbU::toLambda( offset.getY() );
|
||||
cellPin.ind = cellPinId;
|
||||
_circuit->cells[cellId].pins.push_back( cellPin );
|
||||
}
|
||||
}
|
||||
|
||||
netId++;
|
||||
}
|
||||
|
||||
_circuit->position_overlays.resize(1);
|
||||
_circuit->position_overlays[0].x_pos = Coloquinte::circuit_vector( _cellsToIds.size() );
|
||||
_circuit->position_overlays[0].y_pos = Coloquinte::circuit_vector( _cellsToIds.size() );
|
||||
|
||||
for ( auto ipair : _cellsToIds ) {
|
||||
Coloquinte::circuit_coordinate position = Coloquinte::circuit_coordinate::Zero();
|
||||
position += _circuit->cells[ipair.second].get_sizes() / 2;
|
||||
_circuit->position_overlays[0].x_pos[ipair.second] = position.x();
|
||||
_circuit->position_overlays[0].y_pos[ipair.second] = position.y();
|
||||
}
|
||||
|
||||
_circuit->bounds = Coloquinte::circuit_box
|
||||
( Coloquinte::circuit_coordinate::Zero()
|
||||
, Coloquinte::circuit_coordinate( { DbU::toLambda(getCell()->getAbutmentBox().getWidth ())
|
||||
, DbU::toLambda(getCell()->getAbutmentBox().getHeight()) } ));
|
||||
|
||||
float strength, strength_incr;
|
||||
|
||||
cout << "Initial placement at " << time(NULL) << endl;
|
||||
for(int j = 0; j < 3; j++){
|
||||
_circuit->position_overlays[0]
|
||||
= Coloquinte::solve_quadratic_model( *_circuit
|
||||
, _circuit->position_overlays[0]
|
||||
, _circuit->position_overlays[0]
|
||||
);
|
||||
cout << "At " << time(NULL) << ", lower bound is "
|
||||
<< B2B_wirelength(*_circuit, _circuit->position_overlays[0]) << endl;
|
||||
}
|
||||
|
||||
strength = 0.000001;
|
||||
strength_incr = 0.000002;
|
||||
|
||||
_circuit->position_overlays.resize(2);
|
||||
for(int j = 0; j < 200; j++, strength = strength * 1.02 + strength_incr){
|
||||
_circuit->position_overlays[1]
|
||||
= Coloquinte::legalize( *_circuit
|
||||
, 1.0
|
||||
, _circuit->position_overlays[0]
|
||||
, false
|
||||
);
|
||||
cout << "At " << time(NULL) << " and iteration " << j
|
||||
<< ", upper bound is " << /*B2B_wirelength(*_circuit, _circuit->position_overlays[1]) <<*/ endl;
|
||||
|
||||
_circuit->position_overlays[0]
|
||||
= Coloquinte::solve_quadratic_model( *_circuit
|
||||
, _circuit->position_overlays[0]
|
||||
, _circuit->position_overlays[1]
|
||||
, strength
|
||||
);
|
||||
cout << "At " << time(NULL) << " and iteration " << j
|
||||
<< ", lower bound is " << /*B2B_wirelength(*_circuit, _circuit->position_overlays[0]) <<*/ endl;
|
||||
}
|
||||
|
||||
_updatePlacement();
|
||||
}
|
||||
|
||||
|
||||
void EtesianEngine::_updatePlacement ()
|
||||
{
|
||||
UpdateSession::open();
|
||||
|
||||
forEach ( Occurrence, ioccurrence, getCell()->getLeafInstanceOccurrences() )
|
||||
{
|
||||
Point instancePosition;
|
||||
Instance* instance = static_cast<Instance*>((*ioccurrence).getEntity());
|
||||
//Cell* masterCell = instance->getMasterCell();
|
||||
string instanceName = (*ioccurrence).getCompactString();
|
||||
// Remove the enclosing brackets...
|
||||
instanceName.erase( 0, 1 );
|
||||
instanceName.erase( instanceName.size()-1 );
|
||||
|
||||
auto iid = _cellsToIds.find( instanceName );
|
||||
if (iid == _cellsToIds.end() ) {
|
||||
cerr << Error( "Unable to lookup instance <%s>.", instanceName.c_str() ) << endl;
|
||||
} else {
|
||||
instancePosition.setX( DbU::fromLambda(_circuit->position_overlays[0].x_pos[(*iid).second]) );
|
||||
instancePosition.setY( DbU::fromLambda(_circuit->position_overlays[0].y_pos[(*iid).second]) );
|
||||
|
||||
cerr << "Setting <" << instanceName << " @" << instancePosition << endl;
|
||||
|
||||
// This is temporary as it's not trans-hierarchic: we ignore the posutions
|
||||
// of all the intermediary instances.
|
||||
instance->setTransformation( instancePosition );
|
||||
}
|
||||
}
|
||||
|
||||
UpdateSession::close();
|
||||
}
|
||||
|
||||
|
||||
string EtesianEngine::_getTypeName () const
|
||||
{ return "Etesian::EtesianEngine"; }
|
||||
|
||||
|
||||
string EtesianEngine::_getString () const
|
||||
{
|
||||
ostringstream os;
|
||||
os << "<" << "EtesianEngine " << getCell()->getName () << ">";
|
||||
return os.str();
|
||||
}
|
||||
|
||||
|
||||
Record* EtesianEngine::_getRecord () const
|
||||
{
|
||||
Record* record = ToolEngine::_getRecord ();
|
||||
|
||||
if (record) {
|
||||
//record->add( getSlot( "_routingPlanes", &_routingPlanes ) );
|
||||
record->add( getSlot( "_configuration", _configuration ) );
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // Etesian namespace.
|
|
@ -0,0 +1,221 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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++ Header : "./GraphicEtesianEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <functional>
|
||||
#include <boost/bind.hpp>
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include <QMenuBar>
|
||||
#include <QApplication>
|
||||
#include <hurricane/Warning.h>
|
||||
#include <hurricane/Error.h>
|
||||
#include <hurricane/Breakpoint.h>
|
||||
#include <hurricane/DebugSession.h>
|
||||
#include <hurricane/Go.h>
|
||||
#include <hurricane/Net.h>
|
||||
#include <hurricane/Cell.h>
|
||||
#include <hurricane/UpdateSession.h>
|
||||
#include <hurricane/viewer/Graphics.h>
|
||||
#include <hurricane/viewer/CellWidget.h>
|
||||
#include <hurricane/viewer/CellViewer.h>
|
||||
#include <hurricane/viewer/ControllerWidget.h>
|
||||
#include <crlcore/Utilities.h>
|
||||
#include <crlcore/AllianceFramework.h>
|
||||
#include <etesian/GraphicEtesianEngine.h>
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using namespace std;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Breakpoint;
|
||||
using Hurricane::DebugSession;
|
||||
using Hurricane::UpdateSession;
|
||||
using Hurricane::Point;
|
||||
using Hurricane::Net;
|
||||
using Hurricane::Graphics;
|
||||
using Hurricane::ColorScale;
|
||||
using Hurricane::ControllerWidget;
|
||||
using CRL::Catalog;
|
||||
using CRL::AllianceFramework;
|
||||
|
||||
|
||||
size_t GraphicEtesianEngine::_references = 0;
|
||||
GraphicEtesianEngine* GraphicEtesianEngine::_singleton = NULL;
|
||||
|
||||
|
||||
EtesianEngine* GraphicEtesianEngine::createEngine ()
|
||||
{
|
||||
Cell* cell = getCell ();
|
||||
|
||||
EtesianEngine* etesian = EtesianEngine::get( cell );
|
||||
if (not etesian) {
|
||||
etesian = EtesianEngine::create( cell );
|
||||
} else
|
||||
cerr << Warning( "%s already has a Etesian engine.", getString(cell).c_str() ) << endl;
|
||||
|
||||
return etesian;
|
||||
}
|
||||
|
||||
|
||||
EtesianEngine* GraphicEtesianEngine::getForFramework ()
|
||||
{
|
||||
// Currently, only one framework is avalaible: Alliance.
|
||||
|
||||
EtesianEngine* etesian = EtesianEngine::get( getCell() );
|
||||
if (etesian) return etesian;
|
||||
|
||||
etesian = createEngine();
|
||||
|
||||
if (not etesian)
|
||||
throw Error( "Failed to create Etesian engine on %s.", getString(getCell()).c_str() );
|
||||
|
||||
return etesian;
|
||||
}
|
||||
|
||||
|
||||
void GraphicEtesianEngine::place ()
|
||||
{
|
||||
EtesianEngine* etesian = EtesianEngine::get( getCell() );
|
||||
if (not etesian) {
|
||||
etesian = createEngine();
|
||||
//throw Error( "EtesianEngine not created yet, run the global router first." );
|
||||
}
|
||||
//if (cmess1.enabled()) etesian->printConfiguration();
|
||||
|
||||
emit cellPreModificated();
|
||||
_viewer->clearToolInterrupt();
|
||||
etesian->place();
|
||||
emit cellPostModificated();
|
||||
}
|
||||
|
||||
|
||||
void GraphicEtesianEngine::postEvent ()
|
||||
{
|
||||
static unsigned int count = 0;
|
||||
|
||||
if (not (count++ % 500)) {
|
||||
QApplication::processEvents();
|
||||
|
||||
// if (_viewer->isToolInterrupted()) {
|
||||
// EtesianEngine* etesian = EtesianEngine::get( getCell() );
|
||||
// if (etesian) etesian->setInterrupt( true );
|
||||
// _viewer->clearToolInterrupt();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GraphicEtesianEngine::addToMenu ( CellViewer* viewer )
|
||||
{
|
||||
assert( _viewer == NULL );
|
||||
|
||||
_viewer = viewer;
|
||||
|
||||
QMenu* prMenu = _viewer->findChild<QMenu*>("viewer.menuBar.placeAndRoute");
|
||||
QMenu* stepMenu = _viewer->findChild<QMenu*>("viewer.menuBar.placeAndRoute.stepByStep");
|
||||
if (prMenu == NULL) {
|
||||
QMenuBar* menuBar = _viewer->findChild<QMenuBar*>("viewer.menuBar");
|
||||
if (menuBar == NULL) {
|
||||
cerr << Warning( "GraphicEtesianEngine::addToMenu() - No MenuBar in parent widget." ) << endl;
|
||||
return;
|
||||
}
|
||||
prMenu = menuBar->addMenu( tr("P&&R") );
|
||||
prMenu->setObjectName( "viewer.menuBar.placeAndRoute" );
|
||||
|
||||
stepMenu = prMenu->addMenu( tr("&Step by Step") );
|
||||
stepMenu->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep" );
|
||||
|
||||
prMenu->addSeparator();
|
||||
}
|
||||
|
||||
QAction* placeAction = _viewer->findChild<QAction*>("viewer.menuBar.placeAndRoute.etesianPlace");
|
||||
if (placeAction)
|
||||
cerr << Warning( "GraphicEtesianEngine::addToMenu() - Etesian detailed router already hooked in." ) << endl;
|
||||
else {
|
||||
QAction* placeAction = new QAction ( tr("Etesian - &Place"), _viewer );
|
||||
placeAction->setObjectName( "viewer.menuBar.placeAndRoute.etesianPlace" );
|
||||
placeAction->setStatusTip ( tr("Place the design") );
|
||||
placeAction->setVisible ( true );
|
||||
prMenu->addAction( placeAction );
|
||||
|
||||
connect( placeAction , SIGNAL(triggered()), this, SLOT(place ()) );
|
||||
}
|
||||
|
||||
connect( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) );
|
||||
connect( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) );
|
||||
}
|
||||
|
||||
|
||||
const Name& GraphicEtesianEngine::getName () const
|
||||
{ return EtesianEngine::staticGetName(); }
|
||||
|
||||
|
||||
Cell* GraphicEtesianEngine::getCell ()
|
||||
{
|
||||
if (_viewer == NULL) {
|
||||
throw Error( "<b>Etesian:</b> GraphicEtesianEngine not bound to any Viewer." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (_viewer->getCell() == NULL) {
|
||||
throw Error( "<b>Etesian:</b> No Cell is loaded into the Viewer." );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return _viewer->getCell();
|
||||
}
|
||||
|
||||
|
||||
GraphicEtesianEngine* GraphicEtesianEngine::grab ()
|
||||
{
|
||||
if (not _references) {
|
||||
_singleton = new GraphicEtesianEngine ();
|
||||
}
|
||||
_references++;
|
||||
|
||||
return _singleton;
|
||||
}
|
||||
|
||||
|
||||
size_t GraphicEtesianEngine::release ()
|
||||
{
|
||||
--_references;
|
||||
if (not _references) {
|
||||
delete _singleton;
|
||||
_singleton = NULL;
|
||||
}
|
||||
return _references;
|
||||
}
|
||||
|
||||
|
||||
GraphicEtesianEngine::GraphicEtesianEngine ()
|
||||
: GraphicTool()
|
||||
, _viewer (NULL)
|
||||
{
|
||||
// addDrawGo( "Knik::Edge" , GraphicKnikEngine::initKnikEdges , GraphicKnikEngine::drawKnikEdges );
|
||||
// addDrawGo( "Knik::Vertex" , GraphicKnikEngine::initKnikVertex, GraphicKnikEngine::drawKnikVertex );
|
||||
// addDrawGo( "Katabatic::Ac" , initKatabaticAc , drawKatabaticAc );
|
||||
// addDrawGo( "Katabatic::GCell", initKatabaticGCell, drawKatabaticGCell );
|
||||
}
|
||||
|
||||
|
||||
GraphicEtesianEngine::~GraphicEtesianEngine ()
|
||||
{ }
|
||||
|
||||
|
||||
} // Etesian namespace.
|
|
@ -0,0 +1,104 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyEtesian.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "etesian/PyEtesianEngine.h"
|
||||
#include "etesian/PyGraphicEtesianEngine.h"
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::in_trace;
|
||||
using Isobar::__cs;
|
||||
using CRL::PyTypeToolEngine;
|
||||
using CRL::PyTypeGraphicTool;
|
||||
|
||||
|
||||
#if !defined(__PYTHON_MODULE__)
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyEtesian" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
# else // End of PyHurricane Shared Library Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyEtesian" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// +-------------------------------------------------------------+
|
||||
// | "PyEtesian" Module Methods |
|
||||
// +-------------------------------------------------------------+
|
||||
|
||||
|
||||
static PyMethodDef PyEtesian_Methods[] =
|
||||
{ {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// Module Initialization : "initEtesian ()"
|
||||
|
||||
DL_EXPORT(void) initEtesian () {
|
||||
trace << "initEtesian()" << endl;
|
||||
|
||||
PyEtesianEngine_LinkPyType();
|
||||
PyGraphicEtesianEngine_LinkPyType();
|
||||
|
||||
PYTYPE_READY_SUB( EtesianEngine , ToolEngine );
|
||||
PYTYPE_READY_SUB( GraphicEtesianEngine, GraphicTool );
|
||||
|
||||
|
||||
PyObject* module = Py_InitModule( "Etesian", PyEtesian_Methods );
|
||||
if (module == NULL) {
|
||||
cerr << "[ERROR]\n"
|
||||
<< " Failed to initialize Etesian module." << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
Py_INCREF( &PyTypeEtesianEngine );
|
||||
PyModule_AddObject( module, "EtesianEngine", (PyObject*)&PyTypeEtesianEngine );
|
||||
Py_INCREF( &PyTypeGraphicEtesianEngine );
|
||||
PyModule_AddObject( module, "GraphicEtesianEngine", (PyObject*)&PyTypeGraphicEtesianEngine );
|
||||
|
||||
//PyObject* dictionnary = PyModule_GetDict( module );
|
||||
//PyObject* constant;
|
||||
|
||||
//LoadObjectConstant( dictionnary, KtBuildGlobalRouting, "KtBuildGlobalRouting" );
|
||||
//LoadObjectConstant( dictionnary, KtLoadGlobalRouting , "KtLoadGlobalRouting" );
|
||||
}
|
||||
|
||||
|
||||
} // End of extern "C".
|
||||
|
||||
|
||||
#endif // End of Python Module Code Part.
|
||||
|
||||
|
||||
} // End of Etesian namespace.
|
|
@ -0,0 +1,186 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyEtesianEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "etesian/PyEtesianEngine.h"
|
||||
|
||||
# undef ACCESS_OBJECT
|
||||
# undef ACCESS_CLASS
|
||||
# define ACCESS_OBJECT _baseObject._object
|
||||
# define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(EtesianEngine,etesian,function)
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
using std::ostringstream;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::in_trace;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Isobar::ProxyProperty;
|
||||
using Isobar::ProxyError;
|
||||
using Isobar::ConstructorError;
|
||||
using Isobar::HurricaneError;
|
||||
using Isobar::HurricaneWarning;
|
||||
using Isobar::ParseOneArg;
|
||||
using Isobar::ParseTwoArg;
|
||||
using Isobar::PyCell;
|
||||
using Isobar::PyCell_Link;
|
||||
using CRL::PyToolEngine;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyEtesianEngine" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
static PyObject* PyEtesianEngine_get ( PyObject*, PyObject* args )
|
||||
{
|
||||
trace << "PyEtesianEngine_get()" << endl;
|
||||
|
||||
EtesianEngine* etesian = NULL;
|
||||
|
||||
HTRY
|
||||
PyObject* arg0;
|
||||
|
||||
if (not ParseOneArg("Etesian.get", args, CELL_ARG, &arg0)) return NULL;
|
||||
etesian = EtesianEngine::get(PYCELL_O(arg0));
|
||||
HCATCH
|
||||
|
||||
return PyEtesianEngine_Link(etesian);
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyEtesianEngine_create ( PyObject*, PyObject* args )
|
||||
{
|
||||
trace << "PyEtesianEngine_create()" << endl;
|
||||
|
||||
EtesianEngine* etesian = NULL;
|
||||
|
||||
HTRY
|
||||
PyObject* arg0;
|
||||
|
||||
if (not ParseOneArg("Etesian.get", args, CELL_ARG, &arg0)) return NULL;
|
||||
|
||||
Cell* cell = PYCELL_O(arg0);
|
||||
etesian = EtesianEngine::get(cell);
|
||||
|
||||
if (etesian == NULL) {
|
||||
etesian = EtesianEngine::create(cell);
|
||||
//if (cmess1.enabled())
|
||||
// etesian->getEtesianConfiguration()->print(cell);
|
||||
} else
|
||||
cerr << Warning("%s already has a Etesian engine.",getString(cell).c_str()) << endl;
|
||||
HCATCH
|
||||
|
||||
return PyEtesianEngine_Link(etesian);
|
||||
}
|
||||
|
||||
|
||||
PyObject* PyEtesianEngine_place ( PyEtesianEngine* self, PyObject* args )
|
||||
{
|
||||
trace << "PyEtesianEngine_place()" << endl;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("EtesianEngine.place()")
|
||||
unsigned int flags = 0;
|
||||
if (PyArg_ParseTuple(args,"I:EtesianEngine.place", &flags)) {
|
||||
etesian->place(/*flags*/);
|
||||
} else {
|
||||
PyErr_SetString(ConstructorError, "EtesianEngine.place(): Invalid number/bad type of parameter.");
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
// Standart Accessors (Attributes).
|
||||
// DirectVoidMethod(EtesianEngine,etesian,runNegociate)
|
||||
// DirectVoidMethod(EtesianEngine,etesian,printConfiguration)
|
||||
// DirectVoidMethod(EtesianEngine,etesian,saveGlobalSolution)
|
||||
// DirectVoidMethod(EtesianEngine,etesian,finalizeLayout)
|
||||
// DirectVoidMethod(EtesianEngine,etesian,dumpMeasures)
|
||||
// DirectGetBoolAttribute(PyEtesianEngine_getToolSuccess,getToolSuccess,PyEtesianEngine,EtesianEngine)
|
||||
|
||||
// Standart Destroy (Attribute).
|
||||
DBoDestroyAttribute(PyEtesianEngine_destroy,PyEtesianEngine)
|
||||
|
||||
|
||||
PyMethodDef PyEtesianEngine_Methods[] =
|
||||
{ { "get" , (PyCFunction)PyEtesianEngine_get , METH_VARARGS|METH_STATIC
|
||||
, "Returns the Etesian engine attached to the Cell, None if there isnt't." }
|
||||
, { "create" , (PyCFunction)PyEtesianEngine_create , METH_VARARGS|METH_STATIC
|
||||
, "Create a Etesian engine on this cell." }
|
||||
// , { "printConfiguration", (PyCFunction)PyEtesianEngine_printConfiguration, METH_NOARGS
|
||||
// , "Display on the console the configuration of Etesian." }
|
||||
// , { "saveGlobalSolution", (PyCFunction)PyEtesianEngine_saveGlobalSolution, METH_NOARGS
|
||||
// , "Save the global routing solution on disk." }
|
||||
// , { "getToolSuccess" , (PyCFunction)PyEtesianEngine_getToolSuccess , METH_NOARGS
|
||||
// , "Returns True if the detailed routing has been successful." }
|
||||
// , { "loadGlobalRouting" , (PyCFunction)PyEtesianEngine_loadGlobalRouting , METH_VARARGS
|
||||
// , "Read/load the global routing and build topologies for Etesian." }
|
||||
, { "place" , (PyCFunction)PyEtesianEngine_place , METH_VARARGS
|
||||
, "Run the global router (Knik)." }
|
||||
// , { "layerAssign" , (PyCFunction)PyEtesianEngine_layerAssign , METH_VARARGS
|
||||
// , "Run the layer assigment stage." }
|
||||
// , { "runNegociate" , (PyCFunction)PyEtesianEngine_runNegociate , METH_NOARGS
|
||||
// , "Run the negociation stage of the detailed router." }
|
||||
// , { "finalizeLayout" , (PyCFunction)PyEtesianEngine_finalizeLayout , METH_NOARGS
|
||||
// , "Revert to a pure Hurricane database, remove router's additionnal data structures." }
|
||||
// , { "dumpMeasures" , (PyCFunction)PyEtesianEngine_dumpMeasures , METH_NOARGS
|
||||
// , "Dump to disk lots of statistical informations about the routing." }
|
||||
, { "destroy" , (PyCFunction)PyEtesianEngine_destroy , METH_NOARGS
|
||||
, "Destroy the associated hurricane object. The python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
DBoDeleteMethod(EtesianEngine)
|
||||
PyTypeObjectLinkPyType(EtesianEngine)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyEtesianEngine" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
// Link/Creation Method.
|
||||
PyTypeInheritedObjectDefinitions(EtesianEngine,PyToolEngine)
|
||||
DBoLinkCreateMethod(EtesianEngine)
|
||||
|
||||
|
||||
#endif // Shared Library Code Part.
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Etesian namespace.
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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 : "./PyGraphicEtesianEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "etesian/PyGraphicEtesianEngine.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include "hurricane/Cell.h"
|
||||
|
||||
|
||||
#undef ACCESS_OBJECT
|
||||
#undef ACCESS_CLASS
|
||||
#define ACCESS_OBJECT _baseObject._object
|
||||
#define ACCESS_CLASS(_pyObject) &(_pyObject->_baseObject)
|
||||
#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(GraphicEtesianEngine,gtool,function)
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using namespace Hurricane;
|
||||
using namespace Isobar;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyGraphicEtesianEngine" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
|
||||
// +-------------------------------------------------------------+
|
||||
// | "PyGraphicEtesianEngine" Attribute Methods |
|
||||
// +-------------------------------------------------------------+
|
||||
|
||||
|
||||
static PyObject* PyGraphicEtesianEngine_grab ( PyObject* )
|
||||
{
|
||||
trace << "PyGraphicEtesianEngine_grab()" << endl;
|
||||
PyGraphicEtesianEngine* pyGraphicEtesianEngine = NULL;
|
||||
|
||||
HTRY
|
||||
pyGraphicEtesianEngine = PyObject_NEW ( PyGraphicEtesianEngine, &PyTypeGraphicEtesianEngine );
|
||||
if ( pyGraphicEtesianEngine == NULL ) return NULL;
|
||||
|
||||
pyGraphicEtesianEngine->ACCESS_OBJECT = GraphicEtesianEngine::grab();
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)pyGraphicEtesianEngine;
|
||||
}
|
||||
|
||||
|
||||
static PyObject* PyGraphicEtesianEngine_getCell ( PyGraphicEtesianEngine* self )
|
||||
{
|
||||
trace << "PyGraphicEtesianEngine_getCell ()" << endl;
|
||||
|
||||
Cell* cell = NULL;
|
||||
|
||||
HTRY
|
||||
METHOD_HEAD("GraphicEtesianEngine.getCell()")
|
||||
cell = gtool->getCell ();
|
||||
HCATCH
|
||||
|
||||
if (cell == NULL) Py_RETURN_NONE;
|
||||
return PyCell_Link(cell);
|
||||
}
|
||||
|
||||
|
||||
GetNameMethod(GraphicEtesianEngine, gtool)
|
||||
|
||||
// Standart destroy (Attribute).
|
||||
|
||||
|
||||
PyMethodDef PyGraphicEtesianEngine_Methods[] =
|
||||
{ { "grab" , (PyCFunction)PyGraphicEtesianEngine_grab , METH_NOARGS|METH_STATIC
|
||||
, "Returns the GraphicEtesianEngine singleton." }
|
||||
, { "getName" , (PyCFunction)PyGraphicEtesianEngine_getName , METH_NOARGS
|
||||
, "Returns the name of the GraphicEtesianEngine (class attribute)." }
|
||||
, { "getCell" , (PyCFunction)PyGraphicEtesianEngine_getCell , METH_NOARGS
|
||||
, "Returns the Cell on which this GraphicEtesianEngine is attached." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
// PyGraphicEtesianEngine Type Methods.
|
||||
|
||||
|
||||
PythonOnlyDeleteMethod(GraphicEtesianEngine)
|
||||
PyTypeObjectLinkPyType(GraphicEtesianEngine)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyGraphicEtesianEngine" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
// Link/Creation Method.
|
||||
LinkCreateMethod(GraphicEtesianEngine)
|
||||
|
||||
PyTypeInheritedObjectDefinitions(GraphicEtesianEngine,GraphicTool)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // CRL namespace.
|
|
@ -0,0 +1,104 @@
|
|||
// -*- mode: C++; explicit-buffer-name: "Configuration.h<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++ Header : "./etesian/Configuration.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef ETESIAN_CONFIGURATION_H
|
||||
#define ETESIAN_CONFIGURATION_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "hurricane/DbU.h"
|
||||
namespace Hurricane {
|
||||
class Layer;
|
||||
class Cell;
|
||||
}
|
||||
|
||||
#include "crlcore/RoutingGauge.h"
|
||||
namespace CRL {
|
||||
class RoutingLayerGauge;
|
||||
}
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
|
||||
using std::string;
|
||||
using Hurricane::Record;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::DbU;
|
||||
using Hurricane::Cell;
|
||||
using CRL::RoutingGauge;
|
||||
using CRL::RoutingLayerGauge;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Etesian::Configuration" (decorator).
|
||||
|
||||
|
||||
class Configuration {
|
||||
public:
|
||||
// Constructor & Destructor.
|
||||
virtual ~Configuration ();
|
||||
virtual Configuration* clone () const = 0;
|
||||
// Methods.
|
||||
virtual RoutingGauge* getRoutingGauge () const = 0;
|
||||
virtual void print ( Cell* ) const = 0;
|
||||
virtual Record* _getRecord () const = 0;
|
||||
virtual string _getString () const = 0;
|
||||
virtual string _getTypeName () const = 0;
|
||||
protected:
|
||||
Configuration ();
|
||||
private:
|
||||
Configuration ( const Configuration& );
|
||||
Configuration& operator= ( const Configuration& );
|
||||
private:
|
||||
static Configuration* _default;
|
||||
};
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Etesian::ConfigurationConcrete".
|
||||
|
||||
|
||||
class ConfigurationConcrete : public Configuration {
|
||||
friend class Configuration;
|
||||
public:
|
||||
// Constructor & Destructor.
|
||||
ConfigurationConcrete ( const RoutingGauge* rg=NULL );
|
||||
virtual ~ConfigurationConcrete ();
|
||||
virtual ConfigurationConcrete* clone () const;
|
||||
// Methods.
|
||||
virtual RoutingGauge* getRoutingGauge () const;
|
||||
virtual void print ( Cell* ) const;
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
protected:
|
||||
// Attributes.
|
||||
RoutingGauge* _rg;
|
||||
private:
|
||||
ConfigurationConcrete ( const ConfigurationConcrete& );
|
||||
ConfigurationConcrete& operator= ( const ConfigurationConcrete& );
|
||||
};
|
||||
|
||||
|
||||
} // Etesian namespace.
|
||||
|
||||
|
||||
INSPECTOR_P_SUPPORT(Etesian::Configuration);
|
||||
INSPECTOR_P_SUPPORT(Etesian::ConfigurationConcrete);
|
||||
|
||||
|
||||
#endif // ETESIAN_CONFIGURATION_H
|
|
@ -0,0 +1,99 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// 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@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./etesian/EtesianEngine.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef ETESIAN_ETESIAN_ENGINE_H
|
||||
#define ETESIAN_ETESIAN_ENGINE_H
|
||||
|
||||
#include <iostream>
|
||||
#include <unordered_map>
|
||||
|
||||
//#include "coloquinte/circuit_graph.hxx"
|
||||
namespace Coloquinte {
|
||||
struct circuit;
|
||||
}
|
||||
|
||||
#include "hurricane/Name.h"
|
||||
namespace Hurricane {
|
||||
class Layer;
|
||||
class Net;
|
||||
class Cell;
|
||||
}
|
||||
|
||||
#include "crlcore/ToolEngine.h"
|
||||
#include "etesian/Configuration.h"
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using Hurricane::Name;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::Net;
|
||||
using Hurricane::Cell;
|
||||
using Hurricane::Record;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Etesian::EtesianEngine".
|
||||
|
||||
class EtesianEngine : public CRL::ToolEngine {
|
||||
|
||||
public:
|
||||
static const Name& staticGetName ();
|
||||
static EtesianEngine* create ( Cell* );
|
||||
static EtesianEngine* get ( const Cell* );
|
||||
public:
|
||||
virtual Configuration* getConfiguration ();
|
||||
virtual const Name& getName () const;
|
||||
void place ( unsigned int slowMotion=0 );
|
||||
void _updatePlacement ();
|
||||
virtual Record* _getRecord () const;
|
||||
virtual std::string _getString () const;
|
||||
virtual std::string _getTypeName () const;
|
||||
|
||||
private:
|
||||
// Attributes.
|
||||
static Name _toolName;
|
||||
protected:
|
||||
Configuration* _configuration;
|
||||
Coloquinte::circuit* _circuit;
|
||||
std::unordered_map<string,unsigned int> _cellsToIds;
|
||||
|
||||
protected:
|
||||
// Constructors & Destructors.
|
||||
EtesianEngine ( Cell* );
|
||||
virtual ~EtesianEngine ();
|
||||
virtual void _postCreate ();
|
||||
virtual void _preDestroy ();
|
||||
private:
|
||||
EtesianEngine ( const EtesianEngine& );
|
||||
EtesianEngine& operator= ( const EtesianEngine& );
|
||||
};
|
||||
|
||||
|
||||
// Inline Functions.
|
||||
|
||||
|
||||
// Variables.
|
||||
extern const char* missingEtesian;
|
||||
|
||||
|
||||
} // Etesian namespace.
|
||||
|
||||
|
||||
INSPECTOR_P_SUPPORT(Etesian::EtesianEngine);
|
||||
|
||||
|
||||
#endif // ETESIAN_ETESIAN_ENGINE_H
|
|
@ -0,0 +1,76 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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++ Header : "./etesian/GraphicEtesianEngine.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
#ifndef ETESIAN_GRAPHIC_ETESIAN_ENGINE_H
|
||||
#define ETESIAN_GRAPHIC_ETESIAN_ENGINE_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Hurricane {
|
||||
class Go;
|
||||
class BasicLayer;
|
||||
class Transformation;
|
||||
class CellWidget;
|
||||
class CellViewer;
|
||||
}
|
||||
|
||||
#include "crlcore/GraphicToolEngine.h"
|
||||
#include "etesian/EtesianEngine.h"
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
using Hurricane::Go;
|
||||
using Hurricane::Box;
|
||||
using Hurricane::BasicLayer;
|
||||
using Hurricane::Transformation;
|
||||
using Hurricane::CellWidget;
|
||||
using Hurricane::CellViewer;
|
||||
using CRL::GraphicTool;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Etesian::GraphicEtesianEngine".
|
||||
|
||||
class GraphicEtesianEngine : public GraphicTool {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
EtesianEngine* createEngine ();
|
||||
EtesianEngine* getForFramework ();
|
||||
static GraphicEtesianEngine* grab ();
|
||||
virtual const Name& getName () const;
|
||||
Cell* getCell ();
|
||||
virtual size_t release ();
|
||||
virtual void addToMenu ( CellViewer* );
|
||||
void postEvent ();
|
||||
public slots:
|
||||
void place ();
|
||||
|
||||
protected:
|
||||
static size_t _references;
|
||||
static GraphicEtesianEngine* _singleton;
|
||||
CellViewer* _viewer;
|
||||
protected:
|
||||
GraphicEtesianEngine ();
|
||||
virtual ~GraphicEtesianEngine ();
|
||||
};
|
||||
|
||||
|
||||
} // Etesian namespace.
|
||||
|
||||
#endif // ETESIAN_GRAPHIC_ETESIAN_ENGINE_H
|
|
@ -0,0 +1,58 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./etesian/PyEtesianEngine.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef PY_ETESIAN_ENGINE_H
|
||||
#define PY_ETESIAN_ENGINE_H
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
#include "crlcore/PyToolEngine.h"
|
||||
#include "etesian/EtesianEngine.h"
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyEtesianEngine".
|
||||
|
||||
typedef struct {
|
||||
CRL::PyToolEngine _baseObject;
|
||||
} PyEtesianEngine;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyEtesian.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeEtesianEngine;
|
||||
extern PyMethodDef PyEtesianEngine_Methods[];
|
||||
|
||||
extern PyObject* PyEtesianEngine_Link ( Etesian::EtesianEngine* );
|
||||
extern void PyEtesianEngine_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyEtesianEngine(v) ( (v)->ob_type == &PyTypeEtesianEngine )
|
||||
#define PYETESIANENGINE(v) ( (PyEtesianEngine*)(v) )
|
||||
#define PYETESIANENGINE_O(v) ( PYETESIANENGINE(v)->_baseObject._object )
|
||||
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Etesian namespace.
|
||||
|
||||
#endif // PY_ETESIAN_ENGINE_H
|
|
@ -0,0 +1,56 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 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++ Header : "./etesian/PyGraphicEtesianEngine.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef ETESIAN_PY_GRAPHIC_ETESIAN_ENGINE_H
|
||||
#define ETESIAN_PY_GRAPHIC_ETESIAN_ENGINE_H
|
||||
|
||||
#include "crlcore/PyGraphicToolEngine.h"
|
||||
#include "etesian/GraphicEtesianEngine.h"
|
||||
|
||||
|
||||
namespace Etesian {
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyGraphicEtesianEngine".
|
||||
|
||||
typedef struct {
|
||||
CRL::PyGraphicTool _baseObject;
|
||||
} PyGraphicEtesianEngine;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyEtesian.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeGraphicEtesianEngine;
|
||||
extern PyMethodDef PyGraphicEtesianEngine_Methods[];
|
||||
|
||||
extern void PyGraphicEtesianEngine_LinkPyType ();
|
||||
|
||||
|
||||
#define IsPyGraphicEtesianEngine(v) ( (v)->ob_type == &PyTypeGraphicEtesianEngine )
|
||||
#define PY_GRAPHIC_ETESIAN_ENGINE(v) ( (PyGraphicEtesianEngine*)(v) )
|
||||
#define PY_GRAPHIC_ETESIAN_ENGINE_O(v) ( PY_GRAPHIC_ETESIAN_ENGINE(v)->_baseObject._object )
|
||||
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Etesian namespace.
|
||||
|
||||
#endif // ETESIAN_PY_GRAPHIC_ETESIAN_ENGINE_H
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
option(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -14,26 +14,26 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(regex)
|
||||
setup_qt()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(LibXml2 REQUIRED)
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
endif(BUILD_DOC)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(cmake_modules)
|
||||
#add_subdirectory(tests)
|
||||
if(BUILD_DOC AND DOXYGEN_FOUND)
|
||||
add_subdirectory(doc)
|
||||
endif(BUILD_DOC AND DOXYGEN_FOUND)
|
||||
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_subdirectory(doc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#enable_testing()
|
||||
#add_test(HurricaneTest ${PROJECT_BINARY_DIR}/tests/htest)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<hurricane/src/isobar>" -*-
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane
|
||||
${HURRICANE_SOURCE_DIR}/src/viewer
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
|
@ -17,10 +11,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./AreaCommand.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <QMouseEvent>
|
||||
|
@ -54,23 +45,23 @@ namespace Hurricane {
|
|||
|
||||
void AreaCommand::mouseMoveEvent ( QMouseEvent* event )
|
||||
{
|
||||
if ( !_drawingEnabled ) return;
|
||||
if (not _drawingEnabled) return;
|
||||
|
||||
setStopPoint ( event->pos() );
|
||||
_cellWidget->update ();
|
||||
setStopPoint( event->pos() );
|
||||
_cellWidget->update();
|
||||
}
|
||||
|
||||
|
||||
void AreaCommand::draw ()
|
||||
{
|
||||
if ( !_drawingEnabled ) return;
|
||||
if (not _drawingEnabled) return;
|
||||
|
||||
if ( ( abs(_stopPoint.x()-_startPoint.x()) > _drawingThreshold )
|
||||
&& ( abs(_stopPoint.y()-_startPoint.y()) > _drawingThreshold ) ) {
|
||||
_cellWidget->setPen ( Graphics::getPen("grid"), 2 );
|
||||
_cellWidget->drawScreenRect ( _startPoint, _stopPoint, 2 );
|
||||
drawCorner ( true );
|
||||
drawCorner ( false );
|
||||
if ( (abs(_stopPoint.x()-_startPoint.x()) > _drawingThreshold)
|
||||
and (abs(_stopPoint.y()-_startPoint.y()) > _drawingThreshold) ) {
|
||||
_cellWidget->setPen ( Graphics::getPen("grid"), CellWidget::PlaneId::Widget );
|
||||
_cellWidget->drawScreenRect( _startPoint, _stopPoint, CellWidget::PlaneId::Widget );
|
||||
drawCorner( true );
|
||||
drawCorner( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,8 +71,8 @@ namespace Hurricane {
|
|||
QRect zoomRect = QRect(_startPoint,_stopPoint).normalized();
|
||||
QPoint base = (bottomLeft) ? zoomRect.bottomLeft() : zoomRect.topRight();
|
||||
|
||||
if ( bottomLeft ) base.rx() += 2;
|
||||
else base.ry() += 2;
|
||||
if (bottomLeft) base.rx() += 2;
|
||||
else base.ry() += 2;
|
||||
|
||||
_cornerPoints[0] = base;
|
||||
_cornerPoints[1] = base;
|
||||
|
@ -90,8 +81,8 @@ namespace Hurricane {
|
|||
_cornerPoints[0].ry() += (bottomLeft) ? -10 : 10;
|
||||
_cornerPoints[2].rx() += (bottomLeft) ? 10 : -10;
|
||||
|
||||
_cellWidget->drawScreenPolyline ( _cornerPoints, 3, 4, 2 );
|
||||
_cellWidget->drawScreenPolyline( _cornerPoints, 3, 4, CellWidget::PlaneId::Widget );
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
} // Hurricane namespace.
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<hurricane/src/viewer>" -*-
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane
|
||||
${HURRICANE_SOURCE_DIR}/src/isobar
|
||||
${HURRICANE_SOURCE_DIR}/src/viewer
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
|
@ -123,8 +125,8 @@
|
|||
set ( sources2 Script.cpp )
|
||||
set ( includes2 hurricane/viewer/Script.h )
|
||||
|
||||
qt4_wrap_cpp ( MOC_SRCS ${mocincludes} )
|
||||
qt4_add_resources ( RCC_SRCS CellViewer.qrc )
|
||||
qt5_wrap_cpp ( MOC_SRCS ${mocincludes} )
|
||||
qt5_add_resources ( RCC_SRCS CellViewer.qrc )
|
||||
|
||||
add_library ( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ${sources2} ${pycpps} )
|
||||
set_target_properties ( viewer PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
|
@ -134,7 +136,8 @@
|
|||
${CONFIGURATION_LIBRARY}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${QT_LIBRARIES} )
|
||||
${QtX_LIBRARIES}
|
||||
)
|
||||
add_library ( pyViewer MODULE ${pycpps} )
|
||||
target_link_libraries ( pyViewer viewer )
|
||||
set_target_properties ( pyViewer PROPERTIES
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -340,22 +340,22 @@ namespace Hurricane {
|
|||
|
||||
|
||||
CellWidget::DrawingPlanes::DrawingPlanes ( const QSize& size, CellWidget* cw )
|
||||
: _cellWidget(cw)
|
||||
, _printer(NULL)
|
||||
, _image(NULL)
|
||||
, _normalPen()
|
||||
, _linePen()
|
||||
: _cellWidget (cw)
|
||||
, _printer (NULL)
|
||||
, _image (NULL)
|
||||
, _normalPen ()
|
||||
, _linePen ()
|
||||
, _workingPlane(0)
|
||||
, _lineMode(false)
|
||||
, _lineMode (false)
|
||||
{
|
||||
for ( size_t i=0 ; i<2 ; i++ )
|
||||
for ( size_t i=0 ; i<3 ; i++ )
|
||||
_planes[i] = new QPixmap ( size );
|
||||
}
|
||||
|
||||
|
||||
CellWidget::DrawingPlanes::~DrawingPlanes ()
|
||||
{
|
||||
for ( size_t i=0 ; i<2 ; i++ ) {
|
||||
for ( size_t i=0 ; i<3 ; i++ ) {
|
||||
if ( _painters[i].isActive() ) _painters[i].end();
|
||||
delete _planes[i];
|
||||
}
|
||||
|
@ -406,7 +406,7 @@ namespace Hurricane {
|
|||
|
||||
void CellWidget::DrawingPlanes::resize ( const QSize& size )
|
||||
{
|
||||
for ( size_t i=0 ; i<2 ; i++ ) {
|
||||
for ( size_t i=0 ; i<3 ; i++ ) {
|
||||
bool activePainter = _painters[i].isActive();
|
||||
|
||||
if ( activePainter ) _painters[i].end();
|
||||
|
@ -421,8 +421,11 @@ namespace Hurricane {
|
|||
void CellWidget::DrawingPlanes::shiftLeft ( int dx )
|
||||
{
|
||||
buffersBegin ();
|
||||
_painters[PlaneId::Normal ].drawPixmap ( dx, 0, *_planes[PlaneId::Normal ], 0, 0, width()-dx, height() );
|
||||
_painters[PlaneId::Selection].drawPixmap ( dx, 0, *_planes[PlaneId::Selection], 0, 0, width()-dx, height() );
|
||||
_painters[PlaneId::AutoCopy ].drawPixmap( dx, 0, *_planes[PlaneId::Normal ], 0, 0, width()-dx, height() );
|
||||
_painters[PlaneId::Normal ].drawPixmap( 0, 0, *_planes[PlaneId::AutoCopy ], 0, 0, width() , height() );
|
||||
|
||||
_painters[PlaneId::AutoCopy ].drawPixmap( dx, 0, *_planes[PlaneId::Selection], 0, 0, width()-dx, height() );
|
||||
_painters[PlaneId::Selection].drawPixmap( 0, 0, *_planes[PlaneId::AutoCopy ], 0, 0, width() , height() );
|
||||
buffersEnd ();
|
||||
}
|
||||
|
||||
|
@ -439,8 +442,11 @@ namespace Hurricane {
|
|||
void CellWidget::DrawingPlanes::shiftUp ( int dy )
|
||||
{
|
||||
buffersBegin ();
|
||||
_painters[PlaneId::Normal ].drawPixmap ( 0, dy, *_planes[PlaneId::Normal ], 0, 0, width(), height()-dy );
|
||||
_painters[PlaneId::Selection].drawPixmap ( 0, dy, *_planes[PlaneId::Selection], 0, 0, width(), height()-dy );
|
||||
_painters[PlaneId::AutoCopy ].drawPixmap ( 0, dy, *_planes[PlaneId::Normal ], 0, 0, width(), height()-dy );
|
||||
_painters[PlaneId::Normal ].drawPixmap ( 0, 0, *_planes[PlaneId::AutoCopy ], 0, 0, width(), height() );
|
||||
|
||||
_painters[PlaneId::AutoCopy ].drawPixmap ( 0, dy, *_planes[PlaneId::Selection], 0, 0, width(), height()-dy );
|
||||
_painters[PlaneId::Selection].drawPixmap ( 0, 0, *_planes[PlaneId::AutoCopy ], 0, 0, width(), height() );
|
||||
buffersEnd ();
|
||||
}
|
||||
|
||||
|
@ -1040,7 +1046,7 @@ namespace Hurricane {
|
|||
//setAutoFillBackground ( false );
|
||||
setAttribute ( Qt::WA_OpaquePaintEvent );
|
||||
setAttribute ( Qt::WA_NoSystemBackground );
|
||||
setAttribute ( Qt::WA_PaintOnScreen );
|
||||
//setAttribute ( Qt::WA_PaintOnScreen );
|
||||
setAttribute ( Qt::WA_StaticContents );
|
||||
setSizePolicy ( QSizePolicy::Expanding, QSizePolicy::Expanding );
|
||||
setFocusPolicy ( Qt::StrongFocus );
|
||||
|
@ -2138,6 +2144,8 @@ namespace Hurricane {
|
|||
|
||||
void CellWidget::_goLeft ( int dx )
|
||||
{
|
||||
//cerr << "CellWidget::_goLeft() - dx: " << dx << " (offset: " << _offsetVA.rx() << ")" << endl;
|
||||
|
||||
_visibleArea.translate ( - (DbU::Unit)( dx / getScale() ) , 0 );
|
||||
|
||||
if ( _offsetVA.rx() - dx >= 0 ) {
|
||||
|
@ -2151,9 +2159,9 @@ namespace Hurricane {
|
|||
_displayArea.translate ( - (DbU::Unit)( shift / getScale() ) , 0 );
|
||||
_offsetVA.rx() -= dx - shift;
|
||||
|
||||
if ( shift >= _drawingPlanes.width() )
|
||||
if ( shift >= _drawingPlanes.width() ) {
|
||||
_redrawManager.refresh ();
|
||||
else {
|
||||
} else {
|
||||
_drawingPlanes.shiftLeft ( shift );
|
||||
_redraw ( QRect ( QPoint(0,0), QSize(shift,_drawingPlanes.height()) ) );
|
||||
}
|
||||
|
@ -2164,7 +2172,7 @@ namespace Hurricane {
|
|||
|
||||
void CellWidget::_goRight ( int dx )
|
||||
{
|
||||
//cerr << "CellWidget::goRight() - dx: " << dx << " (offset: " << _offsetVA.rx() << ")" << endl;
|
||||
//cerr << "CellWidget::_goRight() - dx: " << dx << " (offset: " << _offsetVA.rx() << ")" << endl;
|
||||
|
||||
_visibleArea.translate ( (DbU::Unit)( dx / getScale() ) , 0 );
|
||||
|
||||
|
@ -2193,7 +2201,7 @@ namespace Hurricane {
|
|||
|
||||
void CellWidget::_goUp ( int dy )
|
||||
{
|
||||
//cerr << "CellWidget::shiftUp() - " << dy << " (offset: " << _offsetVA.ry() << ")" << endl;
|
||||
//cerr << "CellWidget::_goUp() - " << dy << " (offset: " << _offsetVA.ry() << ")" << endl;
|
||||
|
||||
_visibleArea.translate ( 0, (DbU::Unit)( dy / getScale() ) );
|
||||
|
||||
|
@ -2221,7 +2229,7 @@ namespace Hurricane {
|
|||
|
||||
void CellWidget::_goDown ( int dy )
|
||||
{
|
||||
//cerr << "CellWidget::shiftDown() - " << dy << " (offset: " << _offsetVA.ry() << ")" << endl;
|
||||
//cerr << "CellWidget::_goDown() - " << dy << " (offset: " << _offsetVA.ry() << ")" << endl;
|
||||
|
||||
_visibleArea.translate ( 0, - (DbU::Unit)( dy / getScale() ) );
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -46,9 +45,9 @@ namespace Hurricane {
|
|||
{ }
|
||||
|
||||
|
||||
HApplication::HApplication ( int& argc, char** argv, Type type )
|
||||
: QApplication ( argc, argv, type )
|
||||
{ }
|
||||
// HApplication::HApplication ( int& argc, char** argv, Type type )
|
||||
// : QApplication ( argc, argv, type )
|
||||
// { }
|
||||
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
|
@ -66,22 +65,23 @@ namespace Hurricane {
|
|||
bool HApplication::notify ( QObject* object, QEvent* event )
|
||||
{
|
||||
try {
|
||||
return QApplication::notify ( object, event );
|
||||
return QApplication::notify( object, event );
|
||||
}
|
||||
catch ( Error& e ) {
|
||||
ExceptionWidget::run ( e );
|
||||
ExceptionWidget::run( e );
|
||||
}
|
||||
catch ( Exception& e ) {
|
||||
ExceptionWidget::run ( e );
|
||||
ExceptionWidget::run( e );
|
||||
}
|
||||
catch ( exception& e ) {
|
||||
ExceptionWidget::run( e );
|
||||
}
|
||||
catch ( ... ) {
|
||||
static const char* message =
|
||||
" Unmanaged exception, neither a <b>Hurricane::Error</b><br>"
|
||||
"nor a <b>std::exception</b>.";
|
||||
|
||||
ExceptionWidget::run ( message );
|
||||
ExceptionWidget::run( message );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2012-2012, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2012-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -18,7 +17,9 @@
|
|||
#include "hurricane/viewer/PyHApplication.h"
|
||||
#include <cstring>
|
||||
#include <QtGui>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
# include <QGtkStyle>
|
||||
#endif
|
||||
|
||||
|
@ -97,7 +98,9 @@ extern "C" {
|
|||
argv[i] = vargv[i];
|
||||
|
||||
ha = new HApplication(argc,argv);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
ha->setStyle ( new QGtkStyle() );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
|
@ -17,10 +11,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./RulerCommand.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
# include <QMouseEvent>
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
|
@ -17,17 +11,12 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./SelectionModel.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <QFont>
|
||||
#include <QFontMetrics>
|
||||
|
||||
#include "hurricane/Path.h"
|
||||
#include "hurricane/Entity.h"
|
||||
#include "hurricane/Occurrence.h"
|
||||
|
@ -60,14 +49,15 @@ namespace Hurricane {
|
|||
|
||||
void SelectionModel::clear ()
|
||||
{
|
||||
_selection.clear ();
|
||||
reset ();
|
||||
beginResetModel();
|
||||
_selection.clear();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
|
||||
void SelectionModel::setSelection ( const SelectorSet& selection )
|
||||
{
|
||||
bool modificated = true;
|
||||
beginResetModel();
|
||||
if ( not isCumulative() ) _selection.clear ();
|
||||
|
||||
SelectorSet::const_iterator iselector = selection.begin();
|
||||
|
@ -80,11 +70,10 @@ namespace Hurricane {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
modificated = true;
|
||||
_selection.push_back ( OccurrenceItem((*iselector)->getOccurrence()) );
|
||||
}
|
||||
|
||||
if ( modificated ) reset ();
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,11 +89,12 @@ namespace Hurricane {
|
|||
|
||||
if ( i >= _selection.size() ) {
|
||||
modificated = true;
|
||||
beginResetModel ();
|
||||
_selection.push_back ( OccurrenceItem(occurrence) );
|
||||
}
|
||||
else _selection[i].setFlags ( OccurrenceItem::Selected );
|
||||
|
||||
if ( modificated ) reset ();
|
||||
if ( modificated ) endResetModel ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
|
@ -77,29 +77,29 @@ namespace Hurricane {
|
|||
|
||||
void ZoomCommand::mousePressEvent ( QMouseEvent* event )
|
||||
{
|
||||
if ( isActive() ) return;
|
||||
if (isActive()) return;
|
||||
if ( _cellWidget->getActiveCommand() and (_cellWidget->getActiveCommand() != this) )
|
||||
return;
|
||||
|
||||
if ( ( event->button() == Qt::LeftButton ) && !event->modifiers() ) {
|
||||
setActive ( true );
|
||||
setStartPoint ( event->pos() );
|
||||
setDrawingEnabled ( true );
|
||||
if ( (event->button() == Qt::LeftButton) and not event->modifiers() ) {
|
||||
setActive ( true );
|
||||
setStartPoint ( event->pos() );
|
||||
setDrawingEnabled( true );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ZoomCommand::mouseReleaseEvent ( QMouseEvent* event )
|
||||
{
|
||||
if ( !isActive() ) return;
|
||||
if (not isActive()) return;
|
||||
|
||||
setActive ( false );
|
||||
setDrawingEnabled ( false );
|
||||
setActive ( false );
|
||||
setDrawingEnabled( false );
|
||||
|
||||
QRect zoomArea = QRect ( _startPoint, _stopPoint );
|
||||
QRect zoomArea = QRect( _startPoint, _stopPoint );
|
||||
if ( ( abs(zoomArea.width ()) > getDrawingThreshold() )
|
||||
&& ( abs(zoomArea.height()) > getDrawingThreshold() ) ) {
|
||||
_cellWidget->reframe ( _cellWidget->screenToDbuBox(zoomArea) );
|
||||
and ( abs(zoomArea.height()) > getDrawingThreshold() ) ) {
|
||||
_cellWidget->reframe( _cellWidget->screenToDbuBox(zoomArea) );
|
||||
return;
|
||||
}
|
||||
//else {
|
||||
|
|
|
@ -236,7 +236,6 @@ namespace Hurricane {
|
|||
void popCursor ();
|
||||
virtual QSize minimumSizeHint () const;
|
||||
virtual void showEvent ( QShowEvent* );
|
||||
virtual void paintEvent ( QPaintEvent* );
|
||||
virtual void resizeEvent ( QResizeEvent* );
|
||||
virtual void wheelEvent ( QWheelEvent* );
|
||||
virtual void keyPressEvent ( QKeyEvent* );
|
||||
|
@ -258,6 +257,8 @@ namespace Hurricane {
|
|||
void selectionChanged ( const SelectorSet& );
|
||||
void selectionToggled ( Occurrence );
|
||||
void showBoundariesToggled ( bool );
|
||||
protected:
|
||||
virtual void paintEvent ( QPaintEvent* );
|
||||
public slots:
|
||||
// Qt QWidget Slots Overload & CellWidget Specifics.
|
||||
void setState ( shared_ptr<CellWidget::State>& );
|
||||
|
@ -380,10 +381,11 @@ namespace Hurricane {
|
|||
public:
|
||||
enum Ids { Normal = 0 // _planes[0]
|
||||
, Selection = 1 // _planes[1]
|
||||
, Widget = 2
|
||||
, Printer = 3
|
||||
, Image = 4
|
||||
, Working = 5
|
||||
, AutoCopy = 2 // _plabes[2]
|
||||
, Widget = 3
|
||||
, Printer = 4
|
||||
, Image = 5
|
||||
, Working = 6
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -431,7 +433,7 @@ namespace Hurricane {
|
|||
CellWidget* _cellWidget;
|
||||
QPrinter* _printer;
|
||||
QImage* _image;
|
||||
QPixmap* _planes[2];
|
||||
QPixmap* _planes[3];
|
||||
QPainter _painters[PlaneId::Working];
|
||||
QPen _normalPen;
|
||||
QPen _linePen;
|
||||
|
@ -814,12 +816,13 @@ namespace Hurricane {
|
|||
size_t wp = (i>=PlaneId::Working) ? _workingPlane : i;
|
||||
switch ( wp ) {
|
||||
case PlaneId::Normal:
|
||||
case PlaneId::Selection: _painters[wp].begin ( _planes[wp] ); break;
|
||||
case PlaneId::Widget: _painters[ 2].begin ( _cellWidget ); break;
|
||||
case PlaneId::Printer: _painters[ 3].begin ( _printer ); break;
|
||||
case PlaneId::Image: _painters[ 4].begin ( _image ); break;
|
||||
case PlaneId::Selection:
|
||||
case PlaneId::AutoCopy: _painters[wp ].begin( _planes[wp] ); break;
|
||||
case PlaneId::Widget: _painters[PlaneId::Widget ].begin( _cellWidget ); break;
|
||||
case PlaneId::Printer: _painters[PlaneId::Printer].begin( _printer ); break;
|
||||
case PlaneId::Image: _painters[PlaneId::Image ].begin( _image ); break;
|
||||
default:
|
||||
cerr << "[BUG] Bad plane selection." << endl;
|
||||
std::cerr << "[BUG] Bad plane selection." << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -830,15 +833,17 @@ namespace Hurricane {
|
|||
|
||||
inline void CellWidget::DrawingPlanes::buffersBegin ()
|
||||
{
|
||||
begin ( PlaneId::Normal );
|
||||
begin ( PlaneId::Selection );
|
||||
begin( PlaneId::Normal );
|
||||
begin( PlaneId::Selection );
|
||||
begin( PlaneId::AutoCopy );
|
||||
}
|
||||
|
||||
|
||||
inline void CellWidget::DrawingPlanes::buffersEnd ()
|
||||
{
|
||||
end ( PlaneId::Normal );
|
||||
end ( PlaneId::Selection );
|
||||
end( PlaneId::Normal );
|
||||
end( PlaneId::Selection );
|
||||
end( PlaneId::AutoCopy );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
|
@ -17,16 +11,13 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./HApplication.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef __HURRICANE_HAPPLICATION__
|
||||
#define __HURRICANE_HAPPLICATION__
|
||||
#ifndef HURRICANE_HAPPLICATION_H
|
||||
#define HURRICANE_HAPPLICATION_H
|
||||
|
||||
#include <QApplication>
|
||||
|
||||
|
@ -40,7 +31,7 @@ namespace Hurricane {
|
|||
public:
|
||||
HApplication ( int& argc, char** argv );
|
||||
HApplication ( int& argc, char** argv, bool GUIenabled );
|
||||
HApplication ( int& argc, char** argv, Type type );
|
||||
// HApplication ( int& argc, char** argv, Type type );
|
||||
#if defined(Q_WS_X11)
|
||||
HApplication ( Display*, Qt::HANDLE visual=0, Qt::HANDLE colormap=0 );
|
||||
HApplication ( Display*, int& argc, char** argv, Qt::HANDLE visual=0, Qt::HANDLE colormap=0 );
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
|
@ -17,14 +11,11 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./SelectionModel.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef __HURRICANE_SELECTION_MODEL_H__
|
||||
#define __HURRICANE_SELECTION_MODEL_H__
|
||||
#ifndef HURRICANE_SELECTION_MODEL_H
|
||||
#define HURRICANE_SELECTION_MODEL_H
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
@ -104,7 +95,7 @@ namespace Hurricane {
|
|||
};
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
} // Hurricane namespace.
|
||||
|
||||
|
||||
#endif // __HURRICANE_SELECTION_MODEL_H__
|
||||
#endif // HURRICANE_SELECTION_MODEL_H
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
option(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -14,25 +14,25 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_qt()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(KNIK REQUIRED)
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
endif(BUILD_DOC)
|
||||
|
||||
if(BUILD_DOC AND DOXYGEN_FOUND)
|
||||
add_subdirectory(doc)
|
||||
endif(BUILD_DOC AND DOXYGEN_FOUND)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(cmake_modules)
|
||||
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_subdirectory(doc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CHECK_DATABASE)
|
||||
add_definitions(-DCHECK_DATABASE)
|
||||
message(STATUS "Checking database enabled (very slow).")
|
||||
|
|
|
@ -4,13 +4,14 @@ if ( CHECK_DETERMINISM )
|
|||
add_definitions ( -DCHECK_DETERMINISM )
|
||||
endif ( CHECK_DETERMINISM )
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${KATABATIC_SOURCE_DIR}/src
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${QtX_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
set ( includes katabatic/Constants.h
|
||||
|
@ -33,7 +34,7 @@ endif ( CHECK_DETERMINISM )
|
|||
katabatic/KatabaticEngine.h
|
||||
#katabatic/GraphicKatabaticEngine.h
|
||||
)
|
||||
# set ( mocIncludes katabatic/GraphicKatabaticEngine.h )
|
||||
set ( mocIncludes katabatic/GraphicKatabaticEngine.h )
|
||||
set ( cpps Configuration.cpp
|
||||
Observer.cpp
|
||||
ChipTools.cpp
|
||||
|
@ -59,26 +60,25 @@ endif ( CHECK_DETERMINISM )
|
|||
#GraphicKatabaticEngine.cpp
|
||||
)
|
||||
set ( pyCpps PyKatabatic.cpp )
|
||||
# qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
|
||||
# add_library ( katabatic ${cpps} ${mocCpps} )
|
||||
add_library ( katabatic ${cpps} )
|
||||
set_target_properties ( katabatic PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( katabatic ${KNIK_LIBRARIES}
|
||||
${CORIOLIS_LIBRARIES}
|
||||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||
${HURRICANE_LIBRARIES}
|
||||
${CONFIGURATION_LIBRARY}
|
||||
${CIF_LIBRARY}
|
||||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
${CORIOLIS_LIBRARIES}
|
||||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||
${HURRICANE_LIBRARIES}
|
||||
${CONFIGURATION_LIBRARY}
|
||||
${CIF_LIBRARY}
|
||||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
)
|
||||
add_library ( pyKatabatic MODULE ${pyCpps} )
|
||||
set_target_properties ( pyKatabatic PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
option(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -14,10 +14,9 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_qt()
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
|
@ -27,9 +26,6 @@
|
|||
find_package(KNIK REQUIRED)
|
||||
find_package(KATABATIC REQUIRED)
|
||||
find_package(Libexecinfo REQUIRED)
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
endif(BUILD_DOC)
|
||||
|
||||
if(CHECK_DATABASE)
|
||||
add_definitions(-DCHECK_DATABASE)
|
||||
|
@ -40,6 +36,10 @@
|
|||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(cmake_modules)
|
||||
if(BUILD_DOC AND DOXYGEN_FOUND)
|
||||
add_subdirectory(doc)
|
||||
endif(BUILD_DOC AND DOXYGEN_FOUND)
|
||||
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
if(DOXYGEN_FOUND)
|
||||
add_subdirectory(doc)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<kite/src>" -*-
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${KITE_SOURCE_DIR}/src
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${WtX_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
|
@ -69,7 +70,7 @@
|
|||
PyGraphicKiteEngine.cpp
|
||||
)
|
||||
set ( kitecpps KiteMain.cpp )
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
|
||||
add_library ( kite ${cpps} ${mocCpps} ${pyCpps} )
|
||||
|
@ -87,7 +88,7 @@
|
|||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(KNIK)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -12,9 +12,8 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_qt()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${KNIK_SOURCE_DIR}/src
|
||||
${KNIK_SOURCE_DIR}/src/flute-2.4/src
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${UTILITIES_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
set ( includes knik/Configuration.h
|
||||
|
@ -40,7 +41,7 @@
|
|||
)
|
||||
set ( fluteIncludes flute-2.4/src/knik/flute.h )
|
||||
set ( fluteCpps flute-2.4/src/flute.cpp )
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
|
||||
add_library ( flute ${fluteCpps} )
|
||||
|
@ -60,7 +61,7 @@
|
|||
${UTILITIES_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(MAUKA)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -12,16 +12,15 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem regex python)
|
||||
setup_qt()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(NIMBUS REQUIRED)
|
||||
find_package(METIS REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(NIMBUS REQUIRED)
|
||||
find_package(METIS REQUIRED)
|
||||
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(cmake_modules)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${MAUKA_SOURCE_DIR}/src
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
|
@ -44,7 +45,7 @@
|
|||
PyMaukaEngine.cpp
|
||||
PyGraphicMaukaEngine.cpp
|
||||
)
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
|
||||
add_library ( mauka ${cpps} ${mocCpps} ${pyCpps} )
|
||||
|
@ -60,7 +61,7 @@
|
|||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -270,7 +270,7 @@ namespace Mauka {
|
|||
prMenu->addSeparator ();
|
||||
}
|
||||
|
||||
QAction* placeAction = _viewer->findChild<QAction*>("viewer.menuBar.placeAndRoute.place");
|
||||
QAction* placeAction = _viewer->findChild<QAction*>("viewer.menuBar.placeAndRoute.maukaPlace");
|
||||
if ( placeAction != NULL )
|
||||
cerr << Warning("GraphicMaukaEngine::addToMenu() - Mauka placer already hooked in.") << endl;
|
||||
else {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(METIS)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -11,10 +11,8 @@
|
|||
|
||||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_boost()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt<metis/src>" -*-
|
||||
|
||||
if ( HMETIS_FOUND )
|
||||
add_definitions ( -DHAVE_HMETIS_LIB )
|
||||
endif ( HMETIS_FOUND )
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${METIS_SOURCE_DIR}/src
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
|
@ -27,7 +28,7 @@ endif ( HMETIS_FOUND )
|
|||
PyMetisEngine.cpp
|
||||
)
|
||||
|
||||
add_library ( metis ${cpps} ${mocCpps} ${pyCpps} )
|
||||
add_library ( metis ${cpps} ${pyCpps} )
|
||||
set_target_properties ( metis PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( metis ${HMETIS_LIBRARIES}
|
||||
${NIMBUS_LIBRARIES}
|
||||
|
@ -58,5 +59,4 @@ endif ( HMETIS_FOUND )
|
|||
install ( TARGETS metis DESTINATION lib${LIB_SUFFIX} )
|
||||
install ( TARGETS pyMetis DESTINATION ${PYTHON_SITE_PACKAGES} )
|
||||
install ( FILES ${includes}
|
||||
${mocIncludes}
|
||||
${pyIncludes} DESTINATION include/coriolis2/metis )
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(NIMBUS)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -11,13 +11,13 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_qt()
|
||||
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
if(BUILD_DOC)
|
||||
find_package(Doxygen)
|
||||
endif(BUILD_DOC)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${NIMBUS_SOURCE_DIR}/src
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
|
@ -54,7 +54,7 @@
|
|||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(SOLSTICE)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
@ -11,9 +11,8 @@
|
|||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_boost(program_options filesystem python regex)
|
||||
setup_qt()
|
||||
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED) # find and setup Qt4 for this project
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
|
||||
include_directories ( ${SOLSTICE_SOURCE_DIR}/src
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${UTILITIES_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
@ -36,9 +37,9 @@
|
|||
|
||||
)
|
||||
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
||||
add_library ( solstice ${cpps} ${mocCpps} )
|
||||
add_library ( solstice ${cpps} )
|
||||
set_target_properties ( solstice PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( solstice ${EQUINOX_LIBRARIES}
|
||||
${CORIOLIS_LIBRARIES}
|
||||
|
@ -50,7 +51,7 @@
|
|||
${AGDS_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${PYTHON_LIBRARIES} -lutil
|
||||
|
|
|
@ -2,29 +2,31 @@
|
|||
|
||||
project(UNICORN)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
setup_project_paths(COLOQUINTE)
|
||||
setup_project_paths(CORIOLIS)
|
||||
|
||||
set_cmake_policies()
|
||||
set_lib_link_mode()
|
||||
setup_sysconfdir("${CMAKE_INSTALL_PREFIX}")
|
||||
setup_boost(program_options python regex)
|
||||
setup_qt()
|
||||
|
||||
find_package(LibXml2 REQUIRED)
|
||||
set(QT_USE_QTXML "true")
|
||||
find_package(Qt4 REQUIRED)
|
||||
find_package(PythonLibs REQUIRED)
|
||||
find_package(PythonSitePackages REQUIRED)
|
||||
find_package(LEFDEF REQUIRED)
|
||||
find_package(COLOQUINTE REQUIRED)
|
||||
find_package(VLSISAPD REQUIRED)
|
||||
find_package(HURRICANE REQUIRED)
|
||||
find_package(CORIOLIS REQUIRED)
|
||||
find_package(NIMBUS REQUIRED)
|
||||
find_package(METIS REQUIRED)
|
||||
find_package(MAUKA REQUIRED)
|
||||
find_package(ETESIAN REQUIRED)
|
||||
find_package(KNIK REQUIRED)
|
||||
find_package(KATABATIC REQUIRED)
|
||||
find_package(KITE REQUIRED)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# -*- explicit-buffer-name: "CMakeLists.txt<unicorn/src>" -*-
|
||||
|
||||
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
include_directories ( ${UNICORN_SOURCE_DIR}/src
|
||||
${HURRICANE_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${BOOKSHELF_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${QtX_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${LEFDEF_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
|
@ -32,8 +32,8 @@
|
|||
)
|
||||
set ( cgtcpp CgtMain.cpp )
|
||||
|
||||
qt4_wrap_cpp ( MOCcpps ${mocincludes} )
|
||||
qt4_add_resources ( RCC_SRCS Unicorn.qrc )
|
||||
qt5_wrap_cpp ( MOCcpps ${mocincludes} )
|
||||
qt5_add_resources ( RCC_SRCS Unicorn.qrc )
|
||||
|
||||
add_library ( unicorn ${cpps} ${MOCcpps} ${pyCpps} )
|
||||
set_target_properties ( unicorn PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
|
@ -63,9 +63,10 @@
|
|||
${CIF_LIBRARY}
|
||||
${UTILITIES_LIBRARY}
|
||||
${CONFIGURATION_LIBRARY}
|
||||
${COLOQUINTE_LIBRARY}
|
||||
${LEFDEF_LIBRARIES}
|
||||
${OA_LIBRARIES}
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${PYTHON_LIBRARIES}
|
||||
-lutil
|
||||
|
|
|
@ -34,7 +34,9 @@ namespace bopts = boost::program_options;
|
|||
#include "hurricane/viewer/Script.h"
|
||||
|
||||
#include <QtGui>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
# include <QGtkStyle>
|
||||
#endif
|
||||
|
||||
|
@ -313,7 +315,9 @@ int main ( int argc, char *argv[] )
|
|||
|
||||
if ( not textMode ) {
|
||||
auto_ptr<QApplication> qa ( new HApplication(argc,argv) );
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
qa->setStyle ( new QGtkStyle() );
|
||||
#endif
|
||||
Graphics::enable ();
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
|
@ -17,10 +11,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./ImportCellDialog.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
@ -93,6 +84,7 @@ namespace Unicorn {
|
|||
|
||||
_formatComboBox->addItem ( tr("ACM/SIGDA (aka MCNC, .bench)"), AcmSigda );
|
||||
_formatComboBox->addItem ( tr("ISPD'04 (Bookshelf)") , Ispd04 );
|
||||
_formatComboBox->addItem ( tr("ISPD'05 (Bookshelf)") , Ispd05 );
|
||||
_formatComboBox->addItem ( tr("ICCAD'04 (LEF/DEF)") , Iccad04 );
|
||||
_formatComboBox->addItem ( tr("Alliance compliant DEF") , AllianceDef );
|
||||
hLayout2->addWidget ( _formatComboBox );
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -26,6 +25,7 @@
|
|||
#include "crlcore/GraphicToolEngine.h"
|
||||
#include "crlcore/AcmSigda.h"
|
||||
#include "crlcore/Ispd04Bookshelf.h"
|
||||
#include "crlcore/Ispd05Bookshelf.h"
|
||||
#include "crlcore/Iccad04Lefdef.h"
|
||||
#include "crlcore/DefImport.h"
|
||||
#include "crlcore/DefExport.h"
|
||||
|
@ -45,6 +45,7 @@ namespace Unicorn {
|
|||
using CRL::AllianceFramework;
|
||||
using CRL::AcmSigda;
|
||||
using CRL::Ispd04;
|
||||
using CRL::Ispd05;
|
||||
using CRL::Iccad04Lefdef;
|
||||
using CRL::DefImport;
|
||||
using CRL::DefExport;
|
||||
|
@ -195,6 +196,10 @@ namespace Unicorn {
|
|||
case ImportCellDialog::Ispd04:
|
||||
cell = Ispd04::load ( cellName.toStdString() );
|
||||
break;
|
||||
case ImportCellDialog::Ispd05:
|
||||
cell = Ispd05::load ( cellName.toStdString() );
|
||||
cerr << "Cell " << " successfully loaded." << endl;
|
||||
break;
|
||||
case ImportCellDialog::Iccad04:
|
||||
cell = Iccad04Lefdef::load ( cellName.toStdString() , 0 );
|
||||
break;
|
||||
|
@ -209,6 +214,7 @@ namespace Unicorn {
|
|||
viewer = UnicornGui::create ();
|
||||
viewer->show ();
|
||||
}
|
||||
cerr << "Loading " << cell->getName() << " into the viewer." << endl;
|
||||
viewer->setCell ( cell );
|
||||
} else
|
||||
cerr << "[ERROR] Cell not found: " << cellName.toStdString() << endl;
|
||||
|
|
|
@ -11,6 +11,7 @@ try:
|
|||
import Nimbus
|
||||
import Metis
|
||||
import Mauka
|
||||
import Etesian
|
||||
import Katabatic
|
||||
import Kite
|
||||
import Unicorn
|
||||
|
@ -158,6 +159,7 @@ if __name__ == '__main__':
|
|||
unicorn = Unicorn.UnicornGui.create()
|
||||
unicorn.setApplicationName ('cgt')
|
||||
unicorn.registerTool (Mauka.GraphicMaukaEngine.grab())
|
||||
unicorn.registerTool (Etesian.GraphicEtesianEngine.grab())
|
||||
unicorn.registerTool (Kite.GraphicKiteEngine.grab())
|
||||
#unicorn.setAnonNetSelectable(False)
|
||||
unicorn.setLayerVisible ("grid" , False);
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
|
@ -17,14 +11,11 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./ImportCellDialog.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef __UNICORN_IMPORT_CELL_DIALOG_H__
|
||||
#define __UNICORN_IMPORT_CELL_DIALOG_H__
|
||||
#ifndef UNICORN_IMPORT_CELL_DIALOG_H
|
||||
#define UNICORN_IMPORT_CELL_DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
@ -40,7 +31,7 @@ namespace Unicorn {
|
|||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
enum Formats { AcmSigda=1, Ispd04, Iccad04, AllianceDef };
|
||||
enum Formats { AcmSigda=1, Ispd04, Ispd05, Iccad04, AllianceDef };
|
||||
public:
|
||||
ImportCellDialog ( QWidget* parent=NULL );
|
||||
bool runDialog ( QString& name, int& format, bool& newViewerRequest );
|
||||
|
@ -57,4 +48,4 @@ namespace Unicorn {
|
|||
} // End of Unicorn namespace.
|
||||
|
||||
|
||||
#endif
|
||||
#endif // UNICORN_IMPORT_CELL_DIALOG_H
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
project(VLSISAPD)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
|
||||
list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/")
|
||||
find_package(Bootstrap REQUIRED)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
FIND_PACKAGE(Qt4 REQUIRED)
|
||||
|
||||
ADD_SUBDIRECTORY(src)
|
||||
setup_qt()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
|
||||
|
||||
include ( ${QT_USE_FILE} )
|
||||
# include ( ${QT_USE_FILE} )
|
||||
include_directories ( ${VLSISAPD_SOURCE_DIR}/src/utilities/src
|
||||
${VLSISAPD_SOURCE_DIR}/src/configuration/src
|
||||
${VLSISAPD_SOURCE_DIR}/src/openChams/src
|
||||
${QtX_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
${LIBXML2_INCLUDE_DIR}
|
||||
|
@ -36,13 +37,13 @@
|
|||
set ( pycpps PyConfiguration.cpp )
|
||||
set ( editorcpp ConfEditorMain.cpp )
|
||||
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt4_add_resources ( RCC_SRCS Configuration.qrc )
|
||||
qt5_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
qt5_add_resources ( RCC_SRCS Configuration.qrc )
|
||||
|
||||
add_library ( configuration ${cpps} ${mocCpps} ${RCC_SRCS} )
|
||||
set_target_properties ( configuration PROPERTIES VERSION 1.0 SOVERSION 1 )
|
||||
target_link_libraries ( configuration vlsisapdutils
|
||||
${QT_LIBRARIES}
|
||||
${QtX_LIBRARIES}
|
||||
${PYTHON_LIBRARIES}
|
||||
${LIBXML2_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
|
|
|
@ -23,7 +23,10 @@
|
|||
namespace boptions = boost::program_options;
|
||||
|
||||
#include <QtGui>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#include <QApplication>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
# include <QGtkStyle>
|
||||
#endif
|
||||
#include "vlsisapd/utilities/Path.h"
|
||||
|
@ -61,7 +64,9 @@ int main ( int argc, char* argv[] )
|
|||
}
|
||||
|
||||
auto_ptr<QApplication> qa ( new QApplication(argc,argv) );
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and not defined (__APPLE__)
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(4,5,0)) and \
|
||||
(QT_VERSION < QT_VERSION_CHECK(5,0,0)) and \
|
||||
not defined (__APPLE__)
|
||||
if ( not disableGtkStyle ) qa->setStyle ( new QGtkStyle() );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,17 +41,17 @@ namespace Cfg {
|
|||
, _type (type)
|
||||
, _filter (filter)
|
||||
{
|
||||
QPixmap pixmap(":/images/choose.png");
|
||||
QPixmap pixmap(":/images/choose.png");
|
||||
|
||||
_chooseButton->setIcon (QIcon(pixmap));
|
||||
_chooseButton->setIconSize (pixmap.size());
|
||||
_chooseButton->setCursor (Qt::ArrowCursor);
|
||||
_chooseButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
|
||||
_chooseButton->setToolTip (tr( (type&FileName)?"Choose file ...":"Choose directory ..." ));
|
||||
_chooseButton->setIcon (QIcon(pixmap));
|
||||
_chooseButton->setIconSize (pixmap.size());
|
||||
_chooseButton->setCursor (Qt::ArrowCursor);
|
||||
_chooseButton->setStyleSheet("QToolButton { border: none; padding: 0px; }");
|
||||
_chooseButton->setToolTip (tr( (type&FileName)?"Choose file ...":"Choose directory ..." ));
|
||||
|
||||
connect ( _chooseButton, SIGNAL(clicked()), this, SLOT(updateLineEdit()) );
|
||||
connect ( _chooseButton, SIGNAL(clicked()), this, SLOT(updateLineEdit()) );
|
||||
|
||||
setStyleSheet(QString("QLineEdit { padding-right: %1px; } ").arg(_chooseButton->sizeHint().width() + 1));
|
||||
setStyleSheet(QString("QLineEdit { padding-right: %1px; } ").arg(_chooseButton->sizeHint().width() + 1));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue