Reorganisation of menus in a more clear way.
This commit is contained in:
parent
89c730ec61
commit
f107a68938
|
@ -217,9 +217,6 @@ layersExtensionsTable = \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
for entry in layersExtensionsTable:
|
|
||||||
print entry
|
|
||||||
|
|
||||||
# Format of an entry in the table:
|
# Format of an entry in the table:
|
||||||
# (Symbolic_Name, CIF_Name, GDSII_Number)
|
# (Symbolic_Name, CIF_Name, GDSII_Number)
|
||||||
gdsLayersTable = \
|
gdsLayersTable = \
|
||||||
|
|
|
@ -183,8 +183,10 @@ class PlaceCore ( chip.Configuration.ChipConfWrapper ):
|
||||||
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
||||||
|
|
||||||
def unicornHook ( **kw ):
|
def unicornHook ( **kw ):
|
||||||
plugins.kwUnicornHook( 'plugins.chip'
|
kw['beforeAction'] = 'placeAndRoute.stepByStep'
|
||||||
, 'Chip Placement'
|
|
||||||
|
plugins.kwUnicornHook( 'placeAndRoute.placeChip'
|
||||||
|
, 'PLace Chip'
|
||||||
, 'Place a Complete Chip (pads && core)'
|
, 'Place a Complete Chip (pads && core)'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
, **kw
|
, **kw
|
||||||
|
|
|
@ -55,8 +55,10 @@ except Exception, e:
|
||||||
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
||||||
|
|
||||||
def unicornHook ( **kw ):
|
def unicornHook ( **kw ):
|
||||||
plugins.kwUnicornHook( 'plugins.clockTree'
|
kw['beforeAction'] = 'placeAndRoute.placeChip'
|
||||||
, 'ClockTree'
|
|
||||||
|
plugins.kwUnicornHook( 'placeAndRoute.clockTree'
|
||||||
|
, 'Clock Tree'
|
||||||
, 'Build a buffered H-Tree for the clock'
|
, 'Build a buffered H-Tree for the clock'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
, **kw
|
, **kw
|
||||||
|
|
|
@ -78,9 +78,9 @@ def rsave ( cell, views=CRL.Catalog.State.Physical, depth=0 ):
|
||||||
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
||||||
|
|
||||||
def unicornHook ( **kw ):
|
def unicornHook ( **kw ):
|
||||||
plugins.kwUnicornHook( 'plugins.rsave'
|
plugins.kwUnicornHook( 'tools.rsave'
|
||||||
, 'R-Save Cell (layout)'
|
, 'Recursive Save (layout)'
|
||||||
, 'Recursively Save Top Cell and it\'s Instances'
|
, 'Recursively save layout of the top cell and it\'s instances'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
, **kw
|
, **kw
|
||||||
)
|
)
|
||||||
|
|
|
@ -73,9 +73,9 @@ def rsave ( cell, depth=0 ):
|
||||||
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
# Plugin hook functions, unicornHook:menus, ScritMain:call
|
||||||
|
|
||||||
def unicornHook ( **kw ):
|
def unicornHook ( **kw ):
|
||||||
plugins.kwUnicornHook( 'plugins.rsaveAll'
|
plugins.kwUnicornHook( 'tools.rsaveAll'
|
||||||
, 'R-Save Cell (All)'
|
, 'Rercursive Save (all)'
|
||||||
, 'Recursively Save Top Cell and it\'s Instances'
|
, 'Recursively save layout <b>and</b> netlist of top cell and it\'s Instances'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
, **kw
|
, **kw
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,7 +52,10 @@ def kwUnicornHook ( menuPath, menuName, menuTip, moduleFile, **kw ):
|
||||||
if moduleFile.endswith('.pyc') or moduleFile.endswith('.pyo'):
|
if moduleFile.endswith('.pyc') or moduleFile.endswith('.pyo'):
|
||||||
moduleFile = moduleFile[:-1]
|
moduleFile = moduleFile[:-1]
|
||||||
|
|
||||||
editor.addToMenu( menuPath, menuName, menuTip, moduleFile )
|
if kw.has_key('beforeAction'):
|
||||||
|
editor.addToMenu( menuPath, menuName, menuTip, moduleFile, kw['beforeAction'] )
|
||||||
|
else:
|
||||||
|
editor.addToMenu( menuPath, menuName, menuTip, moduleFile )
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -126,15 +126,17 @@ namespace Etesian {
|
||||||
|
|
||||||
_viewer = viewer;
|
_viewer = viewer;
|
||||||
|
|
||||||
if (_viewer->hasMenuAction("placeAndRoute.etesianPlace")) {
|
if (_viewer->hasMenuAction("placeAndRoute.etesianPlaceBlock")) {
|
||||||
cerr << Warning( "GraphicEtesianEngine::addToMenu() - Etesian placer already hooked in." ) << endl;
|
cerr << Warning( "GraphicEtesianEngine::addToMenu() - Etesian placer already hooked in." ) << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_viewer->addToMenu( "placeAndRoute.etesianPlace"
|
_viewer->addToMenu( "placeAndRoute.etesianPlaceBlock"
|
||||||
, "Etesian - Plac&e"
|
, "Plac&e Block"
|
||||||
, "Run the <b>Etesian</b> placer"
|
, "Place a block [<b>Etesian</b>]"
|
||||||
, std::bind(&GraphicEtesianEngine::_place,this)
|
, std::bind(&GraphicEtesianEngine::_place,this)
|
||||||
|
, QIcon()
|
||||||
|
, "placeAndRoute.placeChip"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -205,12 +205,17 @@ namespace Hurricane {
|
||||||
{ return findChild<QAction*>(_getAbsWidgetPath(relativePath)) != NULL; }
|
{ return findChild<QAction*>(_getAbsWidgetPath(relativePath)) != NULL; }
|
||||||
|
|
||||||
|
|
||||||
QMenu* CellViewer::_getParentMenu( const QString& absolutePath ) const
|
QAction* CellViewer::getMenuAction( const QString& relativePath ) const
|
||||||
|
{ return findChild<QAction*>(_getAbsWidgetPath(relativePath)); }
|
||||||
|
|
||||||
|
|
||||||
|
QAction* CellViewer::_getParentMenu( const QString& absolutePath ) const
|
||||||
{
|
{
|
||||||
QString parentPath = absolutePath.section('.',0,-2);
|
QString parentPath = absolutePath.section('.',0,-2);
|
||||||
QMenu* parentMenu = findChild<QMenu*>(parentPath);
|
QAction* parentMenu = findChild<QAction*>(parentPath);
|
||||||
if (parentMenu == NULL) {
|
if (parentMenu == NULL) {
|
||||||
if (parentPath != "viewer") {
|
if (parentPath != "viewer") {
|
||||||
|
cerr << "parentPath:\"" << parentPath.toStdString() << "\"" << endl;
|
||||||
cerr << Warning( "CellViewer::_getParentMenu() - Missing parent menu for %s."
|
cerr << Warning( "CellViewer::_getParentMenu() - Missing parent menu for %s."
|
||||||
, absolutePath.toStdString().c_str() ) << endl;
|
, absolutePath.toStdString().c_str() ) << endl;
|
||||||
}
|
}
|
||||||
|
@ -220,35 +225,45 @@ namespace Hurricane {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QMenu* CellViewer::addMenu ( const QString& path, string text, unsigned int flags )
|
QAction* CellViewer::addMenu ( const QString& path, string text, unsigned int flags )
|
||||||
{
|
{
|
||||||
QString absolutePath = _getAbsWidgetPath( path );
|
QString absolutePath = _getAbsWidgetPath( path );
|
||||||
QMenu* menu = findChild<QMenu*>(absolutePath);
|
QAction* actionMenu = findChild<QAction*>(absolutePath);
|
||||||
|
|
||||||
if (menu != NULL) return menu;
|
if (actionMenu != NULL) return actionMenu;
|
||||||
|
|
||||||
|
QMenu* menu = new QMenu ( tr(text.c_str()), this );
|
||||||
|
|
||||||
if (flags & TopMenu) {
|
if (flags & TopMenu) {
|
||||||
menu = menuBar()->addMenu( tr(text.c_str()) );
|
actionMenu = menuBar()->addMenu( menu );
|
||||||
menu->setObjectName( absolutePath );
|
actionMenu->setObjectName( absolutePath );
|
||||||
} else {
|
} else {
|
||||||
QMenu* parentMenu = _getParentMenu( absolutePath );
|
menu->setStyleSheet( "font-family: Bitstream Vera Sans Mono" );
|
||||||
|
|
||||||
|
QAction* parentMenu = _getParentMenu( absolutePath );
|
||||||
if (parentMenu == NULL) return NULL;
|
if (parentMenu == NULL) return NULL;
|
||||||
|
|
||||||
menu = parentMenu->addMenu( tr(text.c_str()) );
|
actionMenu = parentMenu->menu()->addMenu( menu );
|
||||||
menu->setObjectName( absolutePath );
|
actionMenu->setObjectName( absolutePath );
|
||||||
}
|
}
|
||||||
return menu;
|
return actionMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CellViewer::addToMenu ( const QString& path )
|
bool CellViewer::addToMenu ( const QString& path, QString beforePath )
|
||||||
{
|
{
|
||||||
if (not path.endsWith("====")) return false;
|
if (not path.endsWith("====")) return false;
|
||||||
|
|
||||||
QMenu* menu = _getParentMenu( _getAbsWidgetPath(path) );
|
QString absolutePath = _getAbsWidgetPath( path );
|
||||||
if (menu == NULL) return false;
|
QAction* menuAction = _getParentMenu( absolutePath );
|
||||||
|
if (menuAction == NULL) return false;
|
||||||
|
|
||||||
|
QAction* before = getMenuAction( beforePath );
|
||||||
|
QAction* action = new QAction( this );
|
||||||
|
action->setSeparator ( true );
|
||||||
|
action->setObjectName( absolutePath );
|
||||||
|
menuAction->menu()->insertAction( before, action );
|
||||||
|
|
||||||
menu->addSeparator();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,12 +272,13 @@ namespace Hurricane {
|
||||||
, string text
|
, string text
|
||||||
, string textTip
|
, string textTip
|
||||||
, std::function< void() > callback
|
, std::function< void() > callback
|
||||||
, QIcon icon )
|
, QIcon icon
|
||||||
|
, QString beforePath )
|
||||||
{
|
{
|
||||||
QString absolutePath = _getAbsWidgetPath( path );
|
QString absolutePath = _getAbsWidgetPath( path );
|
||||||
QAction* action = findChild<QAction*>(absolutePath);
|
QAction* action = findChild<QAction*>(absolutePath);
|
||||||
if (action == NULL) {
|
if (action == NULL) {
|
||||||
QMenu* parentMenu = _getParentMenu( absolutePath );
|
QAction* parentMenu = _getParentMenu( absolutePath );
|
||||||
if (parentMenu == NULL) return NULL;
|
if (parentMenu == NULL) return NULL;
|
||||||
|
|
||||||
action = new QAction( tr(text.c_str()), this );
|
action = new QAction( tr(text.c_str()), this );
|
||||||
|
@ -270,7 +286,9 @@ namespace Hurricane {
|
||||||
action->setStatusTip ( tr(textTip.c_str()) );
|
action->setStatusTip ( tr(textTip.c_str()) );
|
||||||
action->setVisible ( true );
|
action->setVisible ( true );
|
||||||
if (not icon.isNull()) action->setIcon( icon );
|
if (not icon.isNull()) action->setIcon( icon );
|
||||||
parentMenu->addAction( action );
|
|
||||||
|
QAction* before = getMenuAction( beforePath );
|
||||||
|
parentMenu->menu()->insertAction( before, action );
|
||||||
|
|
||||||
_actionCallbacks.insert( make_pair(absolutePath,boost::any(callback)) );
|
_actionCallbacks.insert( make_pair(absolutePath,boost::any(callback)) );
|
||||||
connect( action, SIGNAL(triggered()), this, SLOT(doAction()) );
|
connect( action, SIGNAL(triggered()), this, SLOT(doAction()) );
|
||||||
|
@ -282,7 +300,8 @@ namespace Hurricane {
|
||||||
QAction* CellViewer::addToMenu ( const QString& path
|
QAction* CellViewer::addToMenu ( const QString& path
|
||||||
, string text
|
, string text
|
||||||
, string textTip
|
, string textTip
|
||||||
, string scriptPath )
|
, string scriptPath
|
||||||
|
, QString beforePath )
|
||||||
{
|
{
|
||||||
QString absolutePath = _getAbsWidgetPath( path );
|
QString absolutePath = _getAbsWidgetPath( path );
|
||||||
QAction* action = findChild<QAction*>(absolutePath);
|
QAction* action = findChild<QAction*>(absolutePath);
|
||||||
|
@ -292,9 +311,10 @@ namespace Hurricane {
|
||||||
action->setStatusTip ( tr(textTip.c_str()) );
|
action->setStatusTip ( tr(textTip.c_str()) );
|
||||||
action->setVisible ( true );
|
action->setVisible ( true );
|
||||||
|
|
||||||
QMenu* parentMenu = _getParentMenu( absolutePath );
|
QAction* parentMenu = _getParentMenu( absolutePath );
|
||||||
if (parentMenu != NULL) {
|
if (parentMenu != NULL) {
|
||||||
parentMenu->addAction( action );
|
QAction* before = getMenuAction( beforePath );
|
||||||
|
parentMenu->menu()->insertAction( before, action );
|
||||||
} else if (absolutePath == "viewer") {
|
} else if (absolutePath == "viewer") {
|
||||||
addAction( action );
|
addAction( action );
|
||||||
}
|
}
|
||||||
|
@ -313,6 +333,7 @@ namespace Hurricane {
|
||||||
, QIcon icon
|
, QIcon icon
|
||||||
//, QWidget* receiver
|
//, QWidget* receiver
|
||||||
//, SlotMethod slotMethod
|
//, SlotMethod slotMethod
|
||||||
|
, QString beforePath
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
QString absolutePath = _getAbsWidgetPath( path );
|
QString absolutePath = _getAbsWidgetPath( path );
|
||||||
|
@ -325,9 +346,10 @@ namespace Hurricane {
|
||||||
action->setVisible ( true );
|
action->setVisible ( true );
|
||||||
if (not icon.isNull()) action->setIcon( icon );
|
if (not icon.isNull()) action->setIcon( icon );
|
||||||
|
|
||||||
QMenu* parentMenu = _getParentMenu( absolutePath );
|
QAction* parentMenu = _getParentMenu( absolutePath );
|
||||||
if (parentMenu != NULL) {
|
if (parentMenu != NULL) {
|
||||||
parentMenu->addAction( action );
|
QAction* before = getMenuAction( beforePath );
|
||||||
|
parentMenu->menu()->insertAction( before, action );
|
||||||
} else if (absolutePath == "viewer") {
|
} else if (absolutePath == "viewer") {
|
||||||
addAction( action );
|
addAction( action );
|
||||||
}
|
}
|
||||||
|
@ -538,13 +560,13 @@ namespace Hurricane {
|
||||||
);
|
);
|
||||||
connect( action, SIGNAL(triggered()), this, SLOT(runScriptWidget()) );
|
connect( action, SIGNAL(triggered()), this, SLOT(runScriptWidget()) );
|
||||||
|
|
||||||
action = addToMenu( "tools.stressScript"
|
// action = addToMenu( "tools.stressScript"
|
||||||
, tr("Python Stress Script")
|
// , tr("Python Stress Script")
|
||||||
, tr("Run Python Stress Script (50 times...).")
|
// , tr("Run Python Stress Script (50 times...).")
|
||||||
, QKeySequence()
|
// , QKeySequence()
|
||||||
, QIcon(":/images/python-logo-v3.png")
|
// , QIcon(":/images/python-logo-v3.png")
|
||||||
);
|
// );
|
||||||
connect( action, SIGNAL(triggered()), this, SLOT(runStressScript()) );
|
// connect( action, SIGNAL(triggered()), this, SLOT(runStressScript()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -107,22 +107,27 @@ extern "C" {
|
||||||
cdebug_log(20,0) << "PyCellViewer_addToMenu()" << endl;
|
cdebug_log(20,0) << "PyCellViewer_addToMenu()" << endl;
|
||||||
|
|
||||||
HTRY
|
HTRY
|
||||||
METHOD_HEAD("CellViewer.addToMenu()")
|
METHOD_HEAD("CellViewer.addToMenu()")
|
||||||
|
|
||||||
char* path = NULL;
|
char* nullBefore = "";
|
||||||
char* text = NULL;
|
char* path = NULL;
|
||||||
char* textTip = NULL;
|
char* text = NULL;
|
||||||
char* scriptPath = NULL;
|
char* textTip = NULL;
|
||||||
if (not PyArg_ParseTuple(args,"s|sss:CellViewer.addToMenu()", &path, &text, &textTip, &scriptPath)) {
|
char* scriptPath = NULL;
|
||||||
PyErr_SetString ( ConstructorError, "CellViewer.addToMenu(): Takes one or four arguments exactly." );
|
char* before = NULL;
|
||||||
return NULL;
|
if (not PyArg_ParseTuple( args, "s|ssss:CellViewer.addToMenu()"
|
||||||
}
|
, &path, &text, &textTip, &scriptPath, &before)) {
|
||||||
|
PyErr_SetString ( ConstructorError, "CellViewer.addToMenu(): Takes either one or five arguments." );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (text != NULL) {
|
if (before == NULL) before = nullBefore;
|
||||||
if (cw->addToMenu( path, text, textTip, scriptPath )) Py_RETURN_TRUE;
|
|
||||||
} else {
|
if (text != NULL) {
|
||||||
if (cw->addToMenu( path )) Py_RETURN_TRUE;
|
if (cw->addToMenu( path, text, textTip, scriptPath, before )) Py_RETURN_TRUE;
|
||||||
}
|
} else {
|
||||||
|
if (cw->addToMenu( path, before )) Py_RETURN_TRUE;
|
||||||
|
}
|
||||||
HCATCH
|
HCATCH
|
||||||
|
|
||||||
Py_RETURN_FALSE;
|
Py_RETURN_FALSE;
|
||||||
|
|
|
@ -94,25 +94,30 @@ namespace Hurricane {
|
||||||
QMenu* createDebugMenu ();
|
QMenu* createDebugMenu ();
|
||||||
bool hasMenu ( const QString& path ) const;
|
bool hasMenu ( const QString& path ) const;
|
||||||
bool hasMenuAction ( const QString& path ) const;
|
bool hasMenuAction ( const QString& path ) const;
|
||||||
QMenu* addMenu ( const QString& path
|
QAction* getMenuAction ( const QString& path ) const;
|
||||||
|
QAction* addMenu ( const QString& path
|
||||||
, std::string text
|
, std::string text
|
||||||
, unsigned int flags=NoFlags
|
, unsigned int flags=NoFlags
|
||||||
);
|
);
|
||||||
bool addToMenu ( const QString& path );
|
bool addToMenu ( const QString& path
|
||||||
|
, QString beforePath="" );
|
||||||
QAction* addToMenu ( const QString& path
|
QAction* addToMenu ( const QString& path
|
||||||
, std::string text
|
, std::string text
|
||||||
, std::string textTip
|
, std::string textTip
|
||||||
, std::function< void() >
|
, std::function< void() >
|
||||||
, QIcon icon=QIcon() );
|
, QIcon icon=QIcon()
|
||||||
|
, QString beforePath="" );
|
||||||
QAction* addToMenu ( const QString& path
|
QAction* addToMenu ( const QString& path
|
||||||
, std::string text
|
, std::string text
|
||||||
, std::string textTip
|
, std::string textTip
|
||||||
, std::string scriptPath );
|
, std::string scriptPath
|
||||||
|
, QString beforePath="" );
|
||||||
QAction* addToMenu ( QString path
|
QAction* addToMenu ( QString path
|
||||||
, QString text
|
, QString text
|
||||||
, QString textTip
|
, QString textTip
|
||||||
, const QKeySequence& shortCut
|
, const QKeySequence& shortCut
|
||||||
, QIcon icon =QIcon());
|
, QIcon icon =QIcon()
|
||||||
|
, QString beforePath="" );
|
||||||
inline void setEnableRedrawInterrupt ( bool );
|
inline void setEnableRedrawInterrupt ( bool );
|
||||||
inline void setApplicationName ( const QString& );
|
inline void setApplicationName ( const QString& );
|
||||||
inline Observer<CellViewer>* getCellObserver ();
|
inline Observer<CellViewer>* getCellObserver ();
|
||||||
|
@ -166,7 +171,7 @@ namespace Hurricane {
|
||||||
void rebuildHistory ();
|
void rebuildHistory ();
|
||||||
private:
|
private:
|
||||||
QString _getAbsWidgetPath ( const QString& relPath ) const;
|
QString _getAbsWidgetPath ( const QString& relPath ) const;
|
||||||
QMenu* _getParentMenu ( const QString& ) const;
|
QAction* _getParentMenu ( const QString& ) const;
|
||||||
void _runScript ( QString scriptPath );
|
void _runScript ( QString scriptPath );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -359,54 +359,60 @@ namespace Katana {
|
||||||
|
|
||||||
_viewer = viewer;
|
_viewer = viewer;
|
||||||
|
|
||||||
if (_viewer->hasMenuAction("placeAndRoute.katana.route")) {
|
if (not _viewer->hasMenuAction("beta"))
|
||||||
|
_viewer->addMenu( "beta", "Beta", CellViewer::TopMenu );
|
||||||
|
if (not _viewer->hasMenuAction("beta.placeAndRoute"))
|
||||||
|
_viewer->addMenu( "beta.placeAndRoute", "P&&R" );
|
||||||
|
|
||||||
|
if (_viewer->hasMenuAction("beta.placeAndRoute.route")) {
|
||||||
cerr << Warning( "GraphicKatanaEngine::addToMenu() - Katana detailed router already hooked in." ) << endl;
|
cerr << Warning( "GraphicKatanaEngine::addToMenu() - Katana detailed router already hooked in." ) << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_viewer->addMenu ( "placeAndRoute.katana" , "Katana" );
|
_viewer->addMenu ( "beta.placeAndRoute.stepByStep", "&Step by step" );
|
||||||
_viewer->addMenu ( "placeAndRoute.katana.stepByStep", "&Step by step" );
|
|
||||||
|
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.route"
|
_viewer->addToMenu( "beta.placeAndRoute.route"
|
||||||
, "Katana - &Route"
|
, "&Route . . . . . [Katana]"
|
||||||
, "Route the design (global & detailed)"
|
, "Route the design (global & detailed)"
|
||||||
, std::bind(&GraphicKatanaEngine::_route,this)
|
, std::bind(&GraphicKatanaEngine::_route,this)
|
||||||
|
, QIcon()
|
||||||
|
, "beta.placeAndRoute.stepByStep"
|
||||||
);
|
);
|
||||||
|
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.========" );
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.========" );
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.detailedPreRoute"
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.detailedPreRoute"
|
||||||
, "Katana - Detailed Pre-Route"
|
, "Detailed Pre-Route . [Katana]"
|
||||||
, "Run the <b>Katana</b> detailed router on pre-routed nets"
|
, "Run the <b>Katana</b> detailed router on pre-routed nets"
|
||||||
, std::bind(&GraphicKatanaEngine::_runNegociatePreRouted,this)
|
, std::bind(&GraphicKatanaEngine::_runNegociatePreRouted,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.globalRoute"
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.globalRoute"
|
||||||
, "Katana - &Global Route"
|
, "&Global Route . . . [Katana]"
|
||||||
, "Run the <b>Katana</b> global router"
|
, "Run the <b>Katana</b> global router"
|
||||||
, std::bind(&GraphicKatanaEngine::_globalRoute,this)
|
, std::bind(&GraphicKatanaEngine::_globalRoute,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.detailedRoute"
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.detailedRoute"
|
||||||
, "Katana - &Detailed Route"
|
, "&Detailed Route . . [Katana]"
|
||||||
, "Run the <b>Katana</b> detailed router"
|
, "Run the <b>Katana</b> detailed router"
|
||||||
, std::bind(&GraphicKatanaEngine::_detailRoute,this)
|
, std::bind(&GraphicKatanaEngine::_detailRoute,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.finalize"
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.finalize"
|
||||||
, "Katana - &Finalize Routing"
|
, "&Finalize Routing . [Katana]"
|
||||||
, "Closing Routing"
|
, "Closing Routing"
|
||||||
, std::bind(&GraphicKatanaEngine::_finalize,this)
|
, std::bind(&GraphicKatanaEngine::_finalize,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.dumpMeasures"
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.dumpMeasures"
|
||||||
, "Katana - Dump &Measures"
|
, "Dump &Measures . . [Katana]"
|
||||||
, "Dumping Measurements on the disk"
|
, "Dumping Measurements on the disk"
|
||||||
, std::bind(&GraphicKatanaEngine::_dumpMeasures,this)
|
, std::bind(&GraphicKatanaEngine::_dumpMeasures,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.save"
|
#if NO_NEED_OF_IT_NOW
|
||||||
, "Katana - &Save Design"
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.save"
|
||||||
|
, "&Save Design"
|
||||||
, "Save routed design (temporary hack)"
|
, "Save routed design (temporary hack)"
|
||||||
, std::bind(&GraphicKatanaEngine::_save,this)
|
, std::bind(&GraphicKatanaEngine::_save,this)
|
||||||
);
|
);
|
||||||
#if NO_NEED_OF_IT_NOW
|
_viewer->addToMenu( "beta.placeAndRoute.stepByStep.runTest"
|
||||||
_viewer->addToMenu( "placeAndRoute.katana.stepByStep.runTest"
|
, "Run &Test"
|
||||||
, "Katana - Run &Test"
|
|
||||||
, "Run Test Program (symmetric routing of gmChamla)"
|
, "Run Test Program (symmetric routing of gmChamla)"
|
||||||
, std::bind(&GraphicKatanaEngine::_runTest,this)
|
, std::bind(&GraphicKatanaEngine::_runTest,this)
|
||||||
);
|
);
|
||||||
|
|
|
@ -285,57 +285,59 @@ namespace Kite {
|
||||||
}
|
}
|
||||||
|
|
||||||
_viewer->addToMenu( "placeAndRoute.route"
|
_viewer->addToMenu( "placeAndRoute.route"
|
||||||
, "Kite - &Route"
|
, "&Route"
|
||||||
, "Route the design (global & detailed)"
|
, "Complete routing of the design (global, detailed and finalize) [<b>Kite</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_route,this)
|
, std::bind(&GraphicKiteEngine::_route,this)
|
||||||
|
, QIcon()
|
||||||
|
, "placeAndRoute.stepByStep"
|
||||||
);
|
);
|
||||||
|
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.========" );
|
_viewer->addToMenu( "placeAndRoute.stepByStep.========" );
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.wipeoutRouting"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.wipeoutRouting"
|
||||||
, "Kite - Erase Previous Routing"
|
, "Erase Previous Routing"
|
||||||
, "Erase any previously routed wires"
|
, "Erase any previously routed wires"
|
||||||
, std::bind(&GraphicKiteEngine::_wipeoutRouting,this)
|
, std::bind(&GraphicKiteEngine::_wipeoutRouting,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.detailedPreRoute"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.detailedPreRoute"
|
||||||
, "Kite - Detailed Pre-Route"
|
, "Detailed Pre-Route"
|
||||||
, "Run the <b>Kite</b> detailed router on pre-routed nets"
|
, "Run the detailed router on global pre-routed nets [<b>Kite</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_runNegociatePreRouted,this)
|
, std::bind(&GraphicKiteEngine::_runNegociatePreRouted,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.globalRoute"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.globalRoute"
|
||||||
, "Kite - &Global Route"
|
, "&Global Route"
|
||||||
, "Run the <b>Knik</b> global router"
|
, "Run the global router [<b>nik</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_globalRoute,this)
|
, std::bind(&GraphicKiteEngine::_globalRoute,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.loadGlobalRouting"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.loadGlobalRouting"
|
||||||
, "Kite - &Load Global Routing"
|
, "&Load Global Routing"
|
||||||
, "Load a solution for the global routing (.kgr)"
|
, "Load a solution for the global routing (.kgr) [<b>Knik</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_loadGlobalSolution,this)
|
, std::bind(&GraphicKiteEngine::_loadGlobalSolution,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.saveGlobalRouting"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.saveGlobalRouting"
|
||||||
, "Kite - &Save Global Routing"
|
, "&Save Global Routing"
|
||||||
, "Save a global router solution (.kgr)"
|
, "Save a global router solution (.kgr) [<b>Knik</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_saveGlobalSolution,this)
|
, std::bind(&GraphicKiteEngine::_saveGlobalSolution,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.detailedRoute"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.detailedRoute"
|
||||||
, "Kite - &Detailed Route"
|
, "&Detailed Route"
|
||||||
, "Run the <b>Kite</b> detailed router"
|
, "Run the detailed router [<b>Kite</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_detailRoute,this)
|
, std::bind(&GraphicKiteEngine::_detailRoute,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.finalize"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.finalize"
|
||||||
, "Kite - &Finalize Routing"
|
, "&Finalize Routing"
|
||||||
, "Closing Routing"
|
, "Cleanup all routing related data structures [<b>Kite</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_finalize,this)
|
, std::bind(&GraphicKiteEngine::_finalize,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.dumpMeasures"
|
_viewer->addToMenu( "placeAndRoute.stepByStep.dumpMeasures"
|
||||||
, "Kite - Dump &Measures"
|
, "Dump &Measures"
|
||||||
, "Dumping Measurements on the disk"
|
, "Dumping Measurements on the disk [<b>Kite</b>]"
|
||||||
, std::bind(&GraphicKiteEngine::_dumpMeasures,this)
|
, std::bind(&GraphicKiteEngine::_dumpMeasures,this)
|
||||||
);
|
);
|
||||||
_viewer->addToMenu( "placeAndRoute.stepByStep.save"
|
// _viewer->addToMenu( "placeAndRoute.stepByStep.save"
|
||||||
, "Kite - &Save Design"
|
// , "&Save Design"
|
||||||
, "Save routed design (temporary hack)"
|
// , "Save routed design (temporary hack)"
|
||||||
, std::bind(&GraphicKiteEngine::_save,this)
|
// , std::bind(&GraphicKiteEngine::_save,this)
|
||||||
);
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -141,9 +141,9 @@ def runDemo ( cell, editor ):
|
||||||
def unicornHook ( **kw ):
|
def unicornHook ( **kw ):
|
||||||
editor = kw['editor']
|
editor = kw['editor']
|
||||||
editor.addMenu( 'tutorials' , 'Tutorials', Viewer.CellViewer.TopMenu )
|
editor.addMenu( 'tutorials' , 'Tutorials', Viewer.CellViewer.TopMenu )
|
||||||
editor.addMenu( 'tutorials.plugins', 'Plugins' , Viewer.CellViewer.NoFlags )
|
#editor.addMenu( 'tutorials.plugins', 'Plugins' , Viewer.CellViewer.NoFlags )
|
||||||
plugins.kwUnicornHook( 'tutorials.plugins.runDemo'
|
plugins.kwUnicornHook( 'tutorials.runDemo'
|
||||||
, 'Tutorial - Run Demo (Python flavor)'
|
, 'Run Demo (Python flavor)'
|
||||||
, 'Launch runDemo() in the Tutorial Python plugin.'
|
, 'Launch runDemo() in the Tutorial Python plugin.'
|
||||||
, sys.modules[__name__].__file__
|
, sys.modules[__name__].__file__
|
||||||
, **kw
|
, **kw
|
||||||
|
|
|
@ -67,7 +67,7 @@ def unicornConfigure ( **kw ):
|
||||||
print WarningMessage( 'The <plugins> menu has already been created.' )
|
print WarningMessage( 'The <plugins> menu has already been created.' )
|
||||||
return
|
return
|
||||||
|
|
||||||
editor.addMenu( 'plugins', 'Plu&gins', Viewer.CellViewer.TopMenu )
|
#editor.addMenu( 'plugins', 'Plu&gins', Viewer.CellViewer.TopMenu )
|
||||||
|
|
||||||
for pluginFile in os.listdir( pluginsDir ):
|
for pluginFile in os.listdir( pluginsDir ):
|
||||||
if pluginFile == "__init__.py": continue
|
if pluginFile == "__init__.py": continue
|
||||||
|
|
|
@ -186,6 +186,8 @@ namespace Unicorn {
|
||||||
, tr("Library Manager")
|
, tr("Library Manager")
|
||||||
, tr("Browse through Views, Cells & Libraries")
|
, tr("Browse through Views, Cells & Libraries")
|
||||||
, QKeySequence(tr("CTRL+M"))
|
, QKeySequence(tr("CTRL+M"))
|
||||||
|
, QIcon()
|
||||||
|
, "tools.script"
|
||||||
);
|
);
|
||||||
connect( action, SIGNAL(triggered()), _libraryManager, SLOT(toggleShow()) );
|
connect( action, SIGNAL(triggered()), _libraryManager, SLOT(toggleShow()) );
|
||||||
connect( this , SIGNAL(cellLoadedFromDisk(Cell*)), _libraryManager, SLOT(updateLibrary(Cell*)) );
|
connect( this , SIGNAL(cellLoadedFromDisk(Cell*)), _libraryManager, SLOT(updateLibrary(Cell*)) );
|
||||||
|
|
|
@ -186,9 +186,9 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
unicorn = Unicorn.UnicornGui.create()
|
unicorn = Unicorn.UnicornGui.create()
|
||||||
unicorn.setApplicationName ('cgt')
|
unicorn.setApplicationName ('cgt')
|
||||||
unicorn.registerTool (Katana.GraphicKatanaEngine.grab())
|
|
||||||
unicorn.registerTool (Etesian.GraphicEtesianEngine.grab())
|
unicorn.registerTool (Etesian.GraphicEtesianEngine.grab())
|
||||||
unicorn.registerTool (Kite.GraphicKiteEngine.grab())
|
unicorn.registerTool (Kite.GraphicKiteEngine.grab())
|
||||||
|
unicorn.registerTool (Katana.GraphicKatanaEngine.grab())
|
||||||
unicorn.registerTool (Bora.GraphicBoraEngine.grab())
|
unicorn.registerTool (Bora.GraphicBoraEngine.grab())
|
||||||
#unicorn.setAnonNetSelectable(False)
|
#unicorn.setAnonNetSelectable(False)
|
||||||
unicorn.setLayerVisible ("grid" , False);
|
unicorn.setLayerVisible ("grid" , False);
|
||||||
|
|
Loading…
Reference in New Issue