2010-03-09 09:26:22 -06:00
|
|
|
// -*- C++ -*-
|
|
|
|
//
|
|
|
|
// This file is part of the Coriolis Software.
|
2015-03-17 10:42:12 -05:00
|
|
|
// Copyright (c) UPMC/LIP6 2008-2015, All Rights Reserved
|
2010-03-09 09:26:22 -06:00
|
|
|
//
|
2012-11-16 06:54:58 -06:00
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:26:22 -06:00
|
|
|
// | 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 |
|
|
|
|
// | =============================================================== |
|
2012-11-16 06:54:58 -06:00
|
|
|
// | C++ Module : "./UnicornGui.cpp" |
|
|
|
|
// +-----------------------------------------------------------------+
|
2010-03-09 09:26:22 -06:00
|
|
|
|
|
|
|
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
#include <Python.h>
|
2014-03-26 08:47:17 -05:00
|
|
|
#include <QAction>
|
|
|
|
#include <QMenu>
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
#include "hurricane/DebugSession.h"
|
2014-03-26 08:47:17 -05:00
|
|
|
#include "hurricane/Warning.h"
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
#include "hurricane/viewer/Script.h"
|
2014-07-05 08:49:32 -05:00
|
|
|
#include "hurricane/viewer/CellViewer.h"
|
|
|
|
#include "hurricane/viewer/PyCellViewer.h"
|
2014-12-09 16:49:46 -06:00
|
|
|
#include "crlcore/Utilities.h"
|
2014-03-26 08:47:17 -05:00
|
|
|
#include "crlcore/Catalog.h"
|
|
|
|
#include "crlcore/AllianceFramework.h"
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
#include "crlcore/LibraryManager.h"
|
2014-03-26 08:47:17 -05:00
|
|
|
#include "crlcore/GraphicToolEngine.h"
|
2015-03-21 11:29:04 -05:00
|
|
|
#include "crlcore/AcmSigda.h"
|
|
|
|
#include "crlcore/Ispd04Bookshelf.h"
|
|
|
|
#include "crlcore/Ispd05Bookshelf.h"
|
2015-03-27 09:51:58 -05:00
|
|
|
#include "crlcore/Blif.h"
|
2015-03-21 11:29:04 -05:00
|
|
|
#include "crlcore/Iccad04Lefdef.h"
|
|
|
|
#include "crlcore/DefImport.h"
|
2014-03-26 08:47:17 -05:00
|
|
|
#include "crlcore/DefExport.h"
|
2014-07-31 12:40:23 -05:00
|
|
|
#include "crlcore/GdsDriver.h"
|
2014-03-26 08:47:17 -05:00
|
|
|
#include "unicorn/ImportCell.h"
|
|
|
|
#include "unicorn/OpenCellDialog.h"
|
|
|
|
#include "unicorn/SaveCellDialog.h"
|
|
|
|
#include "unicorn/ImportCellDialog.h"
|
|
|
|
#include "unicorn/ExportCellDialog.h"
|
|
|
|
#include "unicorn/UnicornGui.h"
|
2010-03-09 09:26:22 -06:00
|
|
|
|
|
|
|
|
|
|
|
namespace Unicorn {
|
|
|
|
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
using Hurricane::dbo_ptr;
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
using Hurricane::DebugSession;
|
2010-03-09 09:26:22 -06:00
|
|
|
using Hurricane::Warning;
|
2014-07-05 08:49:32 -05:00
|
|
|
using Hurricane::PyCellViewer_Link;
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
using Hurricane::jsonCellParse;
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
using CRL::System;
|
2010-03-09 09:26:22 -06:00
|
|
|
using CRL::Catalog;
|
|
|
|
using CRL::AllianceFramework;
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
using CRL::LibraryManager;
|
2015-03-21 11:29:04 -05:00
|
|
|
using CRL::AcmSigda;
|
|
|
|
using CRL::Ispd04;
|
|
|
|
using CRL::Ispd05;
|
2015-03-27 09:51:58 -05:00
|
|
|
using CRL::Blif;
|
2015-03-21 11:29:04 -05:00
|
|
|
using CRL::Iccad04Lefdef;
|
|
|
|
using CRL::DefImport;
|
2010-08-22 07:39:05 -05:00
|
|
|
using CRL::DefExport;
|
2014-07-31 12:40:23 -05:00
|
|
|
using CRL::GdsDriver;
|
2010-03-09 09:26:22 -06:00
|
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
// Class : "UnicornGui".
|
|
|
|
|
|
|
|
|
2010-06-22 08:59:40 -05:00
|
|
|
Banner UnicornGui::_banner ( "Unicorn"
|
|
|
|
, "1.0b"
|
|
|
|
, "Coriolis Main GUI"
|
|
|
|
, "2008"
|
|
|
|
, "Jean-Paul Chaput"
|
|
|
|
, ""
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2010-03-09 09:26:22 -06:00
|
|
|
UnicornGui::UnicornGui ( QWidget* parent )
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
: CellViewer (parent)
|
|
|
|
, _tools ()
|
|
|
|
, _importCell ()
|
|
|
|
, _importDialog (new ImportCellDialog(this))
|
|
|
|
, _exportDialog (new ExportCellDialog(this))
|
|
|
|
, _libraryManager(new LibraryManager ())
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
{
|
|
|
|
addMenu ( "placeAndRoute" , "P&&R" , CellViewer::TopMenu );
|
|
|
|
addMenu ( "placeAndRoute.stepByStep", "&Step by Step" );
|
|
|
|
addToMenu( "placeAndRoute.========" );
|
|
|
|
|
|
|
|
_runUnicornInit();
|
2015-03-21 11:29:04 -05:00
|
|
|
|
|
|
|
_importCell.setDialog( _importDialog );
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
_importCell.addImporter( "JSON (experimental)" , std::bind( &jsonCellParse , placeholders::_1 ) );
|
2015-05-02 13:53:50 -05:00
|
|
|
_importCell.addImporter( "BLIF (Yosys/ABC)" , std::bind( &Blif::load , placeholders::_1 ) );
|
2015-03-21 11:29:04 -05:00
|
|
|
_importCell.addImporter( "ACM/SIGDA (aka MCNC, .bench)", std::bind( &AcmSigda::load , placeholders::_1 ) );
|
|
|
|
_importCell.addImporter( "ISPD'04 (Bookshelf)" , std::bind( &Ispd04::load , placeholders::_1 ) );
|
|
|
|
_importCell.addImporter( "ISPD'05 (Bookshelf)" , std::bind( &Ispd05::load , placeholders::_1 ) );
|
|
|
|
_importCell.addImporter( "ICCAD'04 (LEF/DEF)" , std::bind( &Iccad04Lefdef::load, placeholders::_1, 0 ) );
|
|
|
|
_importCell.addImporter( "Alliance compliant DEF" , std::bind( &DefImport::load , placeholders::_1, DefImport::FitAbOnCells) );
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
|
|
|
|
_libraryManager->setCellViewer( this );
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
}
|
2010-03-09 09:26:22 -06:00
|
|
|
|
|
|
|
|
|
|
|
UnicornGui::~UnicornGui ()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
void UnicornGui::_runUnicornInit ()
|
|
|
|
{
|
|
|
|
Utilities::Path pythonSitePackages = System::getPath("pythonSitePackages");
|
|
|
|
Utilities::Path systemConfDir = pythonSitePackages / "unicorn";
|
|
|
|
Utilities::Path systemConfFile = systemConfDir / "unicornInit.py";
|
|
|
|
|
|
|
|
if (systemConfFile.exists()) {
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
Isobar::Script::addPath( systemConfDir.toString() );
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
dbo_ptr<Isobar::Script> script = Isobar::Script::create( systemConfFile.stem().toString() );
|
2014-07-05 08:49:32 -05:00
|
|
|
script->addKwArgument( "editor" , (PyObject*)PyCellViewer_Link(this) );
|
|
|
|
script->runFunction ( "unicornConfigure", getCell() );
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
Isobar::Script::removePath( systemConfDir.toString() );
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
} else {
|
2014-07-05 11:02:51 -05:00
|
|
|
cerr << Warning("Unicorn system configuration file:\n <%s> not found."
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
,systemConfFile.toString().c_str()) << endl;
|
Support for Python plugins in CellViewer/Unicorn. ClockTree plugin.
* New: In Hurricane, in CellViewer, create a simpler API to graft menu
and actions into the menubar. Mainly addToMenu() which take care of
the QAction creation but also locate the relevant QMenu, base on
the Qt object name. Regroup all the widget & action creation inside
the body of the constructor, this way almost all actions can be
removed from the attributes of the CellViewer.
addToMenu() is supplied in three flavors:
1. For C++ callbacks in GraphicToolEngines (with a binded
member function method).
2. For running Python scripts to be used by the plugin system.
3. To insert separator in menus (to give a more homogeneous
look).
Remove the last remnants of Stratus scripts (unificated with basic
Python scripts).
* New: In Hurricane, in PyCellViewer, export the interface to graft
Python scripts into the CellViewer menu tree.
* Change: In Etesian, in GraphicEtesianEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Mauka, in GraphicMaukaEngine, use the new API to
graft menus & callbacks into the CellViewer.
* Change: In Kite, in GraphicKiteEngine, use the new API to
graft menus & callbacks into the CellViewer.
* New: In Cumulus, install Python scripts as plugins for Unicorn under
<PYTHON_SITE_PACKAGES>/cumulus/plugins/.
* New: In Unicorn, in UnicornGui, make uses of the new API for creating
menus in the CellViewer. Creates the stem menu for the P&R tools.
Add a Python initialization mechanism to read the plugins
installeds into <PYTHON_SITE_PACKAGES>/cumulus/plugins/.
2014-06-25 12:50:34 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:26:22 -06:00
|
|
|
UnicornGui* UnicornGui::create ( QWidget* parent )
|
|
|
|
{
|
|
|
|
UnicornGui* unicorn = new UnicornGui ( parent );
|
|
|
|
|
|
|
|
unicorn->_postCreate ();
|
|
|
|
|
|
|
|
return unicorn;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
UnicornGui* UnicornGui::vcreate () const
|
|
|
|
{ return UnicornGui::create(); }
|
|
|
|
|
|
|
|
|
2010-03-09 09:26:22 -06:00
|
|
|
void UnicornGui::destroy ()
|
|
|
|
{
|
|
|
|
_preDestroy ();
|
|
|
|
delete this;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UnicornGui::_postCreate ()
|
|
|
|
{
|
|
|
|
setApplicationName ( tr("unicorn") );
|
|
|
|
setWindowIcon ( QIcon(":/images/diet-coke.png") );
|
|
|
|
|
|
|
|
QAction* openAction = findChild<QAction*>("viewer.menuBar.file.openCell");
|
|
|
|
if ( openAction ) {
|
|
|
|
connect ( openAction, SIGNAL(triggered()), this, SLOT(openCell()) );
|
|
|
|
}
|
2010-05-14 02:37:33 -05:00
|
|
|
|
|
|
|
QAction* saveAction = findChild<QAction*>("viewer.menuBar.file.saveCell");
|
|
|
|
if ( saveAction ) {
|
|
|
|
saveAction->setVisible ( true );
|
|
|
|
connect ( saveAction, SIGNAL(triggered()), this, SLOT(saveCell()) );
|
|
|
|
}
|
2010-08-22 07:39:05 -05:00
|
|
|
|
|
|
|
QAction* importAction = findChild<QAction*>("viewer.menuBar.file.importCell");
|
|
|
|
if ( importAction ) {
|
|
|
|
connect ( importAction, SIGNAL(triggered()), this, SLOT(importCell()) );
|
|
|
|
}
|
|
|
|
|
|
|
|
QAction* exportAction = findChild<QAction*>("viewer.menuBar.file.exportCell");
|
|
|
|
if ( exportAction ) {
|
|
|
|
connect ( exportAction, SIGNAL(triggered()), this, SLOT(exportCell()) );
|
|
|
|
}
|
New Library Manager Widget. Access with Tools menu or CTRL+M.
* New: In CRL Core, created a LibraryManager widget. It provides a
composite information based on what is present, for each
Alliance library:
1. - A Cell in memory, without Catalog::State.
2. - A Catalog::State, with or whithout the Cell in memory.
3. - The files of the Cell in the librariy's directory.
4. - A file with a format referenced for one of the importers.
File type recognition is based *only* on the file extension,
so it may easily confused. Be careful about what you put in
the library's directory.
One of the big limitation is that it will not display Hurricane
libraries that do not have the AllianceLibrary extension.
This widget is put in a separate library <libmanager>, included
in the default CRLCORE_LIBRARIES.
* Change: In CRL Core, in State (through the loader), now sets the
InMemory flag (event if nobody uses it yet...). Display it in
the state _getString().
In AllianceFramework, new getAllianceLibraries() method.
In CatalogExtension, make the static method "get()" publicly
accessible, for sometimes we want the whole State.
* Bug: In vlsisapd, in Path, the pathcache was not rebuild when it
should, leading to incorrect results.
* New: In vlsisapd, in Path, added a listdir() method to access the
contents of a directory and a stat() method to poll the status
of a file/directory.
Rename the ".string()" method in ".toString()" to avoid
tricky name resolution with std::string, refactor in all the
other tools.
* Change: In Hurricane, in Controller, no longer oversize the fonts
of the table's headers.
* New: In Unicorn, in UnicornGui, integrate LibraryManager.
2015-05-09 10:03:17 -05:00
|
|
|
|
|
|
|
QAction* action = addToMenu( "tools.libraryManager"
|
|
|
|
, tr("Library Manager")
|
|
|
|
, tr("Browse through Views, Cells & Libraries")
|
|
|
|
, QKeySequence(tr("CTRL+M"))
|
|
|
|
);
|
|
|
|
connect( action, SIGNAL(triggered()), _libraryManager, SLOT(toggleShow()) );
|
2016-01-20 17:25:39 -06:00
|
|
|
connect( this , SIGNAL(cellLoadedFromDisk(Cell*)), _libraryManager, SLOT(updateLibrary(Cell*)) );
|
2010-03-09 09:26:22 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UnicornGui::_preDestroy ()
|
|
|
|
{
|
|
|
|
set<GraphicTool*>::iterator itool = _tools.begin();
|
|
|
|
for ( ; itool != _tools.end() ; itool++ )
|
|
|
|
(*itool)->release ();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Cell* UnicornGui::getCellFromDb ( const char* name )
|
|
|
|
{
|
|
|
|
return AllianceFramework::get()->getCell ( name, Catalog::State::Views );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UnicornGui::registerTool ( GraphicTool* tool )
|
|
|
|
{
|
|
|
|
assert ( tool != NULL );
|
|
|
|
|
|
|
|
if ( _tools.find(tool) != _tools.end() ) {
|
|
|
|
cerr << Warning ( "Tool %s already registered in Unicorn (ignored)."
|
|
|
|
, getString(tool->getName()).c_str() ) << endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
_tools.insert ( tool );
|
|
|
|
|
|
|
|
const GraphicTool::DrawGoMap& drawGos = tool->getDrawGos ();
|
|
|
|
GraphicTool::DrawGoMap::const_iterator idrawGo = drawGos.begin();
|
|
|
|
|
|
|
|
for ( ; idrawGo != drawGos.end() ; idrawGo++ )
|
|
|
|
getCellWidget()->addDrawExtensionGo ( idrawGo->first
|
|
|
|
, idrawGo->second.getInit()
|
|
|
|
, idrawGo->second.getDraw()
|
|
|
|
);
|
|
|
|
|
|
|
|
tool->addToMenu ( this );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UnicornGui::openCell ()
|
|
|
|
{
|
|
|
|
UnicornGui* viewer = this;
|
|
|
|
QString cellName;
|
|
|
|
bool newViewer;
|
|
|
|
|
2010-05-14 02:37:33 -05:00
|
|
|
if ( OpenCellDialog::runDialog ( this, cellName, newViewer ) ) {
|
2010-03-09 09:26:22 -06:00
|
|
|
Cell* cell = getCellFromDb ( cellName.toStdString().c_str() );
|
|
|
|
if ( cell ) {
|
|
|
|
if ( newViewer ) {
|
|
|
|
viewer = UnicornGui::create ();
|
|
|
|
viewer->show ();
|
|
|
|
}
|
|
|
|
viewer->setCell ( cell );
|
2016-01-20 17:25:39 -06:00
|
|
|
emit cellLoadedFromDisk ( cell );
|
2010-03-09 09:26:22 -06:00
|
|
|
} else
|
|
|
|
cerr << "[ERROR] Cell not found: " << cellName.toStdString() << endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-08-22 07:39:05 -05:00
|
|
|
void UnicornGui::importCell ()
|
|
|
|
{
|
|
|
|
QString cellName;
|
|
|
|
bool newViewer;
|
|
|
|
int format;
|
|
|
|
|
2014-03-26 08:47:17 -05:00
|
|
|
if ( _importDialog->runDialog( cellName, format, newViewer ) ) {
|
2015-03-21 11:29:04 -05:00
|
|
|
Cell* cell = _importCell.load( cellName.toStdString(), format );
|
2010-08-22 07:39:05 -05:00
|
|
|
|
2014-03-26 08:47:17 -05:00
|
|
|
if (cell) {
|
2010-08-22 07:39:05 -05:00
|
|
|
UnicornGui* viewer = this;
|
2014-03-26 08:47:17 -05:00
|
|
|
if (newViewer) {
|
|
|
|
viewer = UnicornGui::create();
|
|
|
|
viewer->show();
|
2010-08-22 07:39:05 -05:00
|
|
|
}
|
2014-03-26 08:47:17 -05:00
|
|
|
viewer->setCell( cell );
|
2016-01-20 17:25:39 -06:00
|
|
|
emit cellLoadedFromDisk ( cell );
|
2014-03-26 08:47:17 -05:00
|
|
|
}
|
2010-08-22 07:39:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UnicornGui::exportCell ()
|
|
|
|
{
|
|
|
|
Cell* cell = getCell();
|
|
|
|
if ( cell == NULL ) return;
|
|
|
|
|
|
|
|
QString cellName= getString(cell->getName()).c_str();
|
|
|
|
int format;
|
|
|
|
|
|
|
|
if ( _exportDialog->runDialog ( cellName, format ) ) {
|
|
|
|
renameCell ( cellName.toStdString().c_str() );
|
|
|
|
switch ( format ) {
|
|
|
|
// case ImportCellDialog::AcmSigda:
|
|
|
|
// break;
|
|
|
|
// case ImportCellDialog::Ispd04:
|
|
|
|
// break;
|
|
|
|
// case ImportCellDialog::Iccad04:
|
|
|
|
// break;
|
|
|
|
case ExportCellDialog::AllianceDef:
|
|
|
|
DefExport::drive ( cell, DefExport::WithLEF );
|
|
|
|
break;
|
2014-07-31 12:40:23 -05:00
|
|
|
case ExportCellDialog::AsciiGds:
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
{ GdsDriver gdsDriver ( cell );
|
|
|
|
gdsDriver.save( getString(cell->getName())+".agds" );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case ExportCellDialog::Json:
|
2016-01-20 17:25:39 -06:00
|
|
|
{ //DebugSession::open( 50 );
|
|
|
|
JsonWriter writer ( cellName.toStdString()+".json.bz2" );
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
jsonWrite( &writer, cell );
|
2016-01-20 17:25:39 -06:00
|
|
|
//DebugSession::close();
|
Implementation of DataBase native save/restore in JSON (step 1).
* New: In Hurricane, added first support for DataBase native import/export
using JSON.
We choose RapidJSON, in SAX mode, to manage the JSON format low level
Read/Write. Thus, it's Git repository http://github.com/miloyip/rapidjson
must be added under ~/coriolis-2.x/src and manually build and installed
in the Coriolis installation tree (to be integrated in ccb later).
Two mode are being supported:
1. Cell mode: one Cell only is saved. In that mode, Entities
referred by Occurrences are "outside" the file. They are coded
through their "signature" (mostly, all the values of their
attributes). The ids saved in the file cannot be restored
identically as we cannot predict when and in which context the
Cell will be reloaded.
2. Design Blob mode: the whole design hierarchy, down and including
the standard cells is saved. This way the design is completly
self contained and Entities ared referred through their ids.
A design blob can only be loaded immediatly after starting cgt
as the DataBase *must* be empty. This way we restore the whole
design hierarchy with *exactly* the same ids.
Now, Hurricane object should provide a "toJson()" method for driving
JSON, and be associated with a JsonObject derived class for parsing.
* New: In Hurricane, ability to force the next id that will be used for a
DBo (used by Design Blob Mode).
* New: In Hurricane, in DataBase, added getCell() and getLibrary() functions
to allow the hierarchical access of a Cell/Library in native mode
(i.e. whithout the requirement of AllianceFramework).
* New: In Hurricane, In CellViewer, added menu entry for Save/Load of
JSON Design Blobs. Added at this level because we consider it as the
"native" format of Hurricane.
* New: In Unicorn, added support of import/export of JSON Cell.
* Bug: In Hurricane, in Instance, when cloning an Instance or uniquifying
it's master Cell, we forgot about the Occurrences (through shared pathes).
When an instance is cloned the Shared pathes still points toward the
original Instance. And when it's the master Cell that is uniquifyed
it's the Entities pointed to that remains in the original Cell.
This is a software design problem. It is difficult to define what
policy to adopt when uniquifying: basically that means that one
Occurence is either moved onto the clone or duplicated. Furthermore,
it is not trivial to known what Occurrence is pointing on the
uniquifyed/cloned item. Have to think about it a little more.
* Bug: In Etesian, in EtesianEngine, build the flattened nets and their
RoutingPads *after* uniquifying (through slaving bounding boxes).
This way we avoid the Occurrences problem described above.
* Bug: In Etesian, in EtesianEngine, invalidate the RoutingPad after
processing the placement so they are put into the right quadtree.
This problem is due to the fact that the RoutingPads do not belong
to the Instance that they refer. And when this instance is moved
around, she doesn't inform the RoutingPad that is has moved.
More software architecture design to review...
2016-01-07 06:13:16 -06:00
|
|
|
}
|
2014-07-31 12:40:23 -05:00
|
|
|
break;
|
2010-08-22 07:39:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-14 02:37:33 -05:00
|
|
|
void UnicornGui::saveCell ()
|
|
|
|
{
|
|
|
|
Cell* cell = getCell();
|
|
|
|
if ( cell == NULL ) return;
|
|
|
|
|
|
|
|
QString cellName = getString(cell->getName()).c_str();
|
|
|
|
|
|
|
|
if ( SaveCellDialog::runDialog ( this, cellName ) ) {
|
|
|
|
renameCell ( cellName.toStdString().c_str() );
|
2010-08-18 15:27:18 -05:00
|
|
|
AllianceFramework::get()->saveCell ( cell, Catalog::State::Views );
|
2010-05-14 02:37:33 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2012-11-16 06:54:58 -06:00
|
|
|
string UnicornGui::_getString () const
|
|
|
|
{
|
|
|
|
ostringstream s;
|
|
|
|
s << "<UnicornGui ";
|
|
|
|
Cell* cell = getCell();
|
|
|
|
if (cell) s << getString(cell->getName());
|
|
|
|
else s << "No_Cell_Loaded";
|
|
|
|
s << ">";
|
|
|
|
return s.str();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-09 09:26:22 -06:00
|
|
|
} // End of Unicorn namespace.
|
2012-11-16 06:54:58 -06:00
|
|
|
|
|
|
|
|
|
|
|
//INSPECTOR_P_SUPPORT(Unicorn::UnicornGui)
|