Added ASCII/GDSII export capability in Unicorn.
* New: In Unicorn, in ExportCellDialog and UnicornGui add an entry to call the ASCII/GDSII export driver. * New: In CRL Core, in AgdsDriver, checks for off-grid coordinates (that is non-integer one) and round them with a warning. This is most likely that the layout is flawed but it will at leat generate a readable ASCII/GDSII file.
This commit is contained in:
parent
0fab6087fa
commit
e01f943367
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | C o r e L i b r a r y |
|
||||
// | |
|
||||
|
@ -17,10 +11,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./RoutingLayerGauge.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2009-2013, All Rights Reserved
|
||||
// Copyright (c) UPMC 2009-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
@ -14,12 +14,14 @@
|
|||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "hurricane/Library.h"
|
||||
|
@ -44,6 +46,21 @@ using namespace Hurricane;
|
|||
namespace {
|
||||
|
||||
|
||||
void isInteger ( double& value, Go* go, Path path )
|
||||
{
|
||||
double rounded = round( value );
|
||||
if (abs(value - rounded) > 0.01) {
|
||||
cerr << Warning( "agdsDriver(): Coordinate is not on grid %.2f, rounded to %.2f\n"
|
||||
" On %s (%s)"
|
||||
, value, rounded
|
||||
, getString(go).c_str()
|
||||
, getString(path).c_str()
|
||||
) << endl;
|
||||
value = rounded;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AgdsQuery : public Query {
|
||||
public:
|
||||
AgdsQuery ( Cell* );
|
||||
|
@ -91,12 +108,19 @@ namespace {
|
|||
else
|
||||
return;
|
||||
|
||||
double xmin = DbU::getPhysical(b.getXMin(), DbU::Nano);
|
||||
double ymin = DbU::getPhysical(b.getYMin(), DbU::Nano);
|
||||
double xmax = DbU::getPhysical(b.getXMax(), DbU::Nano);
|
||||
double ymax = DbU::getPhysical(b.getYMax(), DbU::Nano);
|
||||
|
||||
isInteger( xmin, go, getPath() );
|
||||
isInteger( ymin, go, getPath() );
|
||||
isInteger( xmax, go, getPath() );
|
||||
isInteger( ymax, go, getPath() );
|
||||
|
||||
getTransformation().applyOn( b );
|
||||
AGDS::Rectangle* rect = new AGDS::Rectangle ( getBasicLayer()->getExtractNumber()
|
||||
, DbU::getPhysical(b.getXMin(), DbU::Nano)
|
||||
, DbU::getPhysical(b.getYMin(), DbU::Nano)
|
||||
, DbU::getPhysical(b.getXMax(), DbU::Nano)
|
||||
, DbU::getPhysical(b.getYMax(), DbU::Nano));
|
||||
, xmin, ymin, xmax, ymax );
|
||||
_str->addElement( rect );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC 2009-2013, All Rights Reserved
|
||||
// Copyright (c) UPMC 2009-2014, All Rights Reserved
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
|
@ -17,10 +11,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./ExportCellDialog.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
@ -87,7 +78,8 @@ namespace Unicorn {
|
|||
formatLabel->setFont ( Graphics::getNormalFont(true) );
|
||||
hLayout2->addWidget ( formatLabel );
|
||||
|
||||
_formatComboBox->addItem ( tr("Alliance compliant DEF") , AllianceDef );
|
||||
_formatComboBox->addItem ( tr("Alliance compliant DEF"), AllianceDef );
|
||||
_formatComboBox->addItem ( tr("ASCII/GDSII (AGDS)") , AsciiGds );
|
||||
hLayout2->addWidget ( _formatComboBox );
|
||||
|
||||
QVBoxLayout* vLayout = new QVBoxLayout ();
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "crlcore/AllianceFramework.h"
|
||||
#include "crlcore/GraphicToolEngine.h"
|
||||
#include "crlcore/DefExport.h"
|
||||
#include "crlcore/GdsDriver.h"
|
||||
#include "unicorn/ImportCell.h"
|
||||
#include "unicorn/OpenCellDialog.h"
|
||||
#include "unicorn/SaveCellDialog.h"
|
||||
|
@ -42,6 +43,7 @@ namespace Unicorn {
|
|||
using CRL::Catalog;
|
||||
using CRL::AllianceFramework;
|
||||
using CRL::DefExport;
|
||||
using CRL::GdsDriver;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -241,6 +243,10 @@ namespace Unicorn {
|
|||
case ExportCellDialog::AllianceDef:
|
||||
DefExport::drive ( cell, DefExport::WithLEF );
|
||||
break;
|
||||
case ExportCellDialog::AsciiGds:
|
||||
GdsDriver gdsDriver ( cell );
|
||||
gdsDriver.save( getString(cell->getName())+".agds" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,9 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
|
@ -17,14 +11,11 @@
|
|||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./ExportCellDialog.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef __UNICORN_EXPORT_CELL_DIALOG_H__
|
||||
#define __UNICORN_EXPORT_CELL_DIALOG_H__
|
||||
#ifndef UNICORN_EXPORT_CELL_DIALOG_H
|
||||
#define UNICORN_EXPORT_CELL_DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
|
@ -40,7 +31,7 @@ namespace Unicorn {
|
|||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
enum Formats { AllianceDef=1 };
|
||||
enum Formats { AllianceDef=1, AsciiGds=2 };
|
||||
public:
|
||||
ExportCellDialog ( QWidget* parent=NULL );
|
||||
bool runDialog ( QString& name, int& format );
|
||||
|
|
|
@ -1,32 +1,23 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC 2008-2014, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | C O R I O L I S |
|
||||
// | U n i c o r n - M a i n G U I |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./SaveCellDialog.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// | C++ Header : "./unicorn/SaveCellDialog.h" |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#ifndef __UNICORN_SAVE_CELL_DIALOG_H__
|
||||
#define __UNICORN_SAVE_CELL_DIALOG_H__
|
||||
#ifndef UNICORN_SAVE_CELL_DIALOG_H
|
||||
#define UNICORN_SAVE_CELL_DIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDialog>
|
||||
|
||||
class QCheckBox;
|
||||
class QLineEdit;
|
||||
|
@ -50,9 +41,6 @@ namespace Unicorn {
|
|||
};
|
||||
|
||||
|
||||
} // Unicorn namespace.
|
||||
|
||||
|
||||
} // End of Unicorn namespace.
|
||||
|
||||
|
||||
#endif
|
||||
#endif // UNICORN_SAVE_CELL_DIALOG_H
|
||||
|
|
Loading…
Reference in New Issue