* ./hurricane/src/hurricane :
- CompositeLayer replaced by 5 kind of symbolic layers : RegularLayer (1 BasicLayer) DiffusionLayer (2 or 3 BasicLayers: active+implant,well) TransistorLayer (3 or 4 BasicLayers: poly+active+implant,well) ContactLayer (4 or 5 BasicLayers: metal+cut+active+implant,well) ViaLayer (3 BasicLayers: metal0+cut0+metal1) - To better follow the OpenAccess semantic, the "obstacle" Material type is renommed to "blockage". - NB: doxygen documentation is not up-to-date and issue warnings. * ./coriolis/src/crlcore : - Migrate from CompositeLayer to the various SymbolicLayers. - Symbolic rules are now closer to the reality so that a Cell displayed with Hurricane should look identical to the Graal one. - Complete rewrite of the AP parser. Much simplificated, do not try to merge/articulates segments. This ensure a true rendering of the Cell. Especially do not create contact to anchor diffusion segments, which leads to very strange randering (DRC error as well).
This commit is contained in:
parent
6746723a9f
commit
a2bb796e6f
|
@ -152,9 +152,6 @@ INPUT = \
|
|||
../../src/hurricane/hurricane/BasicLayers.h \
|
||||
../../src/hurricane/hurricane/BasicLayer.h \
|
||||
BasicLayer.dox \
|
||||
../../src/hurricane/hurricane/CompositeLayers.h \
|
||||
../../src/hurricane/hurricane/CompositeLayer.h \
|
||||
CompositeLayer.dox \
|
||||
../../src/hurricane/hurricane/Libraries.h \
|
||||
../../src/hurricane/hurricane/Library.h \
|
||||
Library.dox \
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/CompositeLayer.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
|
@ -236,12 +235,6 @@ namespace Hurricane {
|
|||
void BasicLayer::_preDestroy ()
|
||||
{
|
||||
Layer::_preDestroy();
|
||||
|
||||
CompositeLayers compositeLayers = getTechnology()->getCompositeLayers();
|
||||
for_each_composite_layer(compositeLayer, compositeLayers) {
|
||||
if (compositeLayer->contains(this)) compositeLayer->remove(this);
|
||||
end_for;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,12 +2,16 @@
|
|||
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane )
|
||||
set ( includes hurricane/BasicLayer.h hurricane/BasicLayers.h
|
||||
hurricane/RegularLayer.h hurricane/RegularLayers.h
|
||||
hurricane/ViaLayer.h hurricane/ViaLayers.h
|
||||
hurricane/ContactLayer.h
|
||||
hurricane/DiffusionLayer.h
|
||||
hurricane/TransistorLayer.h hurricane/TransistorLayers.h
|
||||
hurricane/Boxes.h hurricane/Box.h
|
||||
hurricane/Cell.h hurricane/Cells.h
|
||||
hurricane/Collection.h
|
||||
hurricane/Commons.h
|
||||
hurricane/Component.h hurricane/Components.h
|
||||
hurricane/CompositeLayer.h hurricane/CompositeLayers.h
|
||||
hurricane/Contact.h hurricane/Contacts.h
|
||||
hurricane/DataBase.h
|
||||
hurricane/DBo.h hurricane/DBos.h
|
||||
|
@ -75,12 +79,16 @@
|
|||
hurricane/Warning.h
|
||||
)
|
||||
set ( cpps BasicLayer.cpp
|
||||
RegularLayer.cpp
|
||||
ViaLayer.cpp
|
||||
ContactLayer.cpp
|
||||
DiffusionLayer.cpp
|
||||
TransistorLayer.cpp
|
||||
Box.cpp
|
||||
CellCollections.cpp
|
||||
Cell.cpp
|
||||
Commons.cpp
|
||||
Component.cpp
|
||||
CompositeLayer.cpp
|
||||
Contact.cpp
|
||||
DataBase.cpp
|
||||
DBo.cpp
|
||||
|
|
|
@ -321,7 +321,7 @@ void Component::materialize()
|
|||
|
||||
if (!isMaterialized()) {
|
||||
Cell* cell = getCell();
|
||||
Layer* layer = getLayer();
|
||||
const Layer* layer = getLayer();
|
||||
if (cell && layer) {
|
||||
Slice* slice = cell->getSlice(layer);
|
||||
if (!slice) slice = Slice::_create(cell, layer);
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
#include "hurricane/Contact.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Error.h"
|
||||
|
||||
|
@ -86,7 +86,7 @@ class Contact_Hooks : public Collection<Hook*> {
|
|||
// Contact implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Contact::Contact(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
Contact::Contact(Net* net, const Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
// ****************************************************************************************************
|
||||
: Inherit(net),
|
||||
_anchorHook(this),
|
||||
|
@ -98,9 +98,12 @@ Contact::Contact(Net* net, Layer* layer, const Unit& x, const Unit& y, const Uni
|
|||
{
|
||||
if (!_layer)
|
||||
throw Error("Can't create " + _TName("Contact") + " : null layer");
|
||||
|
||||
if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize();
|
||||
if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize();
|
||||
}
|
||||
|
||||
Contact::Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width, const Unit& height)
|
||||
Contact::Contact(Net* net, Component* anchor, const Layer* layer, const Unit& dx, const Unit& dy, const Unit& width, const Unit& height)
|
||||
// ****************************************************************************************************
|
||||
: Inherit(net),
|
||||
_anchorHook(this),
|
||||
|
@ -123,9 +126,12 @@ Contact::Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, cons
|
|||
throw Error("Can't create " + _TName("Contact") + " : null layer");
|
||||
|
||||
_anchorHook.attach(anchor->getBodyHook());
|
||||
|
||||
if ( _width < _layer->getMinimalSize() ) _width = _layer->getMinimalSize();
|
||||
if ( _height < _layer->getMinimalSize() ) _height = _layer->getMinimalSize();
|
||||
}
|
||||
|
||||
Contact* Contact::create(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
Contact* Contact::create(Net* net, const Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
Contact* contact = new Contact(net, layer, x, y, width, height);
|
||||
|
@ -135,7 +141,7 @@ Contact* Contact::create(Net* net, Layer* layer, const Unit& x, const Unit& y, c
|
|||
return contact;
|
||||
}
|
||||
|
||||
Contact* Contact::create(Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width, const Unit& height)
|
||||
Contact* Contact::create(Component* anchor, const Layer* layer, const Unit& dx, const Unit& dy, const Unit& width, const Unit& height)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
if (!anchor)
|
||||
|
@ -178,7 +184,7 @@ Point Contact::getPosition() const
|
|||
Box Contact::getBoundingBox() const
|
||||
// ********************************
|
||||
{
|
||||
Unit size = _getSize();
|
||||
Unit size = getLayer()->getEnclosure();
|
||||
|
||||
return Box(getPosition()).inflate(getHalfWidth() + size, getHalfHeight() + size);
|
||||
}
|
||||
|
@ -188,7 +194,7 @@ Box Contact::getBoundingBox(const BasicLayer* basicLayer) const
|
|||
{
|
||||
if (!_layer->contains(basicLayer)) return Box();
|
||||
|
||||
Unit size = _getSize(basicLayer);
|
||||
Unit size = getLayer()->getEnclosure(basicLayer);
|
||||
|
||||
return Box(getPosition()).inflate(getHalfWidth() + size, getHalfHeight() + size);
|
||||
}
|
||||
|
@ -210,7 +216,7 @@ void Contact::translate(const Unit& dx, const Unit& dy)
|
|||
}
|
||||
}
|
||||
|
||||
void Contact::setLayer(Layer* layer)
|
||||
void Contact::setLayer(const Layer* layer)
|
||||
// *********************************
|
||||
{
|
||||
if (!layer)
|
||||
|
@ -342,33 +348,6 @@ Record* Contact::_getRecord() const
|
|||
return record;
|
||||
}
|
||||
|
||||
Unit Contact::_getSize() const
|
||||
// ***************************
|
||||
{
|
||||
Unit size = 0;
|
||||
|
||||
Layer* layer = getLayer();
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
size = ((CompositeLayer*)layer)->getMaximalContactSize();
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Unit Contact::_getSize(const BasicLayer* basicLayer) const
|
||||
// *******************************************************
|
||||
{
|
||||
Layer* layer = getLayer();
|
||||
|
||||
if (!layer->contains(basicLayer)) return 0;
|
||||
|
||||
Unit size = 0;
|
||||
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
size = ((CompositeLayer*)layer)->getContactSize(basicLayer);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Contact::AnchorHook implementation
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./ContactLayer.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/ContactLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
const char* nullLayer =
|
||||
"ContactLayer::create() [%s]\n"
|
||||
" %s layer argument mustn't be NULL.";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::ContactLayer".
|
||||
|
||||
|
||||
ContactLayer::ContactLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* metalLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
) : Layer(technology
|
||||
,name
|
||||
,0 // minimalSize.
|
||||
,0) // minmalSpacing.
|
||||
,_basicLayers()
|
||||
,_enclosures()
|
||||
,_maximalEnclosure(0)
|
||||
{
|
||||
if ( !metalLayer ) throw Error ( nullLayer, getString(name).c_str(), "Metal" );
|
||||
if ( !cutLayer ) throw Error ( nullLayer, getString(name).c_str(), "Cut" );
|
||||
if ( !activeLayer ) throw Error ( nullLayer, getString(name).c_str(), "Active" );
|
||||
if ( !diffusionLayer ) throw Error ( nullLayer, getString(name).c_str(), "Diffusion" );
|
||||
|
||||
_basicLayers.reserve ( 5 );
|
||||
_enclosures .reserve ( 5 );
|
||||
|
||||
// Have to check wich one is top layer & cutLayer of type cut.
|
||||
_basicLayers.push_back ( metalLayer );
|
||||
_basicLayers.push_back ( cutLayer );
|
||||
_basicLayers.push_back ( activeLayer );
|
||||
_basicLayers.push_back ( diffusionLayer );
|
||||
|
||||
for ( size_t i=0 ; i<4 ; i++ ) {
|
||||
_enclosures.push_back ( 0 );
|
||||
}
|
||||
|
||||
_setMask ( metalLayer ->getMask()
|
||||
| cutLayer ->getMask()
|
||||
| activeLayer ->getMask()
|
||||
| diffusionLayer->getMask() );
|
||||
_setExtractMask ( metalLayer ->getExtractMask()
|
||||
| cutLayer ->getExtractMask()
|
||||
| activeLayer ->getExtractMask()
|
||||
| diffusionLayer->getExtractMask() );
|
||||
|
||||
if ( wellLayer ) {
|
||||
_basicLayers.push_back ( wellLayer );
|
||||
_enclosures .push_back ( 0 );
|
||||
|
||||
_setMask ( getMask() | wellLayer->getMask() );
|
||||
_setExtractMask ( getMask() | wellLayer->getExtractMask() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ContactLayer* ContactLayer::create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* metalLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
)
|
||||
{
|
||||
ContactLayer* transistorLayer = new ContactLayer ( technology
|
||||
, name
|
||||
, metalLayer
|
||||
, cutLayer
|
||||
, activeLayer
|
||||
, diffusionLayer
|
||||
, wellLayer
|
||||
);
|
||||
|
||||
transistorLayer->_postCreate();
|
||||
|
||||
return transistorLayer;
|
||||
}
|
||||
|
||||
|
||||
BasicLayers ContactLayer::getBasicLayers () const
|
||||
{ return getCollection(_basicLayers); }
|
||||
|
||||
|
||||
Unit ContactLayer::getEnclosure () const
|
||||
{ return _maximalEnclosure; }
|
||||
|
||||
|
||||
Unit ContactLayer::getEnclosure ( const BasicLayer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer )
|
||||
return _enclosures[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void ContactLayer::setEnclosure ( const BasicLayer* layer, Unit enclosure )
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer ) {
|
||||
_enclosures[i] = enclosure;
|
||||
_maximalEnclosure = max ( _maximalEnclosure, enclosure );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string ContactLayer::_getTypeName () const
|
||||
{ return _TName("ContactLayer"); }
|
||||
|
||||
|
||||
string ContactLayer::_getString () const
|
||||
{
|
||||
string s = Layer::_getString();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* ContactLayer::_getRecord () const
|
||||
{
|
||||
Record* record = Layer::_getRecord();
|
||||
if (record) {
|
||||
record->add(getSlot("_basicLayers", &_basicLayers));
|
||||
record->add(getSlot("_enclosures" , &_enclosures ));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
|
@ -0,0 +1,229 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./DiffusionLayer.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/DiffusionLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
const char* nullLayer =
|
||||
"DiffusionLayer::create() [%s]\n"
|
||||
" %s layer argument mustn't be NULL.";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::DiffusionLayer".
|
||||
|
||||
|
||||
DiffusionLayer::DiffusionLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
) : Layer(technology
|
||||
,name
|
||||
,0 // minimalSize.
|
||||
,0) // minmalSpacing.
|
||||
,_basicLayers()
|
||||
,_extentionCaps()
|
||||
,_extentionWidths()
|
||||
,_maximalExtentionCap(0)
|
||||
,_maximalExtentionWidth(0)
|
||||
{
|
||||
if ( !activeLayer ) throw Error ( nullLayer, getString(name).c_str(), "Active" );
|
||||
if ( !diffusionLayer ) throw Error ( nullLayer, getString(name).c_str(), "Diffusion" );
|
||||
|
||||
_basicLayers .reserve ( 3 );
|
||||
_extentionCaps .reserve ( 3 );
|
||||
_extentionWidths.reserve ( 3 );
|
||||
|
||||
// Have to check wich one is top layer & cutLayer of type cut.
|
||||
_basicLayers.push_back ( activeLayer );
|
||||
_basicLayers.push_back ( diffusionLayer );
|
||||
|
||||
for ( size_t i=0 ; i<2 ; i++ ) {
|
||||
_extentionCaps .push_back ( 0 );
|
||||
_extentionWidths.push_back ( 0 );
|
||||
}
|
||||
|
||||
_setMask ( activeLayer->getMask() | diffusionLayer->getMask() );
|
||||
_setExtractMask ( activeLayer->getExtractMask() | diffusionLayer->getExtractMask() );
|
||||
|
||||
if ( wellLayer ) {
|
||||
_basicLayers .push_back ( wellLayer );
|
||||
_extentionCaps .push_back ( 0 );
|
||||
_extentionWidths.push_back ( 0 );
|
||||
|
||||
_setMask ( getMask() | wellLayer->getMask() );
|
||||
_setExtractMask ( getMask() | wellLayer->getExtractMask() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DiffusionLayer* DiffusionLayer::create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
)
|
||||
{
|
||||
DiffusionLayer* transistorLayer = new DiffusionLayer ( technology
|
||||
, name
|
||||
, activeLayer
|
||||
, diffusionLayer
|
||||
, wellLayer
|
||||
);
|
||||
|
||||
transistorLayer->_postCreate();
|
||||
|
||||
return transistorLayer;
|
||||
}
|
||||
|
||||
|
||||
BasicLayers DiffusionLayer::getBasicLayers () const
|
||||
{ return getCollection(_basicLayers); }
|
||||
|
||||
|
||||
Unit DiffusionLayer::getExtentionCap () const
|
||||
{ return _maximalExtentionCap; }
|
||||
|
||||
|
||||
Unit DiffusionLayer::getExtentionWidth () const
|
||||
{ return _maximalExtentionWidth; }
|
||||
|
||||
|
||||
Unit DiffusionLayer::getExtentionCap ( const BasicLayer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer ) {
|
||||
//cerr << "getExtentionCap() - " << this << " on: " << layer << " " << _extentionCaps[i] << endl;;
|
||||
return _extentionCaps[i];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Unit DiffusionLayer::getExtentionWidth ( const BasicLayer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer ) {
|
||||
//cerr << "getExtentionWith() - " << this << " on: " << layer << " " << _extentionWidths[i] << endl;;
|
||||
return _extentionWidths[i];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void DiffusionLayer::setExtentionCap ( const BasicLayer* layer, Unit cap )
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer ) {
|
||||
//cerr << "setExtentionCap() - " << getName() << " " << layer << " " << cap << endl;
|
||||
_extentionCaps[i] = cap;
|
||||
_maximalExtentionCap = max ( _maximalExtentionCap, cap );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DiffusionLayer::setExtentionWidth ( const BasicLayer* layer, Unit width )
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer ) {
|
||||
//cerr << "setExtentionWidth() - " << getName() << " " << layer << " " << width << endl;
|
||||
_extentionWidths[i] = width;
|
||||
_maximalExtentionWidth = max ( _maximalExtentionWidth, width );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string DiffusionLayer::_getTypeName () const
|
||||
{ return _TName("DiffusionLayer"); }
|
||||
|
||||
|
||||
string DiffusionLayer::_getString () const
|
||||
{
|
||||
string s = Layer::_getString();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* DiffusionLayer::_getRecord () const
|
||||
{
|
||||
Record* record = Layer::_getRecord();
|
||||
if (record) {
|
||||
record->add(getSlot("_basicLayers" , &_basicLayers ));
|
||||
record->add(getSlot("_extentionCaps" , &_extentionCaps ));
|
||||
record->add(getSlot("_extentionWidths", &_extentionWidths));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
|
@ -1,56 +1,107 @@
|
|||
// ****************************************************************************************************
|
||||
// File: Error.cpp
|
||||
// Authors: R. Escassut
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
|
||||
#include "hurricane/Error.h"
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Hurricane Software.
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Remy Escassut |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./Error.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include <cstdarg>
|
||||
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::Error".
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Error implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Error::Error(const string& reason, int code)
|
||||
// *****************************************
|
||||
: Inherit(),
|
||||
_reason(reason),
|
||||
_code(code)
|
||||
{
|
||||
}
|
||||
Error::Error ( const string& reason )
|
||||
: Exception()
|
||||
, _reason(reason)
|
||||
, _code(0)
|
||||
{
|
||||
}
|
||||
|
||||
Error::Error(const Error& error)
|
||||
// *****************************
|
||||
: Inherit(),
|
||||
_reason(error._reason),
|
||||
_code(error._code)
|
||||
{
|
||||
}
|
||||
|
||||
Error& Error::operator=(const Error& error)
|
||||
// ****************************************
|
||||
{
|
||||
_reason = error._reason;
|
||||
_code = error._code;
|
||||
return *this;
|
||||
}
|
||||
Error::Error ( int code, const string& reason )
|
||||
: Exception()
|
||||
, _reason(reason)
|
||||
, _code(code)
|
||||
{
|
||||
}
|
||||
|
||||
string Error::_getString() const
|
||||
// *****************************
|
||||
{
|
||||
if (!_code) return "[ERROR] " + _reason;
|
||||
|
||||
Error::Error ( const char* format, ... )
|
||||
: Exception()
|
||||
, _reason("")
|
||||
, _code(0)
|
||||
{
|
||||
static char formatted [ 8192 ];
|
||||
va_list args;
|
||||
|
||||
va_start ( args, format );
|
||||
vsnprintf ( formatted, 8191, format, args );
|
||||
va_end ( args );
|
||||
|
||||
_reason = formatted;
|
||||
}
|
||||
|
||||
|
||||
Error::Error ( int code, const char* format, ... )
|
||||
: Exception()
|
||||
, _reason("")
|
||||
, _code(code)
|
||||
{
|
||||
static char formatted [ 8192 ];
|
||||
va_list args;
|
||||
|
||||
va_start ( args, format );
|
||||
vsnprintf ( formatted, 8191, format, args );
|
||||
va_end ( args );
|
||||
|
||||
_reason = formatted;
|
||||
}
|
||||
|
||||
|
||||
Error::Error ( const Error& error )
|
||||
: Exception()
|
||||
, _reason(error._reason)
|
||||
, _code(error._code)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
string Error::_getTypeName () const
|
||||
{ return _TName("Error"); }
|
||||
|
||||
|
||||
string Error::_getString() const
|
||||
{
|
||||
if ( !_code )
|
||||
return "[ERROR] " + _reason;
|
||||
|
||||
return "[ERROR:" + getString(_code) + "] " + _reason;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
// ****************************************************************************************************
|
||||
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
|
@ -19,7 +20,7 @@ namespace Hurricane {
|
|||
// Horizontal implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Horizontal::Horizontal(Net* net, Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget)
|
||||
Horizontal::Horizontal(Net* net, Component* source, Component* target, const Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget)
|
||||
// ****************************************************************************************************
|
||||
: Inherit(net, source, target, layer, width),
|
||||
_y(y),
|
||||
|
@ -28,7 +29,7 @@ Horizontal::Horizontal(Net* net, Component* source, Component* target, Layer* la
|
|||
{
|
||||
}
|
||||
|
||||
Horizontal* Horizontal::create(Net* net, Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget)
|
||||
Horizontal* Horizontal::create(Net* net, const Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
if (!net)
|
||||
|
@ -41,7 +42,7 @@ Horizontal* Horizontal::create(Net* net, Layer* layer, const Unit& y, const Unit
|
|||
return horizontal;
|
||||
}
|
||||
|
||||
Horizontal* Horizontal::create(Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget)
|
||||
Horizontal* Horizontal::create(Component* source, Component* target, const Layer* layer, const Unit& y, const Unit& width, const Unit& dxSource, const Unit& dxTarget)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
if (!source)
|
||||
|
@ -61,8 +62,8 @@ Horizontal* Horizontal::create(Component* source, Component* target, Layer* laye
|
|||
Box Horizontal::getBoundingBox() const
|
||||
// ***********************************
|
||||
{
|
||||
Unit size = getHalfWidth() + _getSize();
|
||||
Unit extention = _getExtention();
|
||||
Unit size = getLayer()->getExtentionWidth() + getHalfWidth();
|
||||
Unit extention = getLayer()->getExtentionCap ();
|
||||
|
||||
return Box(getSourceX(), _y, getTargetX(), _y).inflate(extention, size);
|
||||
}
|
||||
|
@ -72,8 +73,8 @@ Box Horizontal::getBoundingBox(const BasicLayer* basicLayer) const
|
|||
{
|
||||
if (!getLayer()->contains(basicLayer)) return Box();
|
||||
|
||||
Unit size = getHalfWidth() + _getSize(basicLayer);
|
||||
Unit extention = _getExtention(basicLayer);
|
||||
Unit size = getLayer()->getExtentionWidth(basicLayer) + getHalfWidth();
|
||||
Unit extention = getLayer()->getExtentionCap (basicLayer);
|
||||
|
||||
return Box(getSourceX(), _y, getTargetX(), _y).inflate(extention, size);
|
||||
}
|
||||
|
|
|
@ -501,8 +501,8 @@ static bool IsConnex(const Occurrence& componentOccurrence1, const Occurrence& c
|
|||
{
|
||||
Component* component1 = (Component*)componentOccurrence1.getEntity();
|
||||
Component* component2 = (Component*)componentOccurrence2.getEntity();
|
||||
Layer* layer1 = component1->getLayer();
|
||||
Layer* layer2 = component2->getLayer();
|
||||
const Layer* layer1 = component1->getLayer();
|
||||
const Layer* layer2 = component2->getLayer();
|
||||
if (layer1->getExtractMask() & layer2->getExtractMask()) {
|
||||
Transformation transformation1 = componentOccurrence1.getPath().getTransformation();
|
||||
Transformation transformation2 = componentOccurrence2.getPath().getTransformation();
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
|
||||
# include "hurricane/Layer.h"
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
@ -63,15 +64,35 @@ namespace Hurricane {
|
|||
|
||||
|
||||
Layer* Layer::getConnectorLayer () const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
{ return NULL; }
|
||||
|
||||
|
||||
Layer* Layer::getObstructionLayer () const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
{ return NULL; }
|
||||
|
||||
|
||||
Unit Layer::getEnclosure () const
|
||||
{ return 0; }
|
||||
|
||||
|
||||
Unit Layer::getExtentionCap () const
|
||||
{ return 0; }
|
||||
|
||||
|
||||
Unit Layer::getExtentionWidth () const
|
||||
{ return 0; }
|
||||
|
||||
|
||||
Unit Layer::getEnclosure ( const BasicLayer* layer ) const
|
||||
{ return 0; }
|
||||
|
||||
|
||||
Unit Layer::getExtentionCap ( const BasicLayer* layer ) const
|
||||
{ return 0; }
|
||||
|
||||
|
||||
Unit Layer::getExtentionWidth ( const BasicLayer* layer ) const
|
||||
{ return 0; }
|
||||
|
||||
|
||||
bool Layer::contains ( const Layer* layer ) const
|
||||
|
@ -118,6 +139,27 @@ namespace Hurricane {
|
|||
{
|
||||
_pitch = pitch;
|
||||
}
|
||||
|
||||
|
||||
void Layer::setEnclosure ( const BasicLayer* layer, Unit )
|
||||
{
|
||||
cerr << "[WARNING] Layer::setEnclosure() musn't be called on "
|
||||
<< _getTypeName() << ": dummy implementation." << endl;
|
||||
}
|
||||
|
||||
|
||||
void Layer::setExtentionCap ( const BasicLayer* layer, Unit )
|
||||
{
|
||||
cerr << "[WARNING] Layer::setExtentionCap() musn't be called on "
|
||||
<< _getTypeName() << ": dummy implementation." << endl;
|
||||
}
|
||||
|
||||
|
||||
void Layer::setExtentionWidth ( const BasicLayer* layer, Unit )
|
||||
{
|
||||
cerr << "[WARNING] Layer::setExtentionWidth() musn't be called on "
|
||||
<< _getTypeName() << ": dummy implementation." << endl;
|
||||
}
|
||||
|
||||
|
||||
void Layer::_postCreate ()
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "hurricane/Pad.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/Error.h"
|
||||
|
||||
namespace Hurricane {
|
||||
|
@ -59,9 +59,6 @@ Box Pad::getBoundingBox() const
|
|||
{
|
||||
Box boundingBox = _boundingBox;
|
||||
|
||||
if (is_a<CompositeLayer*>(_layer))
|
||||
boundingBox.inflate(((CompositeLayer*)_layer)->getMaximalPadSize());
|
||||
|
||||
return boundingBox;
|
||||
}
|
||||
|
||||
|
@ -72,9 +69,6 @@ Box Pad::getBoundingBox(const BasicLayer* basicLayer) const
|
|||
|
||||
Box boundingBox = _boundingBox;
|
||||
|
||||
if (is_a<CompositeLayer*>(_layer))
|
||||
boundingBox.inflate(((CompositeLayer*)_layer)->getPadSize(basicLayer));
|
||||
|
||||
return boundingBox;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Hurricane {
|
|||
// Pin implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Pin::Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
Pin::Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, const Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
// ****************************************************************************************************
|
||||
: Inherit(net, layer, x, y, width, height),
|
||||
_name(name),
|
||||
|
@ -32,7 +32,7 @@ Pin::Pin(Net* net, const Name& name, const AccessDirection& accessDirection, con
|
|||
|
||||
}
|
||||
|
||||
Pin* Pin::create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
Pin* Pin::create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, const Layer* layer, const Unit& x, const Unit& y, const Unit& width, const Unit& height)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
if (!net)
|
||||
|
|
|
@ -0,0 +1,322 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./RegularLayer.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/RegularLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
const char* nullLayer =
|
||||
"RegularLayer::setBasicLayer() [%s]\n"
|
||||
" basicLayer argument mustn't be NULL.";
|
||||
|
||||
const char* resetLayer =
|
||||
"RegularLayer::setBasicLayer() [%s]\n"
|
||||
" Reseting the basic layer is forbidden.";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::RegularLayer_RegularLayers".
|
||||
|
||||
|
||||
class RegularLayer_RegularLayers : public Collection<BasicLayer*> {
|
||||
|
||||
public:
|
||||
// Subclass: Locator.
|
||||
class Locator : public Hurricane::Locator<BasicLayer*> {
|
||||
public:
|
||||
// Constructors.
|
||||
Locator ( const BasicLayer* basicLayer = NULL );
|
||||
Locator ( const Locator& locator );
|
||||
// Methods.
|
||||
Locator& operator= ( const Locator& locator );
|
||||
virtual BasicLayer* getElement () const;
|
||||
virtual Hurricane::Locator<BasicLayer*>* getClone () const;
|
||||
virtual bool isValid () const;
|
||||
virtual void progress ();
|
||||
virtual string _getString () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes.
|
||||
const BasicLayer* _basicLayer;
|
||||
};
|
||||
|
||||
public:
|
||||
// Constructors.
|
||||
RegularLayer_RegularLayers ( const RegularLayer* regularLayer = NULL );
|
||||
RegularLayer_RegularLayers ( const RegularLayer_RegularLayers& );
|
||||
// Methods.
|
||||
RegularLayer_RegularLayers& operator= ( const RegularLayer_RegularLayers& );
|
||||
virtual Collection<BasicLayer*>* getClone () const;
|
||||
virtual Hurricane::Locator<BasicLayer*>* getLocator () const;
|
||||
virtual string _getString () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes.
|
||||
const RegularLayer* _regularLayer;
|
||||
};
|
||||
|
||||
|
||||
RegularLayer_RegularLayers::RegularLayer_RegularLayers ( const RegularLayer* regularLayer )
|
||||
: Collection<BasicLayer*>()
|
||||
, _regularLayer(regularLayer)
|
||||
{ }
|
||||
|
||||
|
||||
RegularLayer_RegularLayers::RegularLayer_RegularLayers ( const RegularLayer_RegularLayers& regularLayers )
|
||||
: Collection<BasicLayer*>()
|
||||
, _regularLayer(regularLayers._regularLayer)
|
||||
{ }
|
||||
|
||||
|
||||
RegularLayer_RegularLayers& RegularLayer_RegularLayers::operator= ( const RegularLayer_RegularLayers& regularLayers )
|
||||
{
|
||||
_regularLayer = regularLayers._regularLayer;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Collection<BasicLayer*>* RegularLayer_RegularLayers::getClone () const
|
||||
{ return new RegularLayer_RegularLayers(*this); }
|
||||
|
||||
|
||||
Locator<BasicLayer*>* RegularLayer_RegularLayers::getLocator () const
|
||||
{ return new Locator(_regularLayer->getBasicLayer()); }
|
||||
|
||||
|
||||
string RegularLayer_RegularLayers::_getString () const
|
||||
{
|
||||
string s = "<" + _TName("RegularLayer::RegularLayers");
|
||||
if (_regularLayer) s += " " + getString(_regularLayer);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
RegularLayer_RegularLayers::Locator::Locator ( const BasicLayer* basicLayer )
|
||||
: Hurricane::Locator<BasicLayer*>()
|
||||
, _basicLayer(basicLayer)
|
||||
{ }
|
||||
|
||||
|
||||
RegularLayer_RegularLayers::Locator::Locator ( const Locator& locator )
|
||||
: Hurricane::Locator<BasicLayer*>()
|
||||
, _basicLayer(locator._basicLayer)
|
||||
{ }
|
||||
|
||||
|
||||
RegularLayer_RegularLayers::Locator& RegularLayer_RegularLayers::Locator::operator= ( const Locator& locator )
|
||||
{
|
||||
_basicLayer = locator._basicLayer;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
BasicLayer* RegularLayer_RegularLayers::Locator::getElement () const
|
||||
{ return (BasicLayer*)_basicLayer; }
|
||||
|
||||
|
||||
Locator<BasicLayer*>* RegularLayer_RegularLayers::Locator::getClone () const
|
||||
{ return new Locator(*this); }
|
||||
|
||||
|
||||
bool RegularLayer_RegularLayers::Locator::isValid () const
|
||||
{ return (_basicLayer != NULL); }
|
||||
|
||||
|
||||
void RegularLayer_RegularLayers::Locator::progress ()
|
||||
{ _basicLayer = NULL; }
|
||||
|
||||
|
||||
string RegularLayer_RegularLayers::Locator::_getString () const
|
||||
{
|
||||
string s = "<" + _TName("RegularLayer::RegularLayers::Locator");
|
||||
if (_basicLayer) s += " " + getString(_basicLayer);
|
||||
s += ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::RegularLayer".
|
||||
|
||||
|
||||
RegularLayer::RegularLayer ( Technology* technology
|
||||
, const Name& name
|
||||
) : Layer(technology
|
||||
,name
|
||||
,0 // minimalSize.
|
||||
,0) // minmalSpacing.
|
||||
,_basicLayer(NULL)
|
||||
,_enclosure(0)
|
||||
,_extentionCap(0)
|
||||
,_extentionWidth(0)
|
||||
{ }
|
||||
|
||||
|
||||
RegularLayer* RegularLayer::create ( Technology* technology
|
||||
, const Name& name
|
||||
)
|
||||
{
|
||||
RegularLayer* regularLayer = new RegularLayer(technology, name);
|
||||
|
||||
regularLayer->_postCreate();
|
||||
|
||||
return regularLayer;
|
||||
}
|
||||
|
||||
|
||||
BasicLayers RegularLayer::getBasicLayers () const
|
||||
{ return RegularLayer_RegularLayers(this); }
|
||||
|
||||
|
||||
Unit RegularLayer::getEnclosure () const
|
||||
{ return _enclosure; }
|
||||
|
||||
|
||||
Unit RegularLayer::getExtentionCap () const
|
||||
{ return _extentionCap; }
|
||||
|
||||
|
||||
Unit RegularLayer::getExtentionWidth () const
|
||||
{ return _extentionWidth; }
|
||||
|
||||
|
||||
Unit RegularLayer::getEnclosure ( const BasicLayer* layer ) const
|
||||
{
|
||||
return (layer == _basicLayer) ? _enclosure : 0;
|
||||
}
|
||||
|
||||
|
||||
Unit RegularLayer::getExtentionCap ( const BasicLayer* layer ) const
|
||||
{
|
||||
return (layer == _basicLayer) ? _extentionCap : 0;
|
||||
}
|
||||
|
||||
|
||||
Unit RegularLayer::getExtentionWidth ( const BasicLayer* layer ) const
|
||||
{
|
||||
return (layer == _basicLayer) ? _extentionWidth : 0;
|
||||
}
|
||||
|
||||
|
||||
void RegularLayer::setBasicLayer ( BasicLayer* basicLayer )
|
||||
{
|
||||
if ( !basicLayer )
|
||||
throw Error ( nullLayer, getString(getName()).c_str() );
|
||||
|
||||
if ( _basicLayer )
|
||||
throw Error ( resetLayer, getString(getName()).c_str() );
|
||||
|
||||
_basicLayer = basicLayer;
|
||||
|
||||
_setMask ( _basicLayer->getMask() );
|
||||
_setExtractMask ( _basicLayer->getExtractMask() );
|
||||
}
|
||||
|
||||
|
||||
void RegularLayer::setEnclosure ( const BasicLayer* layer, Unit enclosure )
|
||||
{
|
||||
if ( _basicLayer == layer ) _enclosure = enclosure;
|
||||
}
|
||||
|
||||
|
||||
void RegularLayer::setExtentionCap ( const BasicLayer* layer, Unit cap )
|
||||
{
|
||||
if ( _basicLayer == layer ) _extentionCap = cap;
|
||||
}
|
||||
|
||||
|
||||
void RegularLayer::setExtentionWidth ( const BasicLayer* layer, Unit width )
|
||||
{
|
||||
if ( _basicLayer == layer ) _extentionWidth = width;
|
||||
}
|
||||
|
||||
|
||||
string RegularLayer::_getTypeName () const
|
||||
{ return _TName("RegularLayer"); }
|
||||
|
||||
|
||||
string RegularLayer::_getString () const
|
||||
{
|
||||
string s = Layer::_getString();
|
||||
// s.insert(s.length() - 1, " " + getString(_type));
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* RegularLayer::_getRecord () const
|
||||
{
|
||||
Record* record = Layer::_getRecord();
|
||||
if (record) {
|
||||
record->add(getSlot("_basicLayer" , _basicLayer ));
|
||||
record->add(getSlot("_enclosure" , &_enclosure ));
|
||||
record->add(getSlot("_extentionCap" , &_extentionCap ));
|
||||
record->add(getSlot("_extentionWidth", &_extentionWidth));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
|
@ -11,7 +11,7 @@
|
|||
#include "hurricane/RoutingPad.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/NetExternalComponents.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Pin.h"
|
||||
#include "hurricane/Segment.h"
|
||||
|
@ -111,7 +111,7 @@ Box RoutingPad::getBoundingBox(const BasicLayer* basicLayer) const
|
|||
return Box(getPosition());
|
||||
}
|
||||
|
||||
Layer* RoutingPad::getLayer() const
|
||||
const Layer* RoutingPad::getLayer() const
|
||||
// ******************************************************
|
||||
{
|
||||
Component* component = _getEntityAsComponent();
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include "hurricane/Segment.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/Error.h"
|
||||
|
||||
namespace Hurricane {
|
||||
|
@ -152,7 +151,7 @@ class Segment_Anchors : public Collection<Component*> {
|
|||
// Segment implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Segment::Segment(Net* net, Component* source, Component* target, Layer* layer, const Unit& width)
|
||||
Segment::Segment(Net* net, Component* source, Component* target, const Layer* layer, const Unit& width)
|
||||
// **********************************************************************************************
|
||||
: Inherit(net),
|
||||
_sourceHook(this),
|
||||
|
@ -241,7 +240,7 @@ Point Segment::getTargetPosition() const
|
|||
return Point(getTargetX(), getTargetY());
|
||||
}
|
||||
|
||||
void Segment::setLayer(Layer* layer)
|
||||
void Segment::setLayer(const Layer* layer)
|
||||
// *********************************
|
||||
{
|
||||
if (!layer)
|
||||
|
@ -316,60 +315,6 @@ Record* Segment::_getRecord() const
|
|||
return record;
|
||||
}
|
||||
|
||||
Unit Segment::_getSize() const
|
||||
// ***************************
|
||||
{
|
||||
Unit size = 0;
|
||||
|
||||
Layer* layer = getLayer();
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
size = ((CompositeLayer*)layer)->getMaximalSegmentSize();
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Unit Segment::_getExtention() const
|
||||
// ********************************
|
||||
{
|
||||
Unit extention = 0;
|
||||
|
||||
Layer* layer = getLayer();
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
extention = ((CompositeLayer*)layer)->getMaximalSegmentExtention();
|
||||
|
||||
return extention;
|
||||
}
|
||||
|
||||
Unit Segment::_getSize(const BasicLayer* basicLayer) const
|
||||
// *************************************************
|
||||
{
|
||||
Layer* layer = getLayer();
|
||||
|
||||
if (!layer->contains(basicLayer)) return 0;
|
||||
|
||||
Unit size = 0;
|
||||
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
size = ((CompositeLayer*)layer)->getSegmentSize(basicLayer);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
Unit Segment::_getExtention(const BasicLayer* basicLayer) const
|
||||
// ******************************************************
|
||||
{
|
||||
Layer* layer = getLayer();
|
||||
|
||||
if (!layer->contains(basicLayer)) return 0;
|
||||
|
||||
Unit extention = 0;
|
||||
|
||||
if (is_a<CompositeLayer*>(layer))
|
||||
extention = ((CompositeLayer*)layer)->getSegmentExtention(basicLayer);
|
||||
|
||||
return extention;
|
||||
}
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Segment::SourceHook implementation
|
||||
// ****************************************************************************************************
|
||||
|
|
|
@ -19,8 +19,8 @@ namespace Hurricane {
|
|||
// Slice implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Slice::Slice(Cell* cell, Layer* layer)
|
||||
// ***********************************
|
||||
Slice::Slice(Cell* cell, const Layer* layer)
|
||||
// *****************************************
|
||||
: _cell(cell),
|
||||
_layer(layer),
|
||||
_quadTree(),
|
||||
|
@ -72,7 +72,7 @@ Markers Slice::getMarkersUnder(const Box& area) const
|
|||
return SubTypeCollection<Go*, Marker*>(_quadTree.getGosUnder(area));
|
||||
}
|
||||
|
||||
Slice* Slice::_create(Cell* cell, Layer* layer)
|
||||
Slice* Slice::_create(Cell* cell, const Layer* layer)
|
||||
// ********************************************
|
||||
{
|
||||
Slice* slice = new Slice(cell, layer);
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/RegularLayer.h"
|
||||
#include "hurricane/ViaLayer.h"
|
||||
#include "hurricane/Error.h"
|
||||
|
||||
|
||||
|
@ -125,11 +126,18 @@ BasicLayer* Technology::getBasicLayer(const Name& name) const
|
|||
return (layer && is_a<BasicLayer*>(layer)) ? (BasicLayer*)layer : NULL;
|
||||
}
|
||||
|
||||
CompositeLayer* Technology::getCompositeLayer(const Name& name) const
|
||||
RegularLayer* Technology::getRegularLayer(const Name& name) const
|
||||
// **********************************************************
|
||||
{
|
||||
Layer* layer = getLayer(name);
|
||||
return (layer && is_a<RegularLayer*>(layer)) ? (RegularLayer*)layer : NULL;
|
||||
}
|
||||
|
||||
ViaLayer* Technology::getViaLayer(const Name& name) const
|
||||
// ******************************************************************
|
||||
{
|
||||
Layer* layer = getLayer(name);
|
||||
return (layer && is_a<CompositeLayer*>(layer)) ? (CompositeLayer*)layer : NULL;
|
||||
return (layer && is_a<ViaLayer*>(layer)) ? (ViaLayer*)layer : NULL;
|
||||
}
|
||||
|
||||
BasicLayers Technology::getBasicLayers() const
|
||||
|
@ -145,11 +153,16 @@ BasicLayers Technology::getBasicLayers(const Layer::Mask& mask) const
|
|||
return Technology_BasicLayers(this, mask);
|
||||
}
|
||||
|
||||
CompositeLayers Technology::getCompositeLayers() const
|
||||
RegularLayers Technology::getRegularLayers() const
|
||||
// ***************************************************
|
||||
{
|
||||
// return getLayers().getSubSet<CompositeLayer*>();
|
||||
return SubTypeCollection<Layer*, CompositeLayer*>(getLayers());
|
||||
return SubTypeCollection<Layer*, RegularLayer*>(getLayers());
|
||||
}
|
||||
|
||||
ViaLayers Technology::getViaLayers() const
|
||||
// ***************************************************
|
||||
{
|
||||
return SubTypeCollection<Layer*, ViaLayer*>(getLayers());
|
||||
}
|
||||
|
||||
void Technology::setName(const Name& name)
|
||||
|
|
|
@ -0,0 +1,231 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./TransistorLayer.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/TransistorLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
const char* nullLayer =
|
||||
"TransistorLayer::create() [%s]\n"
|
||||
" %s layer argument mustn't be NULL.";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::TransistorLayer".
|
||||
|
||||
|
||||
TransistorLayer::TransistorLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* gateLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
) : Layer(technology
|
||||
,name
|
||||
,0 // minimalSize.
|
||||
,0) // minmalSpacing.
|
||||
,_basicLayers()
|
||||
,_extentionCaps()
|
||||
,_extentionWidths()
|
||||
,_maximalExtentionCap(0)
|
||||
,_maximalExtentionWidth(0)
|
||||
{
|
||||
if ( !gateLayer ) throw Error ( nullLayer, getString(name).c_str(), "Gate" );
|
||||
if ( !activeLayer ) throw Error ( nullLayer, getString(name).c_str(), "Active" );
|
||||
if ( !diffusionLayer ) throw Error ( nullLayer, getString(name).c_str(), "Diffusion" );
|
||||
|
||||
_basicLayers .reserve ( 4 );
|
||||
_extentionCaps .reserve ( 4 );
|
||||
_extentionWidths.reserve ( 4 );
|
||||
|
||||
// Have to check wich one is top layer & cutLayer of type cut.
|
||||
_basicLayers.push_back ( gateLayer );
|
||||
_basicLayers.push_back ( activeLayer );
|
||||
_basicLayers.push_back ( diffusionLayer );
|
||||
|
||||
for ( size_t i=0 ; i<3 ; i++ ) {
|
||||
_extentionCaps .push_back ( 0 );
|
||||
_extentionWidths.push_back ( 0 );
|
||||
}
|
||||
|
||||
_setMask ( gateLayer ->getMask()
|
||||
| activeLayer ->getMask()
|
||||
| diffusionLayer->getMask() );
|
||||
_setExtractMask ( gateLayer ->getExtractMask()
|
||||
| activeLayer ->getExtractMask()
|
||||
| diffusionLayer->getExtractMask() );
|
||||
|
||||
if ( wellLayer ) {
|
||||
_basicLayers .push_back ( wellLayer );
|
||||
_extentionCaps .push_back ( 0 );
|
||||
_extentionWidths.push_back ( 0 );
|
||||
|
||||
_setMask ( getMask() | wellLayer->getMask() );
|
||||
_setExtractMask ( getMask() | wellLayer->getExtractMask() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TransistorLayer* TransistorLayer::create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* gateLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
)
|
||||
{
|
||||
TransistorLayer* transistorLayer = new TransistorLayer ( technology
|
||||
, name
|
||||
, gateLayer
|
||||
, activeLayer
|
||||
, diffusionLayer
|
||||
, wellLayer
|
||||
);
|
||||
|
||||
transistorLayer->_postCreate();
|
||||
|
||||
return transistorLayer;
|
||||
}
|
||||
|
||||
|
||||
BasicLayers TransistorLayer::getBasicLayers () const
|
||||
{ return getCollection(_basicLayers); }
|
||||
|
||||
|
||||
Unit TransistorLayer::getExtentionCap () const
|
||||
{ return _maximalExtentionCap; }
|
||||
|
||||
|
||||
Unit TransistorLayer::getExtentionWidth () const
|
||||
{ return _maximalExtentionWidth; }
|
||||
|
||||
|
||||
Unit TransistorLayer::getExtentionCap ( const BasicLayer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer )
|
||||
return _extentionCaps[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Unit TransistorLayer::getExtentionWidth ( const BasicLayer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer )
|
||||
return _extentionWidths[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void TransistorLayer::setExtentionCap ( const BasicLayer* layer, Unit cap )
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer ) {
|
||||
_extentionCaps[i] = cap;
|
||||
_maximalExtentionCap = max ( _maximalExtentionCap, cap );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TransistorLayer::setExtentionWidth ( const BasicLayer* layer, Unit width )
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( _basicLayers[i] == layer )
|
||||
_extentionWidths[i] = width;
|
||||
_maximalExtentionWidth = max ( _maximalExtentionWidth, width );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string TransistorLayer::_getTypeName () const
|
||||
{ return _TName("TransistorLayer"); }
|
||||
|
||||
|
||||
string TransistorLayer::_getString () const
|
||||
{
|
||||
string s = Layer::_getString();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* TransistorLayer::_getRecord () const
|
||||
{
|
||||
Record* record = Layer::_getRecord();
|
||||
if (record) {
|
||||
record->add(getSlot("_basicLayers" , &_basicLayers ));
|
||||
record->add(getSlot("_extentionCaps" , &_extentionCaps ));
|
||||
record->add(getSlot("_extentionWidths", &_extentionWidths));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
|
@ -5,9 +5,9 @@
|
|||
// ****************************************************************************************************
|
||||
|
||||
#include "hurricane/Vertical.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/BasicLayer.h"
|
||||
#include "hurricane/CompositeLayer.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Plug.h"
|
||||
#include "hurricane/Error.h"
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace Hurricane {
|
|||
// Vertical implementation
|
||||
// ****************************************************************************************************
|
||||
|
||||
Vertical::Vertical(Net* net, Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget)
|
||||
Vertical::Vertical(Net* net, Component* source, Component* target, const Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget)
|
||||
// ****************************************************************************************************
|
||||
: Inherit(net, source, target, layer, width),
|
||||
_x(x),
|
||||
|
@ -28,7 +28,7 @@ Vertical::Vertical(Net* net, Component* source, Component* target, Layer* layer,
|
|||
{
|
||||
}
|
||||
|
||||
Vertical* Vertical::create(Net* net, Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget)
|
||||
Vertical* Vertical::create(Net* net, const Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
if (!net)
|
||||
|
@ -41,7 +41,7 @@ Vertical* Vertical::create(Net* net, Layer* layer, const Unit& x, const Unit& wi
|
|||
return vertical;
|
||||
}
|
||||
|
||||
Vertical* Vertical::create(Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget)
|
||||
Vertical* Vertical::create(Component* source, Component* target, const Layer* layer, const Unit& x, const Unit& width, const Unit& dySource, const Unit& dyTarget)
|
||||
// ****************************************************************************************************
|
||||
{
|
||||
if (!source)
|
||||
|
@ -61,8 +61,8 @@ Vertical* Vertical::create(Component* source, Component* target, Layer* layer, c
|
|||
Box Vertical::getBoundingBox() const
|
||||
// *********************************
|
||||
{
|
||||
Unit size = getHalfWidth() + _getSize();
|
||||
Unit extention = _getExtention();
|
||||
Unit size = getLayer()->getExtentionWidth() + getHalfWidth();
|
||||
Unit extention = getLayer()->getExtentionCap ();
|
||||
|
||||
return Box(_x, getSourceY(), _x, getTargetY()).inflate(size, extention);
|
||||
}
|
||||
|
@ -70,10 +70,14 @@ Box Vertical::getBoundingBox() const
|
|||
Box Vertical::getBoundingBox(const BasicLayer* basicLayer) const
|
||||
// *******************************************************
|
||||
{
|
||||
if (!getLayer()->contains(basicLayer)) return Box();
|
||||
if (!getLayer()->contains(basicLayer)) return Box();
|
||||
|
||||
Unit size = getHalfWidth() + _getSize(basicLayer);
|
||||
Unit extention = _getExtention(basicLayer);
|
||||
|
||||
Unit size = getLayer()->getExtentionWidth(basicLayer) + getHalfWidth();
|
||||
Unit extention = getLayer()->getExtentionCap (basicLayer);
|
||||
|
||||
//cerr << this << " on: " << basicLayer << " " << size << " " << extention << endl;
|
||||
//cerr << Box(_x, getSourceY(), _x, getTargetY()).inflate(size, extention) << endl;
|
||||
|
||||
return Box(_x, getSourceY(), _x, getTargetY()).inflate(size, extention);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./ViaLayer.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# include "hurricane/BasicLayer.h"
|
||||
# include "hurricane/ViaLayer.h"
|
||||
# include "hurricane/Technology.h"
|
||||
# include "hurricane/Error.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
const char* nullLayer =
|
||||
"ViaLayer::create() [%s]\n"
|
||||
" %s layer argument mustn't be NULL.";
|
||||
|
||||
const char* badCutLayer =
|
||||
"ViaLayer::create() [%s]\n"
|
||||
" %s layer is not a cut layer.";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Hurricane::ViaLayer".
|
||||
|
||||
|
||||
ViaLayer::ViaLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* bottomLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* topLayer
|
||||
) : Layer(technology
|
||||
,name
|
||||
,0 // minimalSize.
|
||||
,0) // minmalSpacing.
|
||||
,_basicLayers()
|
||||
,_enclosures()
|
||||
,_maximalEnclosure(0)
|
||||
{
|
||||
if ( !bottomLayer ) throw Error ( nullLayer, getString(name).c_str(), "Bottom" );
|
||||
if ( !cutLayer ) throw Error ( nullLayer, getString(name).c_str(), "Cut" );
|
||||
if ( !topLayer ) throw Error ( nullLayer, getString(name).c_str(), "Top" );
|
||||
|
||||
if ( cutLayer->getMaterial() != BasicLayer::Material::cut )
|
||||
throw Error ( badCutLayer, getString(name).c_str()
|
||||
, getString(cutLayer->getName()).c_str() );
|
||||
|
||||
_basicLayers.reserve ( 3 );
|
||||
_enclosures .reserve ( 3 );
|
||||
|
||||
// Have to check wich one is top layer & cutLayer of type cut.
|
||||
_basicLayers.push_back ( bottomLayer );
|
||||
_basicLayers.push_back ( cutLayer );
|
||||
_basicLayers.push_back ( topLayer );
|
||||
|
||||
_setMask ( bottomLayer->getMask()
|
||||
| cutLayer ->getMask()
|
||||
| topLayer ->getMask() );
|
||||
_setExtractMask ( bottomLayer->getExtractMask()
|
||||
| cutLayer ->getExtractMask()
|
||||
| topLayer ->getExtractMask() );
|
||||
|
||||
_enclosures.push_back ( 0 );
|
||||
_enclosures.push_back ( 0 );
|
||||
_enclosures.push_back ( 0 );
|
||||
}
|
||||
|
||||
|
||||
ViaLayer* ViaLayer::create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* bottomLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* topLayer
|
||||
)
|
||||
{
|
||||
ViaLayer* viaLayer = new ViaLayer ( technology
|
||||
, name
|
||||
, bottomLayer
|
||||
, cutLayer
|
||||
, topLayer
|
||||
);
|
||||
|
||||
viaLayer->_postCreate();
|
||||
|
||||
return viaLayer;
|
||||
}
|
||||
|
||||
|
||||
BasicLayers ViaLayer::getBasicLayers () const
|
||||
{ return getCollection(_basicLayers); }
|
||||
|
||||
|
||||
Unit ViaLayer::getEnclosure () const
|
||||
{
|
||||
return _maximalEnclosure;
|
||||
}
|
||||
|
||||
|
||||
Unit ViaLayer::getEnclosure ( const BasicLayer* layer ) const
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( layer == _basicLayers[i] ) return _enclosures[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void ViaLayer::setEnclosure ( const BasicLayer* layer, Unit enclosure )
|
||||
{
|
||||
for ( size_t i=0 ; i<_basicLayers.size() ; i++ ) {
|
||||
if ( layer == _basicLayers[i] ) {
|
||||
_enclosures[i] = enclosure;
|
||||
_maximalEnclosure = max ( _maximalEnclosure, enclosure );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string ViaLayer::_getTypeName () const
|
||||
{ return _TName("ViaLayer"); }
|
||||
|
||||
|
||||
string ViaLayer::_getString () const
|
||||
{
|
||||
string s = Layer::_getString();
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* ViaLayer::_getRecord () const
|
||||
{
|
||||
Record* record = Layer::_getRecord();
|
||||
if (record) {
|
||||
record->add(getSlot("_basicLayers", &_basicLayers));
|
||||
record->add(getSlot("_enclosures" , &_enclosures ));
|
||||
}
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
|
@ -50,7 +50,7 @@ namespace Hurricane {
|
|||
, poly
|
||||
, cut
|
||||
, metal
|
||||
, obstacle
|
||||
, blockage
|
||||
, other
|
||||
};
|
||||
// Constructors.
|
||||
|
@ -153,7 +153,7 @@ inline string ProxyString<BasicLayer::Material::Code> ( const BasicLayer::Mater
|
|||
case BasicLayer::Material::poly: return "poly";
|
||||
case BasicLayer::Material::cut: return "cut";
|
||||
case BasicLayer::Material::metal: return "metal";
|
||||
case BasicLayer::Material::obstacle: return "obstacle";
|
||||
case BasicLayer::Material::blockage: return "blockage";
|
||||
case BasicLayer::Material::other: return "other";
|
||||
}
|
||||
return "abnormal";
|
||||
|
|
|
@ -76,7 +76,7 @@ class Component : public Go {
|
|||
public: virtual Unit getY() const = 0;
|
||||
public: virtual Point getPosition() const {return Point(getX(), getY());};
|
||||
public: virtual Point getCenter() const {return getPosition();};
|
||||
public: virtual Layer* getLayer() const = 0;
|
||||
public: virtual const Layer* getLayer() const = 0;
|
||||
public: virtual Box getBoundingBox() const = 0;
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const = 0;
|
||||
public: Components getConnexComponents() const;
|
||||
|
|
|
@ -47,7 +47,7 @@ class Contact : public Component {
|
|||
// **********
|
||||
|
||||
private: AnchorHook _anchorHook;
|
||||
private: Layer* _layer;
|
||||
private: const Layer* _layer;
|
||||
private: Unit _dx;
|
||||
private: Unit _dy;
|
||||
protected: Unit _width;
|
||||
|
@ -56,11 +56,11 @@ class Contact : public Component {
|
|||
// Constructors
|
||||
// ************
|
||||
|
||||
protected: Contact(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
protected: Contact(Net* net, Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0);
|
||||
protected: Contact(Net* net, const Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
protected: Contact(Net* net, Component* anchor, const Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0);
|
||||
|
||||
public: static Contact* create(Net* net, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
public: static Contact* create(Component* anchor, Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0);
|
||||
public: static Contact* create(Net* net, const Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
public: static Contact* create(Component* anchor, const Layer* layer, const Unit& dx, const Unit& dy, const Unit& width = 0, const Unit& height = 0);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
@ -70,7 +70,7 @@ class Contact : public Component {
|
|||
public: virtual Unit getY() const;
|
||||
public: virtual Point getPosition() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Layer* getLayer() const {return _layer;};
|
||||
public: virtual const Layer* getLayer() const {return _layer;};
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: Hook* getAnchorHook() {return &_anchorHook;};
|
||||
public: Component* getAnchor() const;
|
||||
|
@ -86,7 +86,7 @@ class Contact : public Component {
|
|||
|
||||
public: virtual void translate(const Unit& dx, const Unit& dy);
|
||||
|
||||
public: void setLayer(Layer* layer);
|
||||
public: void setLayer(const Layer* layer);
|
||||
public: void setWidth(const Unit& width);
|
||||
public: void setHeight(const Unit& height);
|
||||
public: void setSizes(const Unit& width, const Unit& height);
|
||||
|
@ -107,9 +107,6 @@ class Contact : public Component {
|
|||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: Unit _getSize() const;
|
||||
public: Unit _getSize(const BasicLayer* basicLayer) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,114 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./ContactLayer.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# ifndef __HURRICANE_CONTACT_LAYER__
|
||||
# define __HURRICANE_CONTACT_LAYER__
|
||||
|
||||
# include <vector>
|
||||
|
||||
# include "hurricane/Layer.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class ContactLayer : public Layer {
|
||||
|
||||
public:
|
||||
// Constructor.
|
||||
static ContactLayer* create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* metalLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
);
|
||||
// Accessors.
|
||||
virtual BasicLayers getBasicLayers () const;
|
||||
virtual Unit getEnclosure () const;
|
||||
virtual Unit getEnclosure ( const BasicLayer* layer ) const;
|
||||
// Updators.
|
||||
virtual void setEnclosure ( const BasicLayer* layer, Unit enclosure );
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes
|
||||
vector<BasicLayer*> _basicLayers;
|
||||
vector<Unit> _enclosures;
|
||||
Unit _maximalEnclosure;
|
||||
|
||||
protected:
|
||||
// Internal: Constructors & Destructors.
|
||||
ContactLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* metalLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
|
||||
SetNestedSlotAdapter(Hurricane::ContactLayer)
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,115 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./DiffusionLayer.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# ifndef __HURRICANE_DIFFUSION_LAYER__
|
||||
# define __HURRICANE_DIFFUSION_LAYER__
|
||||
|
||||
# include <vector>
|
||||
|
||||
# include "hurricane/Layer.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class DiffusionLayer : public Layer {
|
||||
|
||||
public:
|
||||
// Constructor.
|
||||
static DiffusionLayer* create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
);
|
||||
// Accessors.
|
||||
virtual BasicLayers getBasicLayers () const;
|
||||
virtual Unit getExtentionCap () const;
|
||||
virtual Unit getExtentionWidth () const;
|
||||
virtual Unit getExtentionCap ( const BasicLayer* layer ) const;
|
||||
virtual Unit getExtentionWidth ( const BasicLayer* layer ) const;
|
||||
// Updators.
|
||||
virtual void setExtentionCap ( const BasicLayer* layer, Unit cap );
|
||||
virtual void setExtentionWidth ( const BasicLayer* layer, Unit width );
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes
|
||||
vector<BasicLayer*> _basicLayers;
|
||||
vector<Unit> _extentionCaps;
|
||||
vector<Unit> _extentionWidths;
|
||||
Unit _maximalExtentionCap;
|
||||
Unit _maximalExtentionWidth;
|
||||
|
||||
protected:
|
||||
// Internal: Constructors & Destructors.
|
||||
DiffusionLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
|
||||
SetNestedSlotAdapter(Hurricane::DiffusionLayer)
|
||||
|
||||
|
||||
# endif
|
|
@ -1,66 +1,63 @@
|
|||
// ****************************************************************************************************
|
||||
// File: Error.h
|
||||
// Authors: R. Escassut
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Hurricane Software.
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Remy Escassut |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./Error.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
#ifndef HURRICANE_ERROR
|
||||
#define HURRICANE_ERROR
|
||||
|
||||
#include "hurricane/Exception.h"
|
||||
# ifndef __HURRICANE_ERROR__
|
||||
# define __HURRICANE_ERROR__
|
||||
|
||||
# include "hurricane/Exception.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class Error : public Exception {
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Error declaration
|
||||
// ****************************************************************************************************
|
||||
public:
|
||||
// Constructors.
|
||||
Error ( const string& reason );
|
||||
Error ( const char* format, ... );
|
||||
Error ( int code, const string& reason );
|
||||
Error ( int code, const char* format, ... );
|
||||
Error ( const Error& error );
|
||||
// Methods.
|
||||
inline string getReason () const;
|
||||
inline int getCode () const;
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
|
||||
class Error : public Exception {
|
||||
// ***************************
|
||||
private:
|
||||
// Internal: Attributes.
|
||||
string _reason;
|
||||
int _code;
|
||||
};
|
||||
|
||||
// Types
|
||||
// *****
|
||||
|
||||
public: typedef Exception Inherit;
|
||||
|
||||
// Attributes
|
||||
// **********
|
||||
|
||||
private: string _reason;
|
||||
private: int _code;
|
||||
|
||||
// Constructors
|
||||
// ************
|
||||
|
||||
public: Error(const string& reason, int code = 0);
|
||||
|
||||
public: Error(const Error& error);
|
||||
|
||||
// Operators
|
||||
// *********
|
||||
|
||||
public: Error& operator=(const Error& error);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
||||
public: string getReason() const {return _reason;};
|
||||
public: int getCode() const {return _code;};
|
||||
|
||||
// Modifiers
|
||||
// *********
|
||||
|
||||
public: void setReason ( const string& reason ) { _reason = reason; };
|
||||
|
||||
// Others
|
||||
// ******
|
||||
|
||||
public: virtual string _getTypeName() const { return _TName("Error"); };
|
||||
public: virtual string _getString() const;
|
||||
|
||||
};
|
||||
// Inline Functions.
|
||||
inline string Error::getReason () const { return _reason; }
|
||||
inline int Error::getCode () const { return _code; }
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
@ -68,8 +65,5 @@ class Error : public Exception {
|
|||
|
||||
SetNestedSlotAdapter(Hurricane::Error)
|
||||
|
||||
#endif // HURRICANE_ERROR
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
|
||||
// ****************************************************************************************************
|
||||
# endif // __HURRICANE_ERROR__
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
namespace Hurricane {
|
||||
|
||||
|
||||
class Layer;
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Horizontal declaration
|
||||
|
@ -36,10 +38,10 @@ class Horizontal : public Segment {
|
|||
// Constructors
|
||||
// ************
|
||||
|
||||
protected: Horizontal(Net* net, Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0);
|
||||
protected: Horizontal(Net* net, Component* source, Component* target, const Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0);
|
||||
|
||||
public: static Horizontal* create(Net* net, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0);
|
||||
public: static Horizontal* create(Component* source, Component* target, Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0);
|
||||
public: static Horizontal* create(Net* net, const Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0);
|
||||
public: static Horizontal* create(Component* source, Component* target, const Layer* layer, const Unit& y, const Unit& width = 0, const Unit& dxSource = 0, const Unit& dxTarget = 0);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
|
|
@ -55,6 +55,12 @@ namespace Hurricane {
|
|||
virtual BasicLayers getBasicLayers () const = 0;
|
||||
virtual Layer* getConnectorLayer () const;
|
||||
virtual Layer* getObstructionLayer () const;
|
||||
virtual Unit getEnclosure () const;
|
||||
virtual Unit getExtentionCap () const;
|
||||
virtual Unit getExtentionWidth () const;
|
||||
virtual Unit getEnclosure ( const BasicLayer* layer ) const;
|
||||
virtual Unit getExtentionCap ( const BasicLayer* layer ) const;
|
||||
virtual Unit getExtentionWidth ( const BasicLayer* layer ) const;
|
||||
// Predicates
|
||||
bool contains ( const Layer* layer ) const;
|
||||
bool intersect ( const Layer* layer ) const;
|
||||
|
@ -63,10 +69,12 @@ namespace Hurricane {
|
|||
void setMinimalSize ( const Unit& minimalSize );
|
||||
void setMinimalSpacing ( const Unit& minimalSpacing );
|
||||
void setPitch ( const Unit& pitch );
|
||||
virtual void setEnclosure ( const BasicLayer* layer, Unit );
|
||||
virtual void setExtentionCap ( const BasicLayer* layer, Unit );
|
||||
virtual void setExtentionWidth ( const BasicLayer* layer, Unit );
|
||||
// Hurricane Managment.
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
virtual BasicLayer* _getSymbolicBasicLayer () = 0;
|
||||
inline Layer* _getNextOfTechnologyLayerMap () const;
|
||||
inline void _setMask ( const Mask& mask );
|
||||
inline void _setExtractMask ( const Mask& extractMask );
|
||||
|
|
|
@ -48,7 +48,7 @@ class Pad : public Component {
|
|||
public: virtual Unit getY() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: virtual Layer* getLayer() const {return _layer;};
|
||||
public: virtual const Layer* getLayer() const {return _layer;};
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
|
|
@ -85,9 +85,9 @@ class Pin : public Contact {
|
|||
// Constructors
|
||||
// ************
|
||||
|
||||
protected: Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
protected: Pin(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, const Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
|
||||
public: static Pin* create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
public: static Pin* create(Net* net, const Name& name, const AccessDirection& accessDirection, const PlacementStatus& placementStatus, const Layer* layer, const Unit& x, const Unit& y, const Unit& width = 0, const Unit& height = 0);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
|
|
@ -54,7 +54,7 @@ class Plug : public Component {
|
|||
public: virtual Unit getY() const;
|
||||
public: virtual Point getPosition() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Layer* getLayer() const {return NULL;};
|
||||
public: virtual const Layer* getLayer() const {return NULL;};
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: Instance* getInstance() const {return _instance;};
|
||||
public: Net* getMasterNet() const {return _masterNet;};
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Remy Escassut |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./RegularLayer.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# ifndef __HURRICANE_REGULAR_LAYER__
|
||||
# define __HURRICANE_REGULAR_LAYER__
|
||||
|
||||
# include "hurricane/Layer.h"
|
||||
# include "hurricane/RegularLayers.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class RegularLayer : public Layer {
|
||||
|
||||
public:
|
||||
// Constructor.
|
||||
static RegularLayer* create ( Technology* technology
|
||||
, const Name& name
|
||||
);
|
||||
// Accessors.
|
||||
virtual BasicLayers getBasicLayers () const;
|
||||
inline BasicLayer* getBasicLayer () const;
|
||||
virtual Unit getEnclosure () const;
|
||||
virtual Unit getExtentionCap () const;
|
||||
virtual Unit getExtentionWidth () const;
|
||||
virtual Unit getEnclosure ( const BasicLayer* layer ) const;
|
||||
virtual Unit getExtentionCap ( const BasicLayer* layer ) const;
|
||||
virtual Unit getExtentionWidth ( const BasicLayer* layer ) const;
|
||||
// Updators
|
||||
void setBasicLayer ( BasicLayer* layer );
|
||||
virtual void setEnclosure ( const BasicLayer* layer, Unit enclosure );
|
||||
virtual void setExtentionCap ( const BasicLayer* layer, Unit cap );
|
||||
virtual void setExtentionWidth ( const BasicLayer* layer, Unit width );
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes
|
||||
BasicLayer* _basicLayer;
|
||||
Unit _enclosure;
|
||||
Unit _extentionCap;
|
||||
Unit _extentionWidth;
|
||||
|
||||
protected:
|
||||
// Internal: Constructors & Destructors.
|
||||
RegularLayer ( Technology* technology
|
||||
, const Name& name
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// Inline Functions.
|
||||
BasicLayer* RegularLayer::getBasicLayer () const { return _basicLayer; }
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
|
||||
SetNestedSlotAdapter(Hurricane::RegularLayer)
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
|
||||
|
||||
# ifndef __HURRICANE_REGULAR_LAYERS_H__
|
||||
# define __HURRICANE_REGULAR_LAYERS_H__
|
||||
|
||||
|
||||
# include "hurricane/Collection.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class RegularLayer;
|
||||
|
||||
|
||||
typedef GenericCollection<RegularLayer*> RegularLayers;
|
||||
typedef GenericLocator<RegularLayer*> RegularLayerLocator;
|
||||
typedef GenericFilter<RegularLayer*> RegularLayerFilter;
|
||||
|
||||
# define for_each_regular_layer(regularLayer, regularLayers) { \
|
||||
RegularLayerLocator _locator = regularLayers.getLocator(); \
|
||||
while ( _locator.isValid() ) { \
|
||||
RegularLayer* regularLayer = _locator.getElement(); \
|
||||
_locator.progress();
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif // __HURRICANE_REGULAR_LAYERS__
|
|
@ -56,7 +56,7 @@ class RoutingPad : public Component {
|
|||
public: virtual Unit getX() const;
|
||||
public: virtual Unit getY() const;
|
||||
public: virtual Box getBoundingBox() const;
|
||||
public: virtual Layer* getLayer() const;
|
||||
public: virtual const Layer* getLayer() const;
|
||||
public: virtual Box getBoundingBox(const BasicLayer* basicLayer) const;
|
||||
public: virtual Point getCenter() const;
|
||||
public: Occurrence getOccurrence() const { return _occurrence; };
|
||||
|
|
|
@ -65,13 +65,13 @@ class Segment : public Component {
|
|||
|
||||
private: SourceHook _sourceHook;
|
||||
private: TargetHook _targetHook;
|
||||
private: Layer* _layer;
|
||||
private: const Layer* _layer;
|
||||
private: Unit _width;
|
||||
|
||||
// Constructors
|
||||
// ************
|
||||
|
||||
protected: Segment(Net* net, Component* source, Component* target, Layer* layer, const Unit& width = 0);
|
||||
protected: Segment(Net* net, Component* source, Component* target, const Layer* layer, const Unit& width = 0);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
@ -79,7 +79,7 @@ class Segment : public Component {
|
|||
public: virtual Hooks getHooks() const;
|
||||
public: virtual Unit getX() const {return 0;};
|
||||
public: virtual Unit getY() const {return 0;};
|
||||
public: virtual Layer* getLayer() const {return _layer;};
|
||||
public: virtual const Layer* getLayer() const {return _layer;};
|
||||
public: Hook* getSourceHook() {return &_sourceHook;};
|
||||
public: Hook* getTargetHook() {return &_targetHook;};
|
||||
public: Hook* getOppositeHook(const Hook* hook) const;
|
||||
|
@ -100,7 +100,7 @@ class Segment : public Component {
|
|||
// Updators
|
||||
// ********
|
||||
|
||||
public: void setLayer(Layer* layer);
|
||||
public: void setLayer(const Layer* layer);
|
||||
public: void setWidth(const Unit& width);
|
||||
public: void invert();
|
||||
|
||||
|
@ -112,11 +112,6 @@ class Segment : public Component {
|
|||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: Unit _getSize() const;
|
||||
public: Unit _getExtention() const;
|
||||
public: Unit _getSize(const BasicLayer* basicLayer) const;
|
||||
public: Unit _getExtention(const BasicLayer* basicLayer) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -31,14 +31,14 @@ class Slice {
|
|||
// **********
|
||||
|
||||
private: Cell* _cell;
|
||||
private: Layer* _layer;
|
||||
private: const Layer* _layer;
|
||||
private: QuadTree _quadTree;
|
||||
private: Slice* _nextOfCellSliceMap;
|
||||
|
||||
// Constructors
|
||||
// ************
|
||||
|
||||
protected: Slice(Cell* cell, Layer* layer);
|
||||
protected: Slice(Cell* cell, const Layer* layer);
|
||||
|
||||
private: Slice(const Slice& slice); // not implemented to forbid copy construction
|
||||
|
||||
|
@ -56,7 +56,7 @@ class Slice {
|
|||
// *********
|
||||
|
||||
public: Cell* getCell() const {return _cell;};
|
||||
public: Layer* getLayer() const {return _layer;};
|
||||
public: const Layer* getLayer() const {return _layer;};
|
||||
public: const Box& getBoundingBox() const {return _quadTree.getBoundingBox();};
|
||||
public: Gos getGos() const {return _quadTree.getGos();};
|
||||
public: Gos getGosUnder(const Box& area) const {return _quadTree.getGosUnder(area);};
|
||||
|
@ -73,7 +73,7 @@ class Slice {
|
|||
// Others
|
||||
// ******
|
||||
|
||||
public: static Slice* _create(Cell* cell, Layer* layer);
|
||||
public: static Slice* _create(Cell* cell, const Layer* layer);
|
||||
|
||||
public: void _destroy();
|
||||
|
||||
|
|
|
@ -10,14 +10,16 @@
|
|||
#include "hurricane/DBo.h"
|
||||
#include "hurricane/Layer.h"
|
||||
#include "hurricane/BasicLayers.h"
|
||||
#include "hurricane/CompositeLayers.h"
|
||||
#include "hurricane/RegularLayers.h"
|
||||
#include "hurricane/ViaLayers.h"
|
||||
#include "hurricane/IntrusiveMap.h"
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
class DataBase;
|
||||
class BasicLayer;
|
||||
class CompositeLayer;
|
||||
class RegularLayer;
|
||||
class ViaLayer;
|
||||
|
||||
|
||||
|
||||
|
@ -71,11 +73,13 @@ class Technology : public DBo {
|
|||
public: const Name& getName() const {return _name;};
|
||||
public: Layer* getLayer(const Name& name) const {return _layerMap.getElement(name);};
|
||||
public: BasicLayer* getBasicLayer(const Name& name) const;
|
||||
public: CompositeLayer* getCompositeLayer(const Name& name) const;
|
||||
public: RegularLayer* getRegularLayer(const Name& name) const;
|
||||
public: ViaLayer* getViaLayer(const Name& name) const;
|
||||
public: Layers getLayers() const {return getCollection(_layerList);};
|
||||
public: BasicLayers getBasicLayers() const;
|
||||
public: BasicLayers getBasicLayers(const Layer::Mask& mask) const;
|
||||
public: CompositeLayers getCompositeLayers() const;
|
||||
public: RegularLayers getRegularLayers() const;
|
||||
public: ViaLayers getViaLayers() const;
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./TransistorLayer.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# ifndef __HURRICANE_TRANSISTOR_LAYER__
|
||||
# define __HURRICANE_TRANSISTOR_LAYER__
|
||||
|
||||
# include <vector>
|
||||
|
||||
# include "hurricane/Layer.h"
|
||||
# include "hurricane/TransistorLayers.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class TransistorLayer : public Layer {
|
||||
|
||||
public:
|
||||
// Constructor.
|
||||
static TransistorLayer* create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* gateLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
);
|
||||
// Accessors.
|
||||
virtual BasicLayers getBasicLayers () const;
|
||||
virtual Unit getExtentionCap () const;
|
||||
virtual Unit getExtentionWidth () const;
|
||||
virtual Unit getExtentionCap ( const BasicLayer* layer ) const;
|
||||
virtual Unit getExtentionWidth ( const BasicLayer* layer ) const;
|
||||
// Updators.
|
||||
virtual void setExtentionCap ( const BasicLayer* layer, Unit cap );
|
||||
virtual void setExtentionWidth ( const BasicLayer* layer, Unit width );
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes
|
||||
vector<BasicLayer*> _basicLayers;
|
||||
vector<Unit> _extentionCaps;
|
||||
vector<Unit> _extentionWidths;
|
||||
Unit _maximalExtentionCap;
|
||||
Unit _maximalExtentionWidth;
|
||||
|
||||
protected:
|
||||
// Internal: Constructors & Destructors.
|
||||
TransistorLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* gateLayer
|
||||
, BasicLayer* activeLayer
|
||||
, BasicLayer* diffusionLayer
|
||||
, BasicLayer* wellLayer
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
|
||||
SetNestedSlotAdapter(Hurricane::TransistorLayer)
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
|
||||
|
||||
# ifndef __HURRICANE_TRANSISTOR_LAYERS_H__
|
||||
# define __HURRICANE_TRANSISTOR_LAYERS_H__
|
||||
|
||||
|
||||
# include "hurricane/Collection.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class TransistorLayer;
|
||||
|
||||
|
||||
typedef GenericCollection<TransistorLayer*> TransistorLayers;
|
||||
typedef GenericLocator<TransistorLayer*> TransistorLayerLocator;
|
||||
typedef GenericFilter<TransistorLayer*> TransistorLayerFilter;
|
||||
|
||||
# define for_each_transistor_layer(transistorLayer, transistorLayers) { \
|
||||
TransistorLayerLocator _locator = transistorLayers.getLocator(); \
|
||||
while ( _locator.isValid() ) { \
|
||||
TransistorLayer* transistorLayer = _locator.getElement(); \
|
||||
_locator.progress();
|
||||
|
||||
}
|
||||
|
||||
|
||||
# endif // __HURRICANE_TRANSISTOR_LAYERS__
|
|
@ -13,6 +13,8 @@
|
|||
namespace Hurricane {
|
||||
|
||||
|
||||
class Layer;
|
||||
|
||||
|
||||
// ****************************************************************************************************
|
||||
// Vertical declaration
|
||||
|
@ -36,10 +38,10 @@ class Vertical : public Segment {
|
|||
// Constructors
|
||||
// ************
|
||||
|
||||
protected: Vertical(Net* net, Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0);
|
||||
protected: Vertical(Net* net, Component* source, Component* target, const Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0);
|
||||
|
||||
public: static Vertical* create(Net* net, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0);
|
||||
public: static Vertical* create(Component* source, Component* target, Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0);
|
||||
public: static Vertical* create(Net* net, const Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0);
|
||||
public: static Vertical* create(Component* source, Component* target, const Layer* layer, const Unit& x, const Unit& width = 0, const Unit& dySource = 0, const Unit& dyTarget = 0);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul Chaput |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./ViaLayer.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
# ifndef __HURRICANE_VIA_LAYER__
|
||||
# define __HURRICANE_VIA_LAYER__
|
||||
|
||||
# include <vector>
|
||||
|
||||
# include "hurricane/Layer.h"
|
||||
# include "hurricane/ViaLayers.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class ViaLayer : public Layer {
|
||||
|
||||
public:
|
||||
// Constructor.
|
||||
static ViaLayer* create ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* bottomLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* topLayer
|
||||
);
|
||||
// Accessors.
|
||||
virtual BasicLayers getBasicLayers () const;
|
||||
virtual Unit getEnclosure () const;
|
||||
virtual Unit getEnclosure ( const BasicLayer* layer ) const;
|
||||
// Updators.
|
||||
virtual void setEnclosure ( const BasicLayer* layer, Unit enclosure );
|
||||
// Hurricane Managment.
|
||||
virtual string _getTypeName () const;
|
||||
virtual string _getString () const;
|
||||
virtual Record* _getRecord () const;
|
||||
|
||||
private:
|
||||
// Internal: Attributes
|
||||
vector<BasicLayer*> _basicLayers;
|
||||
vector<Unit> _enclosures;
|
||||
Unit _maximalEnclosure;
|
||||
|
||||
protected:
|
||||
// Internal: Constructors & Destructors.
|
||||
ViaLayer ( Technology* technology
|
||||
, const Name& name
|
||||
, BasicLayer* bottomLayer
|
||||
, BasicLayer* cutLayer
|
||||
, BasicLayer* topLayer
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
||||
|
||||
SetNestedSlotAdapter(Hurricane::ViaLayer)
|
||||
|
||||
|
||||
# endif
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Project.
|
||||
// Copyright (C) Laboratoire LIP6 - Departement ASIM
|
||||
// Universite Pierre et Marie Curie
|
||||
//
|
||||
// Main contributors :
|
||||
// Christophe Alexandre <Christophe.Alexandre@lip6.fr>
|
||||
// Sophie Belloeil <Sophie.Belloeil@lip6.fr>
|
||||
// Hugo Clément <Hugo.Clement@lip6.fr>
|
||||
// Jean-Paul Chaput <Jean-Paul.Chaput@lip6.fr>
|
||||
// Damien Dupuis <Damien.Dupuis@lip6.fr>
|
||||
// Christian Masson <Christian.Masson@lip6.fr>
|
||||
// Marek Sroka <Marek.Sroka@lip6.fr>
|
||||
//
|
||||
// The Coriolis Project is free software; you can redistribute it
|
||||
// and/or modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 2 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// The Coriolis Project is distributed in the hope that it will be
|
||||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with the Coriolis Project; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
// USA
|
||||
//
|
||||
// License-Tag
|
||||
// Authors-Tag
|
||||
// ===================================================================
|
||||
|
||||
|
||||
# ifndef __HURRICANE_VIA_LAYERS_H__
|
||||
# define __HURRICANE_VIA_LAYERS_H__
|
||||
|
||||
|
||||
# include "hurricane/Collection.h"
|
||||
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
|
||||
class ViaLayer;
|
||||
|
||||
|
||||
typedef GenericCollection<ViaLayer*> ViaLayers;
|
||||
typedef GenericLocator<ViaLayer*> ViaLayerLocator;
|
||||
typedef GenericFilter<ViaLayer*> ViaLayerFilter;
|
||||
|
||||
# define for_each_via_layer(viaLayer, viaLayers) { \
|
||||
ViaLayerLocator _locator = viaLayers.getLocator(); \
|
||||
while ( _locator.isValid() ) { \
|
||||
ViaLayer* viaLayer = _locator.getElement(); \
|
||||
_locator.progress();
|
||||
|
||||
}
|
||||
|
||||
|
||||
# endif // __HURRICANE_VIA_LAYERS__
|
|
@ -143,7 +143,7 @@ extern "C" {
|
|||
Layer* layer = NULL;
|
||||
|
||||
HTRY
|
||||
layer = component->getLayer ();
|
||||
layer = const_cast<Layer*>(component->getLayer ());
|
||||
HCATCH
|
||||
|
||||
return PyLayer_Link ( layer );
|
||||
|
|
Loading…
Reference in New Issue