* ./hurricane/doc/hurricane/src/hurricane/Layer.{h.cpp}

./hurricane/doc/hurricane/src/hurricane/BasicLayer.{h.cpp}
   - Changed "Type" to "Material" to fit better the OpenAccess semantic.
       Introduce Material meanings : pWell, nWell, pImplant, nImplant
       active, metal, cut, obstacle & other.

 * ./coriolis/src/crlcore :
   - Switched to the generic layer model. Updated technology XML configuration
       files, technology parser & AP parser/driver.
   - Note that the representation of transistors visually changes as it's now
       modelled with Implant + Active.
This commit is contained in:
Jean-Paul Chaput 2008-05-28 11:24:53 +00:00
parent 643477f270
commit c2b9798777
11 changed files with 628 additions and 595 deletions

View File

@ -9,19 +9,13 @@
*
*/
/*! \typedef BasicLayer::Inherit
* Useful for calling upon methods of the base class without
* knowing it.
*/
/*! \name Constructors
*/
// \{
/*! \function BasicLayer* BasicLayer::create(Technology* technology,const Name& name,const BasicLayer::Type& type,unsigned extractNumber,const Unit& minimalSize = 0,const Unit& minimalSpacing = 0);
/*! \function BasicLayer* BasicLayer::create(Technology* technology,const Name& name,const BasicLayer::Material& material,unsigned extractNumber,const Unit& minimalSize = 0,const Unit& minimalSpacing = 0);
* creates and returns a new basic layer named \c \<name\>, of
* type \c \<type\> for the given technology (some geometrical
* type \c \<material\> for the given technology (some geometrical
* characteristics can also be specified).
*
* \caution Throws an exception if the technology is null, if the name is
@ -45,8 +39,8 @@
*/
// \{
/*! \function const BasicLayer::Type& BasicLayer::getType() const;
* \Return the basic layer type.
/*! \function const BasicLayer::Type& BasicLayer::getMaterial() const;
* \Return the basic layer material.
*/
/*! \function unsigned BasicLayer::getExtractNumber() const;

View File

@ -21,13 +21,6 @@
* pointer to an deleted object ...
*/
/*! \typedef Layer::Inherit
* Useful for calling upon methods of the base class without
* knowing it.
*/
/*! \typedef Layer::Mask
* This type represents a mask bit field characterising
* efficiently the constituents of any kind of layer. It

View File

@ -115,7 +115,7 @@ void HInspectorWidget::keyPressEvent(QKeyEvent *event) {
}
}
void HInspectorWidget::recordChanged(int index) {
void HInspectorWidget::recordChanged(size_t index) {
if (index >= 0 && index < filterProxyModelsHistory.size()) {
QSortFilterProxyModel* proxyModel = filterProxyModelsHistory[index];
slotsView->setModel(proxyModel);

View File

@ -20,7 +20,7 @@ class HInspectorWidget : public QWidget {
void setRecord(Record* record);
private slots:
void recordChanged(int index);
void recordChanged(size_t index);
void textFilterChanged();
protected:

View File

@ -1,339 +1,308 @@
// ****************************************************************************************************
// File: BasicLayer.cpp
// Authors: R. Escassut
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
// ****************************************************************************************************
#include "hurricane/BasicLayer.h"
#include "hurricane/Technology.h"
#include "hurricane/CompositeLayer.h"
#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 : "./BasicLayer.cpp" |
// | *************************************************************** |
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
# include "hurricane/BasicLayer.h"
# include "hurricane/Technology.h"
# include "hurricane/CompositeLayer.h"
# include "hurricane/Error.h"
namespace Hurricane {
// -------------------------------------------------------------------
// Class : "Hurricane::BasicLayer_BasicLayers".
// ****************************************************************************************************
// BasicLayer_BasicLayers declaration
// ****************************************************************************************************
class BasicLayer_BasicLayers : public Collection<BasicLayer*> {
// **********************************************************
class BasicLayer_BasicLayers : public Collection<BasicLayer*> {
// Types
// *****
public: typedef Collection<BasicLayer*> Inherit;
public: class Locator : public Hurricane::Locator<BasicLayer*> {
// ***********************************************************
public: typedef Hurricane::Locator<BasicLayer*> Inherit;
private: const BasicLayer* _basicLayer;
public: Locator(const BasicLayer* basicLayer = NULL);
public: Locator(const Locator& locator);
public: Locator& operator=(const Locator& locator);
public: virtual BasicLayer* getElement() const;
public: virtual Hurricane::Locator<BasicLayer*>* getClone() const;
public: virtual bool isValid() const;
public: virtual void progress();
public: virtual string _getString() const;
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;
};
// Atributes
// *********
public:
// Constructors.
BasicLayer_BasicLayers ( const BasicLayer* basicLayer = NULL );
BasicLayer_BasicLayers ( const BasicLayer_BasicLayers& );
// Methods.
BasicLayer_BasicLayers& operator= ( const BasicLayer_BasicLayers& );
virtual Collection<BasicLayer*>* getClone () const;
virtual Hurricane::Locator<BasicLayer*>* getLocator () const;
virtual string _getString () const;
private: const BasicLayer* _basicLayer;
// Constructors
// ************
public: BasicLayer_BasicLayers(const BasicLayer* basicLayer = NULL);
public: BasicLayer_BasicLayers(const BasicLayer_BasicLayers& basicLayers);
// Operators
// *********
public: BasicLayer_BasicLayers& operator=(const BasicLayer_BasicLayers& basicLayers);
// Accessors
// *********
public: virtual Collection<BasicLayer*>* getClone() const;
public: virtual Hurricane::Locator<BasicLayer*>* getLocator() const;
// Others
// ******
public: virtual string _getString() const;
};
private:
// Internal: Attributes.
const BasicLayer* _basicLayer;
};
BasicLayer_BasicLayers::BasicLayer_BasicLayers ( const BasicLayer* basicLayer )
: Collection<BasicLayer*>()
, _basicLayer(basicLayer)
{ }
// ****************************************************************************************************
// BasicLayer implementation
// ****************************************************************************************************
BasicLayer::BasicLayer(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize, const Unit& minimalSpacing)
// ****************************************************************************************************
: Inherit(technology, name, minimalSize, minimalSpacing),
_type(type),
_extractNumber(extractNumber),
_realName("<not associated>")
{
}
BasicLayer_BasicLayers::BasicLayer_BasicLayers ( const BasicLayer_BasicLayers& basicLayers )
: Collection<BasicLayer*>()
, _basicLayer(basicLayers._basicLayer)
{ }
BasicLayer* BasicLayer::create(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize, const Unit& minimalSpacing)
// ****************************************************************************************************
{
BasicLayer_BasicLayers& BasicLayer_BasicLayers::operator= ( const BasicLayer_BasicLayers& basicLayers )
{
_basicLayer = basicLayers._basicLayer;
return *this;
}
Collection<BasicLayer*>* BasicLayer_BasicLayers::getClone () const
{ return new BasicLayer_BasicLayers(*this); }
Locator<BasicLayer*>* BasicLayer_BasicLayers::getLocator () const
{ return new Locator(_basicLayer); }
string BasicLayer_BasicLayers::_getString () const
{
string s = "<" + _TName("BasicLayer::BasicLayers");
if (_basicLayer) s += " " + getString(_basicLayer);
s += ">";
return s;
}
BasicLayer_BasicLayers::Locator::Locator ( const BasicLayer* basicLayer )
: Hurricane::Locator<BasicLayer*>()
, _basicLayer(basicLayer)
{ }
BasicLayer_BasicLayers::Locator::Locator ( const Locator& locator )
: Hurricane::Locator<BasicLayer*>()
, _basicLayer(locator._basicLayer)
{ }
BasicLayer_BasicLayers::Locator& BasicLayer_BasicLayers::Locator::operator= ( const Locator& locator )
{
_basicLayer = locator._basicLayer;
return *this;
}
BasicLayer* BasicLayer_BasicLayers::Locator::getElement () const
{ return (BasicLayer*)_basicLayer; }
Locator<BasicLayer*>* BasicLayer_BasicLayers::Locator::getClone () const
{ return new Locator(*this); }
bool BasicLayer_BasicLayers::Locator::isValid () const
{ return (_basicLayer != NULL); }
void BasicLayer_BasicLayers::Locator::progress ()
{ _basicLayer = NULL; }
string BasicLayer_BasicLayers::Locator::_getString () const
{
string s = "<" + _TName("BasicLayer::BasicLayers::Locator");
if (_basicLayer) s += " " + getString(_basicLayer);
s += ">";
return s;
}
// -------------------------------------------------------------------
// Class : "Hurricane::BasicLayer".
BasicLayer::BasicLayer ( Technology* technology
, const Name& name
, const Material& material
, unsigned extractNumber
, const Unit& minimalSize
, const Unit& minimalSpacing
) : Layer(technology
,name
,minimalSize
,minimalSpacing)
,_material(material)
,_extractNumber(extractNumber)
,_realName("<not associated>")
{ }
BasicLayer* BasicLayer::create ( Technology* technology
, const Name& name
, const Material& material
, unsigned extractNumber
, const Unit& minimalSize
, const Unit& minimalSpacing
)
{
BasicLayer* basicLayer =
new BasicLayer(technology, name, type, extractNumber, minimalSize, minimalSpacing);
new BasicLayer(technology, name, material, extractNumber, minimalSize, minimalSpacing);
basicLayer->_postCreate();
return basicLayer;
}
}
BasicLayers BasicLayer::getBasicLayers() const
// *******************************************
{
return BasicLayer_BasicLayers(this);
}
void BasicLayer::_postCreate()
// ***************************
{
BasicLayer* BasicLayer::getConnectorLayer () const
{ return _connectorLayer; }
BasicLayer* BasicLayer::getObstructionLayer () const
{ return _obstructionLayer; }
BasicLayers BasicLayer::getBasicLayers () const
{ return BasicLayer_BasicLayers(this); }
void BasicLayer::_postCreate ()
{
Mask basicLayersMask = 0;
for_each_basic_layer(basicLayer, getTechnology()->getBasicLayers()) {
basicLayersMask |= basicLayer->getMask();
end_for;
basicLayersMask |= basicLayer->getMask();
end_for;
}
Mask mask = 1;
while (mask && (mask & basicLayersMask)) mask = mask<<1;
if (!mask)
throw Error("Can't create " + _TName("BasicLayer") + " : mask capacity overflow");
throw Error("Can't create " + _TName("BasicLayer") + " : mask capacity overflow");
_setMask(mask);
if (_extractNumber) {
Mask extractMask = (1 << _extractNumber);
Mask extractMask = (1 << _extractNumber);
if (!extractMask)
throw Error("Can't create " + _TName("BasicLayer") + " : extract mask capacity overflow");
if (!extractMask)
throw Error("Can't create " + _TName("BasicLayer") + " : extract mask capacity overflow");
_setExtractMask(extractMask);
_setExtractMask(extractMask);
}
Inherit::_postCreate();
}
Layer::_postCreate();
}
void BasicLayer::_preDestroy()
// **************************
{
Inherit::_preDestroy();
void BasicLayer::_preDestroy ()
{
Layer::_preDestroy();
CompositeLayers compositeLayers = getTechnology()->getCompositeLayers();
for_each_composite_layer(compositeLayer, compositeLayers) {
if (compositeLayer->contains(this)) compositeLayer->remove(this);
end_for;
if (compositeLayer->contains(this)) compositeLayer->remove(this);
end_for;
}
}
}
string BasicLayer::_getString() const
// **********************************
{
string s = Inherit::_getString();
// s.insert(s.length() - 1, " " + getString(_type));
BasicLayer* BasicLayer::_getSymbolicBasicLayer ()
{ return this; }
string BasicLayer::_getTypeName () const
{ return _TName("BasicLayer"); }
string BasicLayer::_getString () const
{
string s = Layer::_getString();
// s.insert(s.length() - 1, " " + getString(_type));
return s;
}
}
Record* BasicLayer::_getRecord() const
// *****************************
{
Record* record = Inherit::_getRecord();
Record* BasicLayer::_getRecord () const
{
Record* record = Layer::_getRecord();
if (record) {
record->add(getSlot("Type", &_type));
record->add(getSlot("RealName", &_realName));
record->add(getSlot("Material", &_material));
record->add(getSlot("RealName", &_realName));
}
return record;
}
}
// ****************************************************************************************************
// BasicLayer_BasicLayers implementation
// ****************************************************************************************************
BasicLayer_BasicLayers::BasicLayer_BasicLayers(const BasicLayer* basicLayer)
// *************************************************************************
: Inherit(),
_basicLayer(basicLayer)
{
}
// -------------------------------------------------------------------
// Class : "Hurricane::BasicLayer::Material".
BasicLayer_BasicLayers::BasicLayer_BasicLayers(const BasicLayer_BasicLayers& basicLayers)
// **************************************************************************************
: Inherit(),
_basicLayer(basicLayers._basicLayer)
{
}
BasicLayer_BasicLayers& BasicLayer_BasicLayers::operator=(const BasicLayer_BasicLayers& basicLayers)
// *************************************************************************************************
{
_basicLayer = basicLayers._basicLayer;
BasicLayer::Material::Material (const Code& code )
: _code(code)
{ }
BasicLayer::Material::Material ( const Material& material )
: _code(material._code)
{ }
BasicLayer::Material& BasicLayer::Material::operator= ( const Material& material )
{
_code = material._code;
return *this;
}
Collection<BasicLayer*>* BasicLayer_BasicLayers::getClone() const
// **************************************************************
{
return new BasicLayer_BasicLayers(*this);
}
Locator<BasicLayer*>* BasicLayer_BasicLayers::getLocator() const
// *************************************************************
{
return new Locator(_basicLayer);
}
string BasicLayer_BasicLayers::_getString() const
// **********************************************
{
string s = "<" + _TName("BasicLayer::BasicLayers");
if (_basicLayer) s += " " + getString(_basicLayer);
s += ">";
return s;
}
}
// ****************************************************************************************************
// BasicLayer_BasicLayers::Locator implementation
// ****************************************************************************************************
BasicLayer_BasicLayers::Locator::Locator(const BasicLayer* basicLayer)
// *******************************************************************
: Inherit(),
_basicLayer(basicLayer)
{
}
BasicLayer_BasicLayers::Locator::Locator(const Locator& locator)
// *************************************************************
: Inherit(),
_basicLayer(locator._basicLayer)
{
}
BasicLayer_BasicLayers::Locator& BasicLayer_BasicLayers::Locator::operator=(const Locator& locator)
// ************************************************************************************************
{
_basicLayer = locator._basicLayer;
return *this;
}
BasicLayer* BasicLayer_BasicLayers::Locator::getElement() const
// ************************************************************
{
return (BasicLayer*)_basicLayer;
}
Locator<BasicLayer*>* BasicLayer_BasicLayers::Locator::getClone() const
// ********************************************************************
{
return new Locator(*this);
}
bool BasicLayer_BasicLayers::Locator::isValid() const
// **************************************************
{
return (_basicLayer != NULL);
}
void BasicLayer_BasicLayers::Locator::progress()
// *********************************************
{
_basicLayer = NULL;
}
string BasicLayer_BasicLayers::Locator::_getString() const
// *******************************************************
{
string s = "<" + _TName("BasicLayer::BasicLayers::Locator");
if (_basicLayer) s += " " + getString(_basicLayer);
s += ">";
return s;
}
string BasicLayer::Material::_getString () const
{ return getString(_code); }
// ****************************************************************************************************
// BasicLayer::Type implementation
// ****************************************************************************************************
BasicLayer::Type::Type(const Code& code)
// *************************************
: _code(code)
{
}
BasicLayer::Type::Type(const Type& type)
// *************************************
: _code(type._code)
{
}
BasicLayer::Type& BasicLayer::Type::operator=(const Type& type)
// ************************************************************
{
_code = type._code;
return *this;
}
string BasicLayer::Type::_getString() const
// ****************************************
{
return getString(_code);
}
Record* BasicLayer::Type::_getRecord() const
// ***********************************
{
Record* BasicLayer::Material::_getRecord () const
{
Record* record = new Record(getString(this));
record->add(getSlot("Code", &_code));
return record;
}
}
} // End of Hurricane namespace.
bool Scan(const string& s, Hurricane::BasicLayer::Type& type)
// **************************************************
{
if (s == "UNDEFINED") {
type = Hurricane::BasicLayer::Type::UNDEFINED;
return true;
}
if (s == "CONDUCTING") {
type = Hurricane::BasicLayer::Type::CONDUCTING;
return true;
}
if (s == "CONTACT") {
type = Hurricane::BasicLayer::Type::CONTACT;
return true;
}
return false;
}
// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
// ****************************************************************************************************

View File

@ -84,7 +84,7 @@ void ltraceout (unsigned int level, unsigned int count )
// -------------------------------------------------------------------
// Function : "Demangle ()".
string Demangle ( const char* symbol )
string demangle ( const char* symbol )
{
string mangled = "_Z";
mangled += symbol;

View File

@ -229,7 +229,7 @@ void CompositeLayer::_updateSymbolicBasicLayer(const Layer::Mask& visibleBasicLa
for_each_basic_layer(basicLayer, getBasicLayers()) {
if (basicLayer->getMask() & visibleBasicLayersMask) {
symbolicBasicLayer = basicLayer;
if (basicLayer->getType() == BasicLayer::Type::CONTACT)
if (basicLayer->getMaterial() == BasicLayer::Material::cut)
_symbolicBasicLayer = basicLayer;
}
end_for;

View File

@ -1,133 +1,165 @@
// ****************************************************************************************************
// File: Layer.cpp
// Authors: R. Escassut
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
// ****************************************************************************************************
#include "hurricane/Layer.h"
#include "hurricane/Technology.h"
#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 : "./Layer.cpp" |
// | *************************************************************** |
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
# include "hurricane/Layer.h"
# include "hurricane/Technology.h"
# include "hurricane/Error.h"
namespace Hurricane {
// -------------------------------------------------------------------
// Class : "Hurricane::Layer".
// ****************************************************************************************************
// Layer implementation
// ****************************************************************************************************
Layer::Layer(Technology* technology, const Name& name, const Unit& minimalSize, const Unit& minimalSpacing, const Unit& pitch)
// ****************************************************************************************************
: Inherit(),
_technology(technology),
_name(name),
_mask(0),
_extractMask(0),
_minimalSize(minimalSize),
_minimalSpacing(minimalSpacing),
_pitch(pitch),
_nextOfTechnologyLayerMap(NULL)
{
if (!_technology)
throw Error("Can't create " + _TName("Layer") + " : null technology");
Layer::Layer ( Technology* technology
, const Name& name
, const Unit& minimalSize
, const Unit& minimalSpacing
, const Unit& pitch
) : DBo()
, _technology(technology)
, _name(name)
, _mask(0)
, _extractMask(0)
, _minimalSize(minimalSize)
, _minimalSpacing(minimalSpacing)
, _pitch(pitch)
, _nextOfTechnologyLayerMap(NULL)
{
if ( !_technology )
throw Error ( "Can't create " + _TName("Layer") + " : null technology" );
if (_name.isEmpty())
throw Error("Can't create " + _TName("Layer") + " : empty name");
if ( _name.isEmpty() )
throw Error ( "Can't create " + _TName("Layer") + " : empty name" );
if (_technology->getLayer(_name))
throw Error("Can't create " + _TName("Layer") + " " + getString(_name) + " : already exists");
}
if ( _technology->getLayer(_name) )
throw Error ( "Can't create " + _TName("Layer") + " " + getString(_name) + " : already exists" );
}
bool Layer::contains(const Layer* layer) const
// *******************************************
{
return (layer && ((_mask & layer->getMask()) == layer->getMask()));
}
bool Layer::intersect(const Layer* layer) const
// ********************************************
{
return ((_mask & layer->getMask()) != 0);
}
Layer* Layer::getConnectorLayer () const
{
return NULL;
}
void Layer::setName(const Name& name)
// **********************************
{
if (name != _name) {
if (name.isEmpty())
throw Error("Can't change layer name : empty name");
if (_technology->getLayer(name))
throw Error("Can't change layer name : already exists");
Layer* Layer::getObstructionLayer () const
{
return NULL;
}
_technology->_getLayerMap()._remove(this);
_name = name;
_technology->_getLayerMap()._insert(this);
bool Layer::contains ( const Layer* layer ) const
{
return ( layer && ((_mask & layer->getMask()) == layer->getMask()) );
}
bool Layer::intersect ( const Layer* layer ) const
{
return ( (_mask & layer->getMask()) != 0 );
}
void Layer::setName ( const Name& name )
{
if ( name != _name ) {
if ( name.isEmpty() )
throw Error ( "Can't change layer name : empty name" );
if ( _technology->getLayer(name) )
throw Error ( "Can't change layer name : already exists" );
_technology->_getLayerMap()._remove(this);
_name = name;
_technology->_getLayerMap()._insert(this);
}
}
}
void Layer::setMinimalSize(const Unit& minimalSize)
// ************************************************
{
void Layer::setMinimalSize ( const Unit& minimalSize )
{
_minimalSize = minimalSize;
}
}
void Layer::setMinimalSpacing(const Unit& minimalSpacing)
// ******************************************************
{
void Layer::setMinimalSpacing ( const Unit& minimalSpacing )
{
_minimalSpacing = minimalSpacing;
}
}
void Layer::setPitch(const Unit& pitch)
// ************************************
{
void Layer::setPitch ( const Unit& pitch )
{
_pitch = pitch;
}
}
void Layer::_postCreate()
// **********************
{
void Layer::_postCreate ()
{
_technology->_getLayerMap()._insert(this);
_technology->_getLayerList().push_back(this);
Inherit::_postCreate();
}
DBo::_postCreate();
}
void Layer::_preDestroy()
// *********************
{
Inherit::_preDestroy();
void Layer::_preDestroy ()
{
DBo::_preDestroy();
_technology->_getLayerList().remove(this);
_technology->_getLayerMap()._remove(this);
}
}
string Layer::_getString() const
// *****************************
{
string s = Inherit::_getString();
string Layer::_getString() const
{
string s = DBo::_getString();
s.insert(s.length() - 1, " " + getString(_name));
return s;
}
}
Record* Layer::_getRecord() const
// ************************
{
Record* record = Inherit::_getRecord();
Record* Layer::_getRecord() const
{
Record* record = DBo::_getRecord();
if (record) {
record->add(getSlot("Technology", _technology));
record->add(getSlot("Name", &_name));
record->add(getSlot("Mask", &_mask));
record->add(getSlot("ExtractMask", &_extractMask));
record->add(getSlot("MinimalSize", &_minimalSize));
record->add(getSlot("MinimalSpacing", &_minimalSpacing));
record->add(getSlot("Pitch", &_pitch));
record->add(getSlot("Technology", _technology));
record->add(getSlot("Name", &_name));
record->add(getSlot("Mask", &_mask));
record->add(getSlot("ExtractMask", &_extractMask));
record->add(getSlot("MinimalSize", &_minimalSize));
record->add(getSlot("MinimalSpacing", &_minimalSpacing));
record->add(getSlot("Pitch", &_pitch));
}
return record;
}
}
} // End of Hurricane namespace.
// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
// ****************************************************************************************************

View File

@ -1,133 +1,172 @@
// ****************************************************************************************************
// File: BasicLayer.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 : "./BasicLayer.h" |
// | *************************************************************** |
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef HURRICANE_BASIC_LAYER
#define HURRICANE_BASIC_LAYER
#include "hurricane/Layer.h"
#include "hurricane/BasicLayers.h"
#include "hurricane/Box.h"
# ifndef __HURRICANE_BASIC_LAYER__
# define __HURRICANE_BASIC_LAYER__
# include "hurricane/Layer.h"
# include "hurricane/BasicLayers.h"
# include "hurricane/Box.h"
namespace Hurricane {
class View;
class BasicLayer : public Layer {
public:
// Subclass: Material.
class Material {
// Enum: Code.
public:
enum Code { nWell =0
, pWell
, nImplant
, pImplant
, active
, poly
, cut
, metal
, obstacle
, other
};
// Constructors.
Material ( const Code& code = other );
Material ( const Material& material );
// Methods.
Material& operator= ( const Material& material );
inline operator const Code& () const;
inline const Code& getCode () const;
inline string _getTypeName () const;
string _getString () const;
Record* _getRecord () const;
// Internal: Attributes.
private:
Code _code;
};
public:
// Constructor.
static BasicLayer* create ( Technology* technology
, const Name& name
, const Material& material
, unsigned extractNumber
, const Unit& minimalSize = 0
, const Unit& minimalSpacing = 0
);
// Accessors.
inline const Material& getMaterial () const;
inline unsigned getExtractNumber () const;
virtual BasicLayers getBasicLayers () const;
virtual BasicLayer* getConnectorLayer () const;
virtual BasicLayer* getObstructionLayer () const;
inline const Name& getRealName () const;
// Updators
inline void setConnectorLayer ( BasicLayer* layer);
inline void setObstructionLayer ( BasicLayer* layer);
inline void setRealName ( const char* realName);
// Hurricane Managment.
virtual BasicLayer* _getSymbolicBasicLayer ();
virtual string _getTypeName () const;
virtual string _getString () const;
virtual Record* _getRecord () const;
// ****************************************************************************************************
// BasicLayer declaration
// ****************************************************************************************************
private:
// Internal: Attributes
Material _material;
unsigned _extractNumber;
BasicLayer* _connectorLayer;
BasicLayer* _obstructionLayer;
Name _realName;
class BasicLayer : public Layer {
// ****************************
// Types
// *****
public: typedef Layer Inherit;
public: class Type {
// ***************
public: enum Code {UNDEFINED=0, CONDUCTING=1, CONTACT=2};
private: Code _code;
public: Type(const Code& code = UNDEFINED);
public: Type(const Type& type);
public: Type& operator=(const Type& type);
public: operator const Code&() const {return _code;};
public: const Code& getCode() const {return _code;};
public: string _getTypeName() const { return _TName("BasicLayer::Type"); };
public: string _getString() const;
public: Record* _getRecord() const;
};
// Attributes
// **********
private: Type _type;
private: unsigned _extractNumber;
private: BasicLayer* _connectorLayer;
private: BasicLayer* _obstructionLayer;
private: Name _realName;
// Constructors
// ************
protected: BasicLayer(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
public: static BasicLayer* create(Technology* technology, const Name& name, const Type& type, unsigned extractNumber, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0);
// Accessors
// *********
public: const Type& getType() const {return _type;};
public: unsigned getExtractNumber() const {return _extractNumber;};
public: virtual BasicLayers getBasicLayers() const;
public: virtual BasicLayer* getConnectorLayer() const {return _connectorLayer;};
public: virtual BasicLayer* getObstructionLayer() const {return _obstructionLayer;};
public: const Name& getRealName () const { return _realName; };
// Updators
// ********
public: void setConnectorLayer(BasicLayer* layer) {_connectorLayer = layer;};
public: void setObstructionLayer(BasicLayer* layer) {_obstructionLayer = layer;};
public: void setRealName(const char* realName) { _realName = realName; };
// Others
// ******
protected: virtual void _postCreate();
protected: virtual void _preDestroy();
public: virtual string _getTypeName() const {return _TName("BasicLayer");};
public: virtual string _getString() const;
public: virtual Record* _getRecord() const;
public: virtual BasicLayer* _getSymbolicBasicLayer() {return this;};
public: void _fill(View* view, const Box& box) const;
};
protected:
// Internal: Constructors & Destructors.
BasicLayer ( Technology* technology
, const Name& name
, const Material& material
, unsigned extractNumber
, const Unit& minimalSize = 0
, const Unit& minimalSpacing = 0
);
virtual void _postCreate ();
virtual void _preDestroy ();
};
// Inline Functions.
BasicLayer::Material::operator const Code& () const { return _code; }
const BasicLayer::Material::Code&
BasicLayer::Material::getCode () const { return _code; }
string BasicLayer::Material::_getTypeName () const { return _TName("BasicLayer::Material"); }
const BasicLayer::Material&
BasicLayer::getMaterial () const { return _material; }
unsigned BasicLayer::getExtractNumber () const { return _extractNumber; }
const Name& BasicLayer::getRealName () const { return _realName; }
void BasicLayer::setConnectorLayer ( BasicLayer* layer) { _connectorLayer = layer; }
void BasicLayer::setObstructionLayer ( BasicLayer* layer) { _obstructionLayer = layer; }
void BasicLayer::setRealName ( const char* realName) { _realName = realName; }
// -------------------------------------------------------------------
// Class : "Proxy...<const BasicLayer::Type::Code*>".
// Class : "Proxy...<const BasicLayer::Material::Code*>".
template<>
inline string ProxyTypeName<BasicLayer::Type::Code> ( const BasicLayer::Type::Code* object )
{ return "<PointerSlotAdapter<BasicLayer::Type::Code>>"; }
inline string ProxyTypeName<BasicLayer::Material::Code> ( const BasicLayer::Material::Code* object )
{ return "<PointerSlotAdapter<BasicLayer::Material::Code>>"; }
template<>
inline string ProxyString<BasicLayer::Type::Code> ( const BasicLayer::Type::Code* object )
{
switch ( *object ) {
case BasicLayer::Type::UNDEFINED: return "UNDEFINED";
case BasicLayer::Type::CONDUCTING: return "CONDUCTING";
case BasicLayer::Type::CONTACT: return "CONTACT";
}
return "ABNORMAL";
}
inline string ProxyString<BasicLayer::Material::Code> ( const BasicLayer::Material::Code* object )
{
switch ( *object ) {
case BasicLayer::Material::nWell: return "nWell";
case BasicLayer::Material::pWell: return "pWell";
case BasicLayer::Material::nImplant: return "nImplant";
case BasicLayer::Material::pImplant: return "pImplant";
case BasicLayer::Material::active: return "active";
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::other: return "other";
}
return "abnormal";
}
template<>
inline Record* ProxyRecord<BasicLayer::Type::Code> ( const BasicLayer::Type::Code* object )
{
Record* record = new Record(getString(object));
record->add(getSlot("Code", (unsigned int*)object));
return record;
}
inline Record* ProxyRecord<BasicLayer::Material::Code> ( const BasicLayer::Material::Code* object )
{
Record* record = new Record(getString(object));
record->add(getSlot("Code", (unsigned int*)object));
return record;
}
} // End of Hurricane namespace.
@ -136,11 +175,4 @@ template<>
SetNestedSlotAdapter(Hurricane::BasicLayer)
bool Scan(const string& s, Hurricane::BasicLayer::Type& type);
#endif // HURRICANE_BASIC_LAYER
// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
// ****************************************************************************************************
# endif

View File

@ -7,7 +7,7 @@
//
// ===================================================================
//
// $Id: Commons.h,v 1.19 2007/07/29 15:24:52 jpc Exp $
// $Id$
//
// x-----------------------------------------------------------------x
// | |
@ -101,8 +101,8 @@ namespace Hurricane {
template<class Type>
inline Type abs ( const Type& value ) { return (value<0) ? -value : value; }
string Demangle ( const char* symbol );
inline string Demangle ( const type_info& info ) { return Demangle(info.name()); }
string demangle ( const char* symbol );
inline string demangle ( const type_info& info ) { return demangle(info.name()); }

View File

@ -1,99 +1,115 @@
// ****************************************************************************************************
// File: Layer.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 : "./Layer.h" |
// | *************************************************************** |
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef HURRICANE_LAYER
#define HURRICANE_LAYER
#include "hurricane/DBo.h"
#include "hurricane/Layers.h"
#include "hurricane/Unit.h"
#include "hurricane/BasicLayers.h"
# ifndef __HURRICANE_LAYER__
# define __HURRICANE_LAYER__
# include "hurricane/DBo.h"
# include "hurricane/Layers.h"
# include "hurricane/Unit.h"
# include "hurricane/BasicLayers.h"
namespace Hurricane {
class Technology;
class Technology;
class Layer : public DBo {
// ****************************************************************************************************
// Layer declaration
// ****************************************************************************************************
public:
// Types.
typedef unsigned long long Mask;
// Accessors.
inline Technology* getTechnology () const;
inline const Name& getName () const;
inline const Mask& getMask () const;
inline const Mask& getExtractMask () const;
inline const Unit& getMinimalSize () const;
inline const Unit& getMinimalSpacing () const;
inline Unit getPitch () const;
virtual BasicLayers getBasicLayers () const = 0;
virtual Layer* getConnectorLayer () const;
virtual Layer* getObstructionLayer () const;
// Predicates
bool contains ( const Layer* layer ) const;
bool intersect ( const Layer* layer ) const;
// Updators
void setName ( const Name& name );
void setMinimalSize ( const Unit& minimalSize );
void setMinimalSpacing ( const Unit& minimalSpacing );
void setPitch ( const Unit& pitch );
// 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 );
inline void _setNextOfTechnologyLayerMap ( Layer* layer );
class Layer : public DBo {
// *********************
// Types
// *****
private:
// Internal: Attributes
Technology* _technology;
Name _name;
Mask _mask;
Mask _extractMask;
Unit _minimalSize;
Unit _minimalSpacing;
Unit _pitch;
Layer* _nextOfTechnologyLayerMap;
public: typedef DBo Inherit;
protected:
// Internal: Constructors & Destructors.
Layer ( Technology* technology
, const Name& name
, const Unit& minimalSize = 0
, const Unit& minimalSpacing = 0
, const Unit& pitch = 0
);
virtual void _postCreate ();
virtual void _preDestroy ();
};
public: typedef unsigned long long Mask;
// Attributes
// **********
// Inline Functions.
inline Technology* Layer::getTechnology () const { return _technology; }
inline const Name& Layer::getName () const { return _name; }
inline const Layer::Mask& Layer::getMask () const { return _mask; }
inline const Layer::Mask& Layer::getExtractMask () const { return _extractMask; }
inline const Unit& Layer::getMinimalSize () const { return _minimalSize; }
inline const Unit& Layer::getMinimalSpacing () const { return _minimalSpacing; }
inline Unit Layer::getPitch () const { return (_pitch==0?(_minimalSize + _minimalSpacing):_pitch); }
inline Layer* Layer::_getNextOfTechnologyLayerMap () const { return _nextOfTechnologyLayerMap; }
inline void Layer::_setMask ( const Mask& mask ) { _mask = mask; }
inline void Layer::_setExtractMask ( const Mask& extractMask ) { _extractMask = extractMask; }
inline void Layer::_setNextOfTechnologyLayerMap ( Layer* layer ) { _nextOfTechnologyLayerMap = layer; }
private: Technology* _technology;
private: Name _name;
private: Mask _mask;
private: Mask _extractMask;
private: Unit _minimalSize;
private: Unit _minimalSpacing;
private: Unit _pitch;
private: Layer* _nextOfTechnologyLayerMap;
// Constructors
// ************
protected: Layer(Technology* technology, const Name& name, const Unit& minimalSize = 0, const Unit& minimalSpacing = 0, const Unit& pitch = 0);
// Accessors
// *********
public: Technology* getTechnology() const {return _technology;};
public: const Name& getName() const {return _name;};
public: const Mask& getMask() const {return _mask;};
public: const Mask& getExtractMask() const {return _extractMask;};
public: const Unit& getMinimalSize() const {return _minimalSize;};
public: const Unit& getMinimalSpacing() const {return _minimalSpacing;};
public: Unit getPitch() const {return (_pitch==0?(_minimalSize + _minimalSpacing):_pitch);};
public: virtual BasicLayers getBasicLayers() const = 0;
public: virtual Layer* getConnectorLayer() const {return NULL;};
public: virtual Layer* getObstructionLayer() const {return NULL;};
// Predicates
// **********
public: bool contains(const Layer* layer) const;
public: bool intersect(const Layer* layer) const;
// Updators
// ********
public: void setName(const Name& name);
public: void setMinimalSize(const Unit& minimalSize);
public: void setMinimalSpacing(const Unit& minimalSpacing);
public: void setPitch(const Unit& pitch);
// Others
// ******
protected: virtual void _postCreate();
protected: virtual void _preDestroy();
public: virtual string _getString() const;
public: virtual Record* _getRecord() const;
public: virtual BasicLayer* _getSymbolicBasicLayer() = 0;
public: Layer* _getNextOfTechnologyLayerMap() const {return _nextOfTechnologyLayerMap;};
public: void _setMask(const Mask& mask) {_mask = mask;};
public: void _setExtractMask(const Mask& extractMask) {_extractMask = extractMask;};
public: void _setNextOfTechnologyLayerMap(Layer* layer) {_nextOfTechnologyLayerMap = layer;};
};
} // End of Hurricane namespace.
@ -101,8 +117,5 @@ class Layer : public DBo {
SetNestedSlotAdapter(Hurricane::Layer)
#endif // HURRICANE_LAYER
// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2004, All Rights Reserved
// ****************************************************************************************************
# endif