* ./unicorn:
- New: Integrate Ispd04, Iccad04 and LEF/DEF import/export capabilites. - Change: Remove LEF/DEF options from open/save cells (now managet though import/export).
This commit is contained in:
parent
4dadeb3f63
commit
66f8960c4f
|
@ -4,8 +4,10 @@
|
|||
include ( ${QT_USE_FILE} )
|
||||
include_directories ( ${HURRICANE_INCLUDE_DIR}
|
||||
${CORIOLIS_INCLUDE_DIR}
|
||||
${BOOKSHELF_INCLUDE_DIR}
|
||||
${CONFIGURATION_INCLUDE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${LEFDEF_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
)
|
||||
add_definitions ( -DSYS_CONF_DIR=\\"${SYS_CONF_DIR}\\" )
|
||||
|
@ -45,6 +47,7 @@
|
|||
${HURRICANE_PYTHON_LIBRARIES}
|
||||
${HURRICANE_GRAPHICAL_LIBRARIES}
|
||||
${HURRICANE_LIBRARIES}
|
||||
${BOOKSHELF_LIBRARY}
|
||||
${AGDS_LIBRARY}
|
||||
${CIF_LIBRARY}
|
||||
${CONFIGURATION_LIBRARY}
|
||||
|
@ -60,6 +63,5 @@
|
|||
target_link_libraries ( cgt unicorn )
|
||||
install ( TARGETS unicorn DESTINATION lib${LIB_SUFFIX} )
|
||||
install ( TARGETS cgt DESTINATION bin )
|
||||
install ( FILES ${includes}
|
||||
${mocIncludes} DESTINATION include/coriolis2/unicorn )
|
||||
install ( FILES ${mocIncludes} DESTINATION include/coriolis2/unicorn )
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace boptions = boost::program_options;
|
|||
#include <boost/filesystem/operations.hpp>
|
||||
namespace bfs = boost::filesystem;
|
||||
|
||||
#include "vlsisapd/bookshelf/Exception.h"
|
||||
#include "vlsisapd/configuration/Configuration.h"
|
||||
#include "hurricane/DebugSession.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
|
@ -54,6 +55,10 @@ using namespace Hurricane;
|
|||
#include "crlcore/AllianceFramework.h"
|
||||
#include "crlcore/Hierarchy.h"
|
||||
#include "crlcore/ToolBox.h"
|
||||
#include "crlcore/Ispd04Bookshelf.h"
|
||||
#include "crlcore/Iccad04Lefdef.h"
|
||||
#include "crlcore/DefImport.h"
|
||||
#include "crlcore/DefExport.h"
|
||||
using namespace CRL;
|
||||
|
||||
#include "nimbus/NimbusEngine.h"
|
||||
|
@ -110,6 +115,8 @@ int main ( int argc, char *argv[] )
|
|||
bool detailedRoute;
|
||||
bool loadGlobal;
|
||||
bool saveGlobal;
|
||||
bool exportDef;
|
||||
bool saveImport;
|
||||
|
||||
boptions::options_description options ("Command line arguments & options");
|
||||
options.add_options()
|
||||
|
@ -159,7 +166,17 @@ int main ( int argc, char *argv[] )
|
|||
( "cell,c" , boptions::value<string>()
|
||||
, "The name of the cell to load, whithout extension." )
|
||||
( "save-design,s" , boptions::value<string>()
|
||||
, "Save the routed design.");
|
||||
, "Save the routed design.")
|
||||
( "export-def" , boptions::bool_switch(&exportDef)->default_value(false)
|
||||
, "Export the design in DEF format.")
|
||||
( "import-def" , boptions::value<string>()
|
||||
, "Import the design in DEF format.")
|
||||
( "importk-ispd04-bk" , boptions::value<string>()
|
||||
, "The name of the ISPD04 benchmark to import (Bookshelf .aux), whithout extension." )
|
||||
( "import-iccad04-def" , boptions::value<string>()
|
||||
, "The name of the ICCAD04 benchmark to import (LEF/DEF), whithout extension." )
|
||||
( "save-import" , boptions::bool_switch(&saveImport)->default_value(false)
|
||||
, "Save of the imported design immediatly after loading.");
|
||||
|
||||
boptions::variables_map arguments;
|
||||
boptions::store ( boptions::parse_command_line(argc,argv,options), arguments );
|
||||
|
@ -212,6 +229,31 @@ int main ( int argc, char *argv[] )
|
|||
detailedRoute = false;
|
||||
}
|
||||
|
||||
if ( (cell == NULL) and arguments.count("import-def") ) {
|
||||
cell = DefImport::load ( arguments["import-def"].as<string>().c_str()
|
||||
, DefImport::FitAbOnCells
|
||||
);
|
||||
}
|
||||
|
||||
if ( (cell == NULL) and arguments.count("import-iccad04-def") ) {
|
||||
cell = Iccad04Lefdef::load ( arguments["import-iccad04-def"].as<string>().c_str()
|
||||
, 0
|
||||
);
|
||||
}
|
||||
|
||||
if ( (cell == NULL) and arguments.count("import-ispd04-bk") ) {
|
||||
cell = Ispd04::load ( arguments["import-ispd04-bk"].as<string>().c_str() );
|
||||
}
|
||||
|
||||
if ( saveImport and (cell != NULL) ) {
|
||||
cmess1 << " o Immediate write back of <" << cell->getName() << ">" << endl;
|
||||
af->saveCell ( cell, Catalog::State::Views );
|
||||
}
|
||||
|
||||
if ( (cell != NULL) and exportDef ) {
|
||||
DefExport::drive ( cell, DefExport::WithLEF );
|
||||
}
|
||||
|
||||
if ( arguments.count("margin") )
|
||||
Cfg::getParamPercentage("nimbus.spaceMargin")->setPercentage ( margin );
|
||||
|
||||
|
@ -337,6 +379,12 @@ int main ( int argc, char *argv[] )
|
|||
// eFPGA/16x16.
|
||||
//DebugSession::addToTrace ( cell, "group_15_6_clb_topside_in1_mux_q01" );
|
||||
//DebugSession::addToTrace ( cell, "g_7_14_top_2" );
|
||||
// ibm01.
|
||||
//DebugSession::addToTrace ( cell, "NET2648" );
|
||||
//DebugSession::addToTrace ( cell, "NET2881" );
|
||||
//DebugSession::addToTrace ( cell, "NET2530" );
|
||||
//DebugSession::addToTrace ( cell, "NET8464" );
|
||||
//DebugSession::addToTrace ( cell, "NET8242" );
|
||||
|
||||
// Python Script test.
|
||||
|
||||
|
@ -467,6 +515,10 @@ int main ( int argc, char *argv[] )
|
|||
cerr << "[ERROR] " << e.what() << endl;
|
||||
exit ( 1 );
|
||||
}
|
||||
catch ( Bookshelf::Exception& e ) {
|
||||
cerr << e.what() << endl;
|
||||
exit ( 1 );
|
||||
}
|
||||
catch ( exception& e ) {
|
||||
cerr << "[ERROR] " << e.what() << endl;
|
||||
exit ( 1 );
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace Unicorn {
|
|||
hLayout1->addWidget ( cancelButton );
|
||||
hLayout1->addStretch ();
|
||||
|
||||
#if DEPRECATED
|
||||
QFrame* separator = new QFrame ();
|
||||
separator->setFrameShape ( QFrame::HLine );
|
||||
separator->setFrameShadow ( QFrame::Sunken );
|
||||
|
@ -107,6 +108,7 @@ namespace Unicorn {
|
|||
formatGroup->setId ( formatButton, 1 );
|
||||
formatGroup->addButton ( formatButton );
|
||||
hLayout2->addWidget ( formatButton );
|
||||
#endif // DEPRECATED
|
||||
|
||||
QVBoxLayout* vLayout = new QVBoxLayout ();
|
||||
vLayout->setSizeConstraint ( QLayout::SetFixedSize );
|
||||
|
@ -114,15 +116,15 @@ namespace Unicorn {
|
|||
vLayout->addWidget ( _lineEdit );
|
||||
vLayout->addWidget ( _viewerCheckBox );
|
||||
vLayout->addLayout ( hLayout1 );
|
||||
vLayout->addWidget ( separator );
|
||||
vLayout->addLayout ( hLayout2 );
|
||||
//vLayout->addWidget ( separator );
|
||||
//vLayout->addLayout ( hLayout2 );
|
||||
|
||||
setLayout ( vLayout );
|
||||
//setModal ( true );
|
||||
|
||||
connect ( okButton, SIGNAL(clicked()) , this, SLOT(accept()) );
|
||||
connect ( cancelButton, SIGNAL(clicked()) , this, SLOT(reject()) );
|
||||
connect ( formatGroup , SIGNAL(buttonClicked(int)), this, SLOT(formatChanged(int)) );
|
||||
//connect ( formatGroup , SIGNAL(buttonClicked(int)), this, SLOT(formatChanged(int)) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,6 +154,7 @@ namespace Unicorn {
|
|||
}
|
||||
|
||||
|
||||
#if DEPRECATED
|
||||
void OpenCellDialog::formatChanged ( int index )
|
||||
{
|
||||
Environment* environment = AllianceFramework::get()->getEnvironment();
|
||||
|
@ -168,6 +171,7 @@ namespace Unicorn {
|
|||
cerr << Warning("Unknown input format: %d.",index) << endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
} // End of Unicorn namespace.
|
||||
|
|
|
@ -87,9 +87,9 @@ namespace Unicorn {
|
|||
separator->setFrameShape ( QFrame::HLine );
|
||||
separator->setFrameShadow ( QFrame::Sunken );
|
||||
|
||||
#if DEPRECATED
|
||||
QHBoxLayout* hLayout2 = new QHBoxLayout ();
|
||||
QButtonGroup* formatGroup = new QButtonGroup ();
|
||||
|
||||
QRadioButton* formatButton = new QRadioButton ();
|
||||
formatButton->setText ( tr("vst/ap") );
|
||||
formatButton->setChecked ( true );
|
||||
|
@ -103,21 +103,22 @@ namespace Unicorn {
|
|||
formatGroup->setId ( formatButton, 1 );
|
||||
formatGroup->addButton ( formatButton );
|
||||
hLayout2->addWidget ( formatButton );
|
||||
#endif
|
||||
|
||||
QVBoxLayout* vLayout = new QVBoxLayout ();
|
||||
vLayout->setSizeConstraint ( QLayout::SetFixedSize );
|
||||
vLayout->addWidget ( label );
|
||||
vLayout->addWidget ( _lineEdit );
|
||||
vLayout->addLayout ( hLayout1 );
|
||||
vLayout->addWidget ( separator );
|
||||
vLayout->addLayout ( hLayout2 );
|
||||
//vLayout->addWidget ( separator );
|
||||
//vLayout->addLayout ( hLayout2 );
|
||||
|
||||
setLayout ( vLayout );
|
||||
//setModal ( true );
|
||||
|
||||
connect ( okButton, SIGNAL(clicked()) , this, SLOT(accept()) );
|
||||
connect ( cancelButton, SIGNAL(clicked()) , this, SLOT(reject()) );
|
||||
connect ( formatGroup , SIGNAL(buttonClicked(int)), this, SLOT(formatChanged(int)) );
|
||||
//connect ( formatGroup , SIGNAL(buttonClicked(int)), this, SLOT(formatChanged(int)) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,6 +146,7 @@ namespace Unicorn {
|
|||
}
|
||||
|
||||
|
||||
#if DEPRECATED
|
||||
void SaveCellDialog::formatChanged ( int index )
|
||||
{
|
||||
Environment* environment = AllianceFramework::get()->getEnvironment();
|
||||
|
@ -161,6 +163,7 @@ namespace Unicorn {
|
|||
cerr << Warning("Unknown output format: %d.",index) << endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
} // End of Unicorn namespace.
|
||||
|
|
|
@ -172,7 +172,7 @@ namespace Unicorn {
|
|||
|
||||
if ( SaveCellDialog::runDialog ( this, cellName ) ) {
|
||||
renameCell ( cellName.toStdString().c_str() );
|
||||
AllianceFramework::get()->saveCell ( cell, Catalog::State::Physical );
|
||||
AllianceFramework::get()->saveCell ( cell, Catalog::State::Views );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,9 +44,6 @@ namespace Unicorn {
|
|||
bool newViewerRequest () const;
|
||||
protected:
|
||||
OpenCellDialog ( QWidget* parent=NULL );
|
||||
protected slots:
|
||||
void formatChanged ( int );
|
||||
|
||||
protected:
|
||||
QLineEdit* _lineEdit;
|
||||
QCheckBox* _viewerCheckBox;
|
||||
|
|
|
@ -45,9 +45,6 @@ namespace Unicorn {
|
|||
void setCellName ( const QString& );
|
||||
protected:
|
||||
SaveCellDialog ( QWidget* parent=NULL );
|
||||
protected slots:
|
||||
void formatChanged ( int );
|
||||
|
||||
protected:
|
||||
QLineEdit* _lineEdit;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue