Qt5 porting, cleanup & Tidy.
Cleanup: * Cleanup: In <vlsisapd/src/bookshelf>, remove unused file Bookshelf.cpp (may have been a parser once upon a time). * Cleanup: In <hurricane>, in Cell::flattenNets() use flags instead of booleans to be more readable. Allow occurrence placement checking. * New: In <crlcore> add Python wrapper for the Ispd05 loader. * New: In <unicorn> add option for direct loading of ISPD05 designs. * Bug: In <hurricane/src/viewer>, RecordModel must emit layoutAboutToBeChanged() before changing the record contents (and layoutChanged() afterwards).
This commit is contained in:
parent
9501b88110
commit
fee45ef117
|
@ -40,6 +40,7 @@
|
|||
PyToolEngineCollection.cpp
|
||||
PyGraphicToolEngine.cpp
|
||||
PyAcmSigda.cpp
|
||||
PyIspd05.cpp
|
||||
)
|
||||
set ( includes crlcore/PyBanner.h
|
||||
crlcore/PyCatalog.h
|
||||
|
@ -54,6 +55,7 @@
|
|||
crlcore/PyToolEngineCollection.h
|
||||
crlcore/PyGraphicToolEngine.h
|
||||
crlcore/PyAcmSigda.h
|
||||
crlcore/PyIspd05.h
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -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 |
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2010-2012, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2010-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -30,6 +29,7 @@
|
|||
#include "crlcore/PyToolEngine.h"
|
||||
#include "crlcore/PyToolEngineCollection.h"
|
||||
#include "crlcore/PyAcmSigda.h"
|
||||
#include "crlcore/PyIspd05.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
@ -91,6 +91,7 @@ extern "C" {
|
|||
PyToolEngine_LinkPyType ();
|
||||
PyToolEngineCollection_LinkPyType ();
|
||||
PyAcmSigda_LinkPyType ();
|
||||
PyIspd05_LinkPyType ();
|
||||
|
||||
PYTYPE_READY ( Banner );
|
||||
PYTYPE_READY ( CatalogState );
|
||||
|
@ -106,6 +107,7 @@ extern "C" {
|
|||
PYTYPE_READY ( ToolEngineCollection );
|
||||
PYTYPE_READY ( ToolEngineCollectionLocator );
|
||||
PYTYPE_READY ( AcmSigda );
|
||||
PYTYPE_READY ( Ispd05 );
|
||||
|
||||
// Identifier string can take up to 10 characters.
|
||||
__cs.addType ( "alcEnv" , &PyTypeEnvironment , "<Environment>" , false );
|
||||
|
@ -149,6 +151,8 @@ extern "C" {
|
|||
PyModule_AddObject ( module, "ToolEngineCollectionLocator", (PyObject*)&PyTypeToolEngineCollectionLocator );
|
||||
Py_INCREF ( &PyTypeAcmSigda );
|
||||
PyModule_AddObject ( module, "AcmSigda", (PyObject*)&PyTypeAcmSigda );
|
||||
Py_INCREF ( &PyTypeIspd05 );
|
||||
PyModule_AddObject ( module, "Ispd05", (PyObject*)&PyTypeIspd05 );
|
||||
|
||||
PyCatalog_postModuleInit ();
|
||||
PyEnvironment_postModuleInit ();
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2012-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | Alliance / Hurricane Interface |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./PyIspd05.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "crlcore/Ispd05Bookshelf.h"
|
||||
#include "crlcore/PyIspd05.h"
|
||||
#include "hurricane/isobar/PyCell.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
using std::string;
|
||||
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::__cs;
|
||||
using Isobar::PyCell_Link;
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
#if defined(__PYTHON_MODULE__)
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyIspd05" Python Module Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
|
||||
static PyObject* PyIspd05_load ( PyObject*, PyObject* args )
|
||||
{
|
||||
trace << "PyIspd05_load()" << endl;
|
||||
|
||||
Cell* cell = NULL;
|
||||
|
||||
HTRY
|
||||
char* benchName = NULL;
|
||||
|
||||
if (PyArg_ParseTuple( args, "s:Ispd05.load", &benchName )) {
|
||||
cell = Ispd05::load( benchName );
|
||||
} else {
|
||||
PyErr_SetString ( ConstructorError, "Ispd05.load(): Bad type or bad number of parameters." );
|
||||
return NULL;
|
||||
}
|
||||
HCATCH
|
||||
|
||||
return (PyObject*)PyCell_Link(cell);
|
||||
}
|
||||
|
||||
|
||||
// Standart Destroy (Attribute).
|
||||
|
||||
|
||||
PyMethodDef PyIspd05_Methods[] =
|
||||
{ { "load" , (PyCFunction)PyIspd05_load , METH_VARARGS|METH_STATIC
|
||||
, "Create a new Ispd05." }
|
||||
//, { "destroy" , (PyCFunction)PyIspd05_destroy , METH_VARARGS
|
||||
// , "Destroy the associated hurricane object. The python object remains." }
|
||||
, {NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
||||
NoObjectDeleteMethod(Ispd05)
|
||||
PyTypeObjectLinkPyTypeWithoutObject(Ispd05,Ispd05)
|
||||
|
||||
|
||||
#else // End of Python Module Code Part.
|
||||
|
||||
|
||||
// +=================================================================+
|
||||
// | "PyIspd05" Shared Library Code Part |
|
||||
// +=================================================================+
|
||||
|
||||
// Type Definition.
|
||||
PyTypeObjectDefinitionsOfModule(CRL,Ispd05)
|
||||
|
||||
|
||||
#endif // End of Shared Library Code Part.
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // CRL namespace.
|
|
@ -0,0 +1,53 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2012-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | Alliance / Hurricane Interface |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./crlcore/PyIspd05.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef CRL_PY_ACMSIGDA_H
|
||||
#define CRL_PY_ACMSIGDA_H
|
||||
|
||||
#include "hurricane/isobar/PyHurricane.h"
|
||||
|
||||
|
||||
namespace CRL {
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Python Object : "PyIspd05".
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
} PyIspd05;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Functions & Types exported to "PyCRL.ccp".
|
||||
|
||||
extern PyTypeObject PyTypeIspd05;
|
||||
extern PyMethodDef PyIspd05_Methods[];
|
||||
|
||||
extern void PyIspd05_LinkPyType();
|
||||
|
||||
|
||||
#define IsPyIspd05(v) ( (v)->ob_type == &PyTypeIspd05 )
|
||||
#define PY_ISPD05(v) ( (PyIspd05*)(v) )
|
||||
|
||||
|
||||
} // extern "C".
|
||||
|
||||
} // Hurricane namespace.
|
||||
|
||||
#endif // CRL_PY_ACMSIGDA_H
|
|
@ -187,10 +187,11 @@ void Cell::setAbutmentBox(const Box& abutmentBox)
|
|||
}
|
||||
}
|
||||
|
||||
void Cell::flattenNets(bool buildRings)
|
||||
// ************************************
|
||||
void Cell::flattenNets(unsigned int flags)
|
||||
// ***************************************
|
||||
{
|
||||
UpdateSession::open();
|
||||
bool buildRings = flags & BuildRings;
|
||||
|
||||
forEach ( Occurrence, ioccurrence, getHyperNetRootNetOccurrences() ) {
|
||||
Net* net = static_cast<Net*>((*ioccurrence).getEntity());
|
||||
|
@ -198,7 +199,7 @@ void Cell::flattenNets(bool buildRings)
|
|||
HyperNet hyperNet ( *ioccurrence );
|
||||
if ( not (*ioccurrence).getPath().isEmpty() ) {
|
||||
DeepNet* deepNet = DeepNet::create ( hyperNet );
|
||||
if (deepNet) deepNet->_createRoutingPads ( buildRings );
|
||||
if (deepNet) deepNet->_createRoutingPads ( flags );
|
||||
} else {
|
||||
RoutingPad* previousRP = NULL;
|
||||
RoutingPad* currentRP = NULL;
|
||||
|
@ -216,9 +217,11 @@ void Cell::flattenNets(bool buildRings)
|
|||
}
|
||||
|
||||
forEach ( Occurrence, iplugOccurrence, hyperNet.getLeafPlugOccurrences() ) {
|
||||
currentRP = RoutingPad::create ( net, *iplugOccurrence, RoutingPad::BiggestArea/*|RoutingPad::ShowWarning*/ );
|
||||
currentRP = RoutingPad::create ( net, *iplugOccurrence, RoutingPad::BiggestArea );
|
||||
currentRP->materialize ();
|
||||
if ( buildRings ) {
|
||||
if ( flags & WarnOnUnplacedInstances )
|
||||
currentRP->isPlacedOccurrence ( RoutingPad::ShowWarning );
|
||||
if ( flags & BuildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->getBodyHook()->attach ( previousRP->getBodyHook() );
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// Copyright (c) BULL S.A. 2000-2014, All Rights Reserved
|
||||
//
|
||||
// This file is part of Hurricane.
|
||||
//
|
||||
|
@ -19,12 +18,7 @@
|
|||
// License along with Hurricane. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $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 |
|
||||
// | |
|
||||
|
@ -32,10 +26,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./DeepNet.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "hurricane/DeepNet.h"
|
||||
|
@ -54,126 +45,81 @@
|
|||
|
||||
namespace Hurricane {
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace Hurricane;
|
||||
|
||||
|
||||
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
} // End of local namespace.
|
||||
|
||||
|
||||
// x-----------------------------------------------------------------x
|
||||
// | "::DeepNet" Class Definitions |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Constructor : "DeepNet::DeepNet ()".
|
||||
|
||||
DeepNet::DeepNet ( Occurrence& netOccurrence )
|
||||
: Net(netOccurrence.getOwnerCell()
|
||||
,netOccurrence.getName()
|
||||
)
|
||||
, _netOccurrence(netOccurrence)
|
||||
{
|
||||
}
|
||||
// Class : "DeepNet".
|
||||
|
||||
|
||||
DeepNet::DeepNet ( Occurrence& netOccurrence )
|
||||
: Net(netOccurrence.getOwnerCell()
|
||||
,netOccurrence.getName()
|
||||
)
|
||||
, _netOccurrence(netOccurrence)
|
||||
{ }
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Inspector Management : "DeepNet::_getRecord ()".
|
||||
DeepNet* DeepNet::create ( HyperNet& hyperNet )
|
||||
{
|
||||
if (not hyperNet.isValid())
|
||||
throw Error ( "Can't create " + _TName("DeepNet") + ": occurence is invalid." );
|
||||
|
||||
Record* DeepNet::_getRecord () const
|
||||
{
|
||||
Record* record = Net::_getRecord();
|
||||
if (record) {
|
||||
record->add(getSlot("_netOccurrence", &_netOccurrence));
|
||||
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence( hyperNet.getNetOccurrence() );
|
||||
|
||||
if (rootNetOccurrence.getMasterCell()->isFlattenLeaf()) return NULL;
|
||||
if (rootNetOccurrence.getPath().isEmpty()) return NULL;
|
||||
|
||||
DeepNet* deepNet = new DeepNet( rootNetOccurrence );
|
||||
deepNet->_postCreate();
|
||||
|
||||
return deepNet;
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
# endif
|
||||
size_t DeepNet::_createRoutingPads ( unsigned int flags )
|
||||
{
|
||||
size_t nbRoutingPads = 0;
|
||||
HyperNet hyperNet ( _netOccurrence );
|
||||
|
||||
RoutingPad* previousRP = NULL;
|
||||
RoutingPad* currentRP = NULL;
|
||||
forEach ( Occurrence, ioccurrence, hyperNet.getLeafPlugOccurrences() ) {
|
||||
nbRoutingPads++;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Constructor : "DeepNet::create ()".
|
||||
currentRP = RoutingPad::create( this, *ioccurrence, RoutingPad::BiggestArea );
|
||||
if (flags & Cell::WarnOnUnplacedInstances)
|
||||
currentRP->isPlacedOccurrence ( RoutingPad::ShowWarning );
|
||||
|
||||
DeepNet* DeepNet::create ( HyperNet& hyperNet )
|
||||
{
|
||||
if ( !hyperNet.isValid() )
|
||||
throw Error ( "Can't create " + _TName("DeepNet") + ": occurence is invalid." );
|
||||
|
||||
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence ( hyperNet.getNetOccurrence() );
|
||||
|
||||
if ( rootNetOccurrence.getMasterCell()->isFlattenLeaf() ) return NULL;
|
||||
if ( rootNetOccurrence.getPath().isEmpty() ) return NULL;
|
||||
|
||||
DeepNet* deepNet = new DeepNet ( rootNetOccurrence );
|
||||
deepNet->_postCreate ();
|
||||
|
||||
return deepNet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Internal Modifier : "DeepNet::_createRoutingPads ()".
|
||||
|
||||
size_t DeepNet::_createRoutingPads ( bool buildRings )
|
||||
{
|
||||
size_t nbRoutingPads = 0;
|
||||
HyperNet hyperNet ( _netOccurrence );
|
||||
|
||||
RoutingPad* previousRP = NULL;
|
||||
RoutingPad* currentRP = NULL;
|
||||
for_each_occurrence ( plugOccurrence, hyperNet.getLeafPlugOccurrences() ) {
|
||||
nbRoutingPads++;
|
||||
|
||||
currentRP = RoutingPad::create ( this, plugOccurrence, RoutingPad::BiggestArea );
|
||||
if ( buildRings ) {
|
||||
if ( previousRP ) {
|
||||
currentRP->getBodyHook()->attach ( previousRP->getBodyHook() );
|
||||
if (flags & Cell::BuildRings) {
|
||||
if (previousRP) {
|
||||
currentRP->getBodyHook()->attach( previousRP->getBodyHook() );
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
previousRP = currentRP;
|
||||
}
|
||||
|
||||
end_for
|
||||
return nbRoutingPads;
|
||||
}
|
||||
|
||||
return nbRoutingPads;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
//
|
||||
|
||||
Net* getDeepNet(HyperNet& hypernet)
|
||||
// ********************************
|
||||
Net* getDeepNet ( HyperNet& hypernet )
|
||||
{
|
||||
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence ( hypernet.getNetOccurrence() );
|
||||
Occurrence rootNetOccurrence = getHyperNetRootNetOccurrence( hypernet.getNetOccurrence() );
|
||||
|
||||
//if ( rootNetOccurrence.getMasterCell()->IsFlattenLeaf() ) return NULL;
|
||||
//if ( rootNetOccurrence.getPath().isEmpty() ) return NULL;
|
||||
|
||||
return rootNetOccurrence.getOwnerCell()->getNet(rootNetOccurrence.getName());
|
||||
//if ( rootNetOccurrence.getMasterCell()->IsFlattenLeaf() ) return NULL;
|
||||
//if ( rootNetOccurrence.getPath().isEmpty() ) return NULL;
|
||||
|
||||
return rootNetOccurrence.getOwnerCell()->getNet(rootNetOccurrence.getName());
|
||||
}
|
||||
|
||||
|
||||
Record* DeepNet::_getRecord () const
|
||||
{
|
||||
Record* record = Net::_getRecord();
|
||||
if (record) {
|
||||
record->add( getSlot("_netOccurrence", &_netOccurrence) );
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -64,6 +64,7 @@ class Cell : public Entity {
|
|||
// Types
|
||||
// *****
|
||||
|
||||
public: enum Flag { BuildRings=0x0001, WarnOnUnplacedInstances=0x0002 };
|
||||
public: typedef Entity Inherit;
|
||||
public: typedef map<Name,ExtensionSlice*> ExtensionSliceMap;
|
||||
|
||||
|
@ -302,7 +303,7 @@ class Cell : public Entity {
|
|||
public: void setTerminal(bool isTerminal) {_isTerminal = isTerminal;};
|
||||
public: void setFlattenLeaf(bool isFlattenLeaf) {_isFlattenLeaf = isFlattenLeaf;};
|
||||
public: void setPad(bool isPad) {_isPad = isPad;};
|
||||
public: void flattenNets(bool buildRings=true);
|
||||
public: void flattenNets(unsigned int flags=BuildRings);
|
||||
public: void materialize();
|
||||
public: void unmaterialize();
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved
|
||||
// Copyright (c) BULL S.A. 2000-2014, All Rights Reserved
|
||||
//
|
||||
// This file is part of Hurricane.
|
||||
//
|
||||
|
@ -19,12 +18,7 @@
|
|||
// License along with Hurricane. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $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 |
|
||||
// | |
|
||||
|
@ -32,29 +26,21 @@
|
|||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./hurricane/DeepNet.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
# ifndef __HURRICANE_DEEPNET__
|
||||
# define __HURRICANE_DEEPNET__
|
||||
#ifndef HURRICANE_DEEPNET_H
|
||||
#define HURRICANE_DEEPNET_H
|
||||
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/HyperNet.h"
|
||||
#include "hurricane/Occurrence.h"
|
||||
|
||||
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class DeepNet : public Net {
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
|
||||
// Attributes.
|
||||
protected:
|
||||
Occurrence _netOccurrence;
|
||||
|
@ -68,8 +54,6 @@ namespace Hurricane {
|
|||
virtual Record* _getRecord () const;
|
||||
virtual string _getTypeName() const { return "DeepNet"; };
|
||||
|
||||
# endif
|
||||
|
||||
// Constructors.
|
||||
public:
|
||||
static DeepNet* create ( HyperNet& hyperNet );
|
||||
|
@ -83,16 +67,13 @@ namespace Hurricane {
|
|||
|
||||
// Internal Modifiers.
|
||||
public:
|
||||
size_t _createRoutingPads ( bool buildRings=false );
|
||||
size_t _createRoutingPads ( unsigned int flags=0 );
|
||||
|
||||
};
|
||||
|
||||
Net* getDeepNet(HyperNet& hyperNet);
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
} // Hurricane namespace.
|
||||
|
||||
|
||||
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace Hurricane {
|
|||
enum Flags { BiggestArea = 0x0001
|
||||
, HighestLayer = 0x0002
|
||||
, LowestLayer = 0x0004
|
||||
, ComponentSelection=BiggestArea|HighestLayer|LowestLayer
|
||||
, ComponentSelection= BiggestArea|HighestLayer|LowestLayer
|
||||
, ShowWarning = 0x0008
|
||||
};
|
||||
public:
|
||||
|
|
|
@ -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
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
|
@ -262,8 +261,13 @@ namespace Hurricane {
|
|||
if ( (_history.getSlot() != NULL) and (record == NULL) )
|
||||
record = _history.getSlot()->getDataRecord();
|
||||
|
||||
//cerr << " Effective setSlot() ." << endl;
|
||||
change = _baseModel->setSlot ( _history.getSlot(), record, _history.getDepth() );
|
||||
// if (_history.getSlot())
|
||||
// cerr << " Effective setSlot() " << _history.getSlot()->getName() << endl;
|
||||
// else
|
||||
// cerr << " Effective setSlot() NULL" << endl;
|
||||
|
||||
change = _baseModel->setSlot( _history.getSlot(), record, _history.getDepth() );
|
||||
//cerr << " setSlot() succeeded." << endl;
|
||||
|
||||
return change;
|
||||
}
|
||||
|
@ -273,14 +277,14 @@ namespace Hurricane {
|
|||
{
|
||||
//cerr << "InspectorWidget::pushSlot()" << endl;
|
||||
|
||||
if ( slot == NULL ) return;
|
||||
if ( record == NULL ) {
|
||||
record = slot->getDataRecord ();
|
||||
if ( record == NULL ) return;
|
||||
if (slot == NULL) return;
|
||||
if (record == NULL) {
|
||||
record = slot->getDataRecord();
|
||||
if (record == NULL) return;
|
||||
}
|
||||
|
||||
_history.push ( slot, record );
|
||||
setSlot ( record );
|
||||
_history.push( slot, record );
|
||||
setSlot( record );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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,10 +11,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./RecordModel.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <QFont>
|
||||
|
@ -54,6 +45,8 @@ namespace Hurricane {
|
|||
{
|
||||
//cerr << " Slot change" << endl;
|
||||
|
||||
emit layoutAboutToBeChanged ();
|
||||
|
||||
vector< pair<QVariant,QVariant> >().swap ( _cache );
|
||||
|
||||
if ( _slot ) {
|
||||
|
@ -77,9 +70,10 @@ namespace Hurricane {
|
|||
record = slot->getDataRecord ();
|
||||
//cerr << " New record build" << endl;
|
||||
if ( record == NULL ) {
|
||||
// cerr << " Slot " << slot->getDataString() << " has NULL Record" << endl;
|
||||
//cerr << " Slot " << slot->getDataString() << " has NULL Record" << endl;
|
||||
|
||||
delete slot;
|
||||
emit layoutChanged ();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -235,7 +235,9 @@ namespace Kite {
|
|||
Cell* cell = getCell();
|
||||
//Box cellBb = cell->getBoundingBox();
|
||||
if (not _knik) {
|
||||
cell->flattenNets( mode & KtBuildGlobalRouting );
|
||||
unsigned int flags = Cell::WarnOnUnplacedInstances;
|
||||
flags |= (mode & KtBuildGlobalRouting) ? Cell::BuildRings : 0;
|
||||
cell->flattenNets( flags );
|
||||
|
||||
KatabaticEngine::chipPrep();
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace Knik {
|
|||
KnikEngine* knik = KnikEngine::get ( cell );
|
||||
if ( !knik ) {
|
||||
if ( cell->getRubbers().getFirst() == NULL )
|
||||
cell->flattenNets ( (mode==BuildSolution) );
|
||||
cell->flattenNets ( ((mode==BuildSolution)?Cell::BuildRings:0) );
|
||||
knik = KnikEngine::create ( cell
|
||||
, _congestion
|
||||
, _preCongestion
|
||||
|
@ -186,7 +186,7 @@ namespace Knik {
|
|||
|
||||
emit cellPreModificated();
|
||||
|
||||
cell->flattenNets ( (true) );
|
||||
cell->flattenNets ( Cell::BuildRings );
|
||||
|
||||
emit cellPostModificated();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
)
|
||||
add_definitions ( -DSYS_CONF_DIR="${SYS_CONF_DIR}" )
|
||||
|
||||
set ( includes unicorn/ImportCell.h )
|
||||
set ( mocincludes unicorn/UnicornGui.h
|
||||
unicorn/OpenCellDialog.h
|
||||
unicorn/SaveCellDialog.h
|
||||
|
@ -21,7 +22,8 @@
|
|||
)
|
||||
set ( pyIncludes unicorn/PyUnicornGui.h
|
||||
)
|
||||
set ( cpps OpenCellDialog.cpp
|
||||
set ( cpps ImportCell.cpp
|
||||
OpenCellDialog.cpp
|
||||
SaveCellDialog.cpp
|
||||
ImportCellDialog.cpp
|
||||
ExportCellDialog.cpp
|
||||
|
@ -88,7 +90,7 @@
|
|||
install ( TARGETS pyUnicorn DESTINATION ${PYTHON_SITE_PACKAGES} )
|
||||
install ( TARGETS cgt.bin DESTINATION bin )
|
||||
install ( PROGRAMS cgt.py DESTINATION bin RENAME cgt )
|
||||
#install ( PROGRAMS cgt3.py DESTINATION bin RENAME cgt3 )
|
||||
install ( FILES ${mocincludes}
|
||||
install ( FILES ${includes}
|
||||
${mocincludes}
|
||||
${pyIncludes} DESTINATION include/coriolis2/unicorn )
|
||||
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
// -*- 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 |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./ImportCell.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include "hurricane/Error.h"
|
||||
#include "crlcore/AcmSigda.h"
|
||||
#include "crlcore/Ispd04Bookshelf.h"
|
||||
#include "crlcore/Ispd05Bookshelf.h"
|
||||
#include "crlcore/Iccad04Lefdef.h"
|
||||
#include "crlcore/DefImport.h"
|
||||
#include "unicorn/ImportCell.h"
|
||||
|
||||
|
||||
namespace Unicorn {
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Cell;
|
||||
using CRL::AcmSigda;
|
||||
using CRL::Ispd04;
|
||||
using CRL::Ispd05;
|
||||
using CRL::Iccad04Lefdef;
|
||||
using CRL::DefImport;
|
||||
|
||||
|
||||
Cell* ImportCell::load ( const string& cellName, int format )
|
||||
{
|
||||
Cell* cell = NULL;
|
||||
|
||||
switch ( format ) {
|
||||
case AcmSigda:
|
||||
cell = AcmSigda::load( cellName );
|
||||
break;
|
||||
case Ispd04:
|
||||
cell = Ispd04::load( cellName );
|
||||
break;
|
||||
case Ispd05:
|
||||
cell = Ispd05::load( cellName );
|
||||
break;
|
||||
case Iccad04:
|
||||
cell = Iccad04Lefdef::load( cellName, 0 );
|
||||
break;
|
||||
case AllianceDef:
|
||||
cell = DefImport::load( cellName.c_str() , DefImport::FitAbOnCells );
|
||||
break;
|
||||
}
|
||||
|
||||
if (not cell) {
|
||||
cerr << Error( "Cell not found: %s", cellName.c_str() ) << endl;
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
} // Unicorn namespace.
|
|
@ -14,21 +14,20 @@
|
|||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
#include <QCheckBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
|
||||
#include "unicorn/ImportCellDialog.h"
|
||||
#include <QLabel>
|
||||
#include <QPushButton>
|
||||
#include <QLineEdit>
|
||||
#include <QComboBox>
|
||||
#include <QCheckBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
#include "unicorn/ImportCell.h"
|
||||
#include "unicorn/ImportCellDialog.h"
|
||||
|
||||
|
||||
namespace Unicorn {
|
||||
|
@ -82,11 +81,11 @@ namespace Unicorn {
|
|||
formatLabel->setFont ( Graphics::getNormalFont(true) );
|
||||
hLayout2->addWidget ( formatLabel );
|
||||
|
||||
_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 );
|
||||
_formatComboBox->addItem ( tr("ACM/SIGDA (aka MCNC, .bench)"), ImportCell::AcmSigda );
|
||||
_formatComboBox->addItem ( tr("ISPD'04 (Bookshelf)") , ImportCell::Ispd04 );
|
||||
_formatComboBox->addItem ( tr("ISPD'05 (Bookshelf)") , ImportCell::Ispd05 );
|
||||
_formatComboBox->addItem ( tr("ICCAD'04 (LEF/DEF)") , ImportCell::Iccad04 );
|
||||
_formatComboBox->addItem ( tr("Alliance compliant DEF") , ImportCell::AllianceDef );
|
||||
hLayout2->addWidget ( _formatComboBox );
|
||||
|
||||
QVBoxLayout* vLayout = new QVBoxLayout ();
|
||||
|
|
|
@ -14,40 +14,27 @@
|
|||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/viewer/CellWidget.h"
|
||||
|
||||
#include "crlcore/Catalog.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
#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"
|
||||
|
||||
#include "unicorn/OpenCellDialog.h"
|
||||
#include "unicorn/SaveCellDialog.h"
|
||||
#include "unicorn/ImportCellDialog.h"
|
||||
#include "unicorn/ExportCellDialog.h"
|
||||
#include "unicorn/UnicornGui.h"
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/viewer/CellWidget.h"
|
||||
#include "crlcore/Catalog.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
#include "crlcore/GraphicToolEngine.h"
|
||||
#include "crlcore/DefExport.h"
|
||||
#include "unicorn/ImportCell.h"
|
||||
#include "unicorn/OpenCellDialog.h"
|
||||
#include "unicorn/SaveCellDialog.h"
|
||||
#include "unicorn/ImportCellDialog.h"
|
||||
#include "unicorn/ExportCellDialog.h"
|
||||
#include "unicorn/UnicornGui.h"
|
||||
|
||||
|
||||
namespace Unicorn {
|
||||
|
||||
|
||||
using Hurricane::Warning;
|
||||
using CRL::Catalog;
|
||||
using CRL::AllianceFramework;
|
||||
using CRL::AcmSigda;
|
||||
using CRL::Ispd04;
|
||||
using CRL::Ispd05;
|
||||
using CRL::Iccad04Lefdef;
|
||||
using CRL::DefImport;
|
||||
using CRL::DefExport;
|
||||
|
||||
|
||||
|
@ -186,36 +173,17 @@ namespace Unicorn {
|
|||
bool newViewer;
|
||||
int format;
|
||||
|
||||
if ( _importDialog->runDialog ( cellName, format, newViewer ) ) {
|
||||
Cell* cell = NULL;
|
||||
if ( _importDialog->runDialog( cellName, format, newViewer ) ) {
|
||||
Cell* cell = ImportCell::load( cellName.toStdString(), format );
|
||||
|
||||
switch ( format ) {
|
||||
case ImportCellDialog::AcmSigda:
|
||||
cell = AcmSigda::load ( cellName.toStdString() );
|
||||
break;
|
||||
case ImportCellDialog::Ispd04:
|
||||
cell = Ispd04::load ( cellName.toStdString() );
|
||||
break;
|
||||
case ImportCellDialog::Ispd05:
|
||||
cell = Ispd05::load ( cellName.toStdString() );
|
||||
break;
|
||||
case ImportCellDialog::Iccad04:
|
||||
cell = Iccad04Lefdef::load ( cellName.toStdString() , 0 );
|
||||
break;
|
||||
case ImportCellDialog::AllianceDef:
|
||||
cell = DefImport::load ( cellName.toStdString().c_str() , DefImport::FitAbOnCells );
|
||||
break;
|
||||
}
|
||||
|
||||
if ( cell ) {
|
||||
if (cell) {
|
||||
UnicornGui* viewer = this;
|
||||
if ( newViewer ) {
|
||||
viewer = UnicornGui::create ();
|
||||
viewer->show ();
|
||||
if (newViewer) {
|
||||
viewer = UnicornGui::create();
|
||||
viewer->show();
|
||||
}
|
||||
viewer->setCell ( cell );
|
||||
} else
|
||||
cerr << "[ERROR] Cell not found: " << cellName.toStdString() << endl;
|
||||
viewer->setCell( cell );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ if __name__ == '__main__':
|
|||
parser = optparse.OptionParser(usage)
|
||||
parser.add_option( '-c', '--cell' , type='string' , dest='cell' , help='The name of the cell to load, whithout extension.')
|
||||
parser.add_option( '--acm-sigda-89' , type='string' , dest='acmSigdaName' , help='An ACM/SIGDA 89 bench name to load, whithout extension.')
|
||||
parser.add_option( '--ispd-05' , type='string' , dest='ispd05name' , help='An ISPD 05 bench (placement) name to load, whithout extension.')
|
||||
parser.add_option( '--script' , type='string' , dest='script' , help='Run a Python or Stratus script.')
|
||||
parser.add_option( '-v', '--verbose' , action='store_true', dest='verbose' , help='First level of verbosity.')
|
||||
parser.add_option( '-V', '--very-verbose' , action='store_true', dest='veryVerbose' , help='Second level of verbosity.')
|
||||
|
@ -141,6 +142,8 @@ if __name__ == '__main__':
|
|||
cell = None
|
||||
if options.acmSigdaName:
|
||||
cell = CRL.AcmSigda.load(options.acmSigdaName)
|
||||
if options.ispd05name:
|
||||
cell = CRL.Ispd05.load(options.ispd05name)
|
||||
elif options.cell:
|
||||
cell = af.getCell(options.cell, CRL.Catalog.State.Views)
|
||||
else:
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
// -*- 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 |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./ImportCell.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef UNICORN_IMPORT_CELL_H
|
||||
#define UNICORN_IMPORT_CELL_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace Hurricane {
|
||||
class Cell;
|
||||
}
|
||||
|
||||
namespace Unicorn {
|
||||
|
||||
|
||||
class ImportCell {
|
||||
public:
|
||||
enum Formats { AcmSigda=1, Ispd04, Ispd05, Iccad04, AllianceDef };
|
||||
public:
|
||||
static Hurricane::Cell* load ( const std::string&, int format );
|
||||
};
|
||||
|
||||
|
||||
} // Unicorn namespace.
|
||||
|
||||
#endif
|
|
@ -30,8 +30,6 @@ namespace Unicorn {
|
|||
class ImportCellDialog : public QDialog {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
enum Formats { AcmSigda=1, Ispd04, Ispd05, Iccad04, AllianceDef };
|
||||
public:
|
||||
ImportCellDialog ( QWidget* parent=NULL );
|
||||
bool runDialog ( QString& name, int& format, bool& newViewerRequest );
|
||||
|
|
|
@ -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 |
|
||||
|
@ -17,8 +16,8 @@
|
|||
|
||||
|
||||
|
||||
#ifndef __UNICORN_UNICORN__
|
||||
#define __UNICORN_UNICORN__
|
||||
#ifndef UNICORN_UNICORN_H
|
||||
#define UNICORN_UNICORN_H
|
||||
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the VSLSI Stand-Alone Software.
|
||||
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | V L S I Stand - Alone Parsers / Drivers |
|
||||
// | B o o k s h e l f P a r s e r |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./Bookshelf.cpp" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include "vlsisapd/bookshelf/Bookshelf.h"
|
||||
#include "vlsisapd/bookshelf/BookshelfException.h"
|
||||
|
||||
|
||||
namespace Bookshelf {
|
||||
|
||||
|
||||
BookshelfParser::BookshelfParser ()
|
||||
{ }
|
||||
|
||||
|
||||
void BookshelfParser::readFromFile ( std::string auxFile )
|
||||
{
|
||||
Utilities::Path auxPath ( auxFile );
|
||||
if ( not auxPath.exists() ) {
|
||||
throw BookshelfException ( "%s .aux file not found.", auxPath.string().c_str() );
|
||||
}
|
||||
|
||||
std::cout << " o Reading Bookshelf .aux: <" << auxPath.string() << ">." << std::endl;
|
||||
}
|
||||
|
||||
|
||||
} // End of Bookself namespace.
|
Loading…
Reference in New Issue