some heavy cleaning
This commit is contained in:
parent
85840d026e
commit
e5892a9fb9
|
@ -13,12 +13,6 @@
|
||||||
// Macros Declaration.
|
// Macros Declaration.
|
||||||
// *********************************************************************
|
// *********************************************************************
|
||||||
|
|
||||||
#define TRANSN 'N'
|
|
||||||
#define TRANSP 'P'
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXNBCONTACT 8
|
|
||||||
|
|
||||||
#define IF_DEBUG_HUR_ANALOG \
|
#define IF_DEBUG_HUR_ANALOG \
|
||||||
if(getenv("DEBUG_HUR_ANALOG")) {
|
if(getenv("DEBUG_HUR_ANALOG")) {
|
||||||
|
|
||||||
|
|
|
@ -188,28 +188,18 @@ class GenTrans {
|
||||||
|
|
||||||
|
|
||||||
class GenV1Trans : public GenTrans {
|
class GenV1Trans : public GenTrans {
|
||||||
// *********************************
|
public:
|
||||||
|
typedef GenTrans Inherit;
|
||||||
|
|
||||||
// Types
|
const Transistor::MaskV1Info* _masqueV1Info;
|
||||||
// *****
|
static const int maxNbContacts = 8;
|
||||||
public : typedef GenTrans Inherit;
|
|
||||||
|
|
||||||
// Attributs
|
GenV1Trans(Transistor::MaskV1Info*);
|
||||||
// *********
|
|
||||||
public : const Transistor::MaskV1Info* _masqueV1Info;
|
|
||||||
|
|
||||||
// Constructors
|
virtual ~GenV1Trans() {};
|
||||||
// ************
|
|
||||||
public : GenV1Trans(Transistor::MaskV1Info*);
|
|
||||||
|
|
||||||
// Destructors
|
virtual void Calculate(Transistor*) ;
|
||||||
// ************
|
virtual void Generate(Transistor*) ;
|
||||||
public : virtual ~GenV1Trans() {};
|
|
||||||
|
|
||||||
// Operators
|
|
||||||
// *********
|
|
||||||
public : virtual void Calculate(Transistor*) ;
|
|
||||||
public : virtual void Generate(Transistor*) ;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,16 @@
|
||||||
// Date : 04/04/2007
|
// Date : 04/04/2007
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
|
|
||||||
#include "Collection.h"
|
|
||||||
#include "RdsUnit.h"
|
|
||||||
#include "GenTrans.h"
|
|
||||||
#include "DtrAccess.h"
|
|
||||||
|
|
||||||
#include "Technology.h"
|
#include "Technology.h"
|
||||||
#include "UpdateSession.h"
|
#include "UpdateSession.h"
|
||||||
|
|
||||||
#include "DataBase.h"
|
#include "DataBase.h"
|
||||||
|
|
||||||
|
#include "RdsUnit.h"
|
||||||
|
#include "DtrAccess.h"
|
||||||
|
#include "AnalogicalCommons.h"
|
||||||
|
#include "GenTrans.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,8 +55,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
||||||
+ " of this transistor is invalid."
|
+ " of this transistor is invalid."
|
||||||
);
|
);
|
||||||
|
|
||||||
if(_masqueV1Info->getNbSourceColumn() < 1 || _masqueV1Info->getNbSourceColumn() > MAXNBCONTACT ||
|
if(_masqueV1Info->getNbSourceColumn() < 1 || _masqueV1Info->getNbSourceColumn() > GenV1Trans::maxNbContacts ||
|
||||||
_masqueV1Info->getNbDrainColumn() < 1 || _masqueV1Info->getNbDrainColumn() > MAXNBCONTACT )
|
_masqueV1Info->getNbDrainColumn() < 1 || _masqueV1Info->getNbDrainColumn() > GenV1Trans::maxNbContacts )
|
||||||
|
|
||||||
throw Error("Can't launch function GenV1Trans::Calculate for " + getString(transistor)
|
throw Error("Can't launch function GenV1Trans::Calculate for " + getString(transistor)
|
||||||
+ " the nbsourcecolumn " + getString(_masqueV1Info->getNbSourceColumn())
|
+ " the nbsourcecolumn " + getString(_masqueV1Info->getNbSourceColumn())
|
||||||
|
|
|
@ -4,14 +4,13 @@
|
||||||
// Date : 21/12/2006
|
// Date : 21/12/2006
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
#include "MetaTransistor.h"
|
|
||||||
#include "Transistor.h"
|
|
||||||
#include "Instances.h"
|
|
||||||
#include "UpdateSession.h"
|
#include "UpdateSession.h"
|
||||||
#include "Vertical.h"
|
using namespace Hurricane;
|
||||||
|
|
||||||
namespace Hurricane {
|
#include "Transistor.h"
|
||||||
|
#include "MetaTransistor.h"
|
||||||
|
|
||||||
|
namespace Chamsin {
|
||||||
|
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
// MetaTransistor implementation
|
// MetaTransistor implementation
|
||||||
|
@ -86,9 +85,9 @@ void MetaTransistor::createLayout()
|
||||||
|
|
||||||
setTerminal(false);
|
setTerminal(false);
|
||||||
|
|
||||||
Transistor * internal_ref = NULL;
|
Transistor* internal_ref = NULL;
|
||||||
Transistor * left_ref = NULL;
|
Transistor* left_ref = NULL;
|
||||||
Transistor * right_ref = NULL;
|
Transistor* right_ref = NULL;
|
||||||
|
|
||||||
for_each_instance(instance, this->getInstances())
|
for_each_instance(instance, this->getInstances())
|
||||||
Cell * mastercell = instance->getMasterCell();
|
Cell * mastercell = instance->getMasterCell();
|
||||||
|
|
|
@ -8,15 +8,11 @@
|
||||||
#define HURRICANE_METATRANSISTOR
|
#define HURRICANE_METATRANSISTOR
|
||||||
|
|
||||||
#include "Cell.h"
|
#include "Cell.h"
|
||||||
|
using namespace Hurricane;
|
||||||
#include "AnalogicalCommons.h"
|
#include "AnalogicalCommons.h"
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
class Library;
|
|
||||||
class Name;
|
|
||||||
class Symbol;
|
|
||||||
class Record;
|
|
||||||
|
|
||||||
class MetaTransistor: public Cell {
|
class MetaTransistor: public Cell {
|
||||||
// ********************************
|
// ********************************
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
|
|
||||||
#include "Collection.h"
|
#include "Collection.h"
|
||||||
|
|
||||||
BEGIN_NAMESPACE_HURRICANE
|
|
||||||
|
|
||||||
class MetaTransistor;
|
class MetaTransistor;
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,7 +51,5 @@ typedef GenericFilter<MetaTransistor*> MetaTransistorFilter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
END_NAMESPACE_HURRICANE
|
|
||||||
|
|
||||||
#endif // HURRICANE_METATRANSISTORS
|
#endif // HURRICANE_METATRANSISTORS
|
||||||
|
|
||||||
|
|
|
@ -4,16 +4,53 @@
|
||||||
// Date : 21/12/2006
|
// Date : 21/12/2006
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
|
|
||||||
#include "AnalogicalCommons.h"
|
|
||||||
#include "Transistor.h"
|
|
||||||
#include "GenTrans.h"
|
|
||||||
|
|
||||||
#include "Vertical.h"
|
#include "Vertical.h"
|
||||||
#include "Horizontal.h"
|
#include "Horizontal.h"
|
||||||
|
|
||||||
#include "UpdateSession.h"
|
#include "UpdateSession.h"
|
||||||
|
using namespace Hurricane;
|
||||||
|
|
||||||
|
#include "AnalogicalCommons.h"
|
||||||
|
#include "GenTrans.h"
|
||||||
|
|
||||||
|
#include "Transistor.h"
|
||||||
|
|
||||||
|
namespace Chamsin {
|
||||||
|
|
||||||
|
// ****************************************************************************************************
|
||||||
|
// Transistor::Polarity implementation
|
||||||
|
// ****************************************************************************************************
|
||||||
|
|
||||||
|
Transistor::Polarity::Polarity(const Code& code) :_code(code)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Transistor::Polarity::Polarity(const Polarity& type) :_code(type._code)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Transistor::Polarity& Transistor::Polarity::operator=(const Polarity& type) {
|
||||||
|
_code = type._code;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
string Transistor::Polarity::_getString() const {
|
||||||
|
switch(_code) {
|
||||||
|
case N : return "N";
|
||||||
|
case P : return "P";
|
||||||
|
}
|
||||||
|
return "ABNORMAL";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Record* Transistor::Polarity::_getRecord() const
|
||||||
|
// *****************************************
|
||||||
|
{
|
||||||
|
Record* record = new Record(getString(this));
|
||||||
|
record->Add(getSlot("Code", _code));
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Hurricane {
|
|
||||||
|
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
// Transistor::MaskVersion implementation
|
// Transistor::MaskVersion implementation
|
||||||
|
@ -39,13 +76,6 @@ Transistor::MaskVersion& Transistor::MaskVersion::operator=(const MaskVersion& v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Transistor::MaskVersion::operator==(const MaskVersion& version) const
|
|
||||||
// ***************************************************************************
|
|
||||||
{
|
|
||||||
return _code==version._code;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
string Transistor::MaskVersion::_getString() const
|
string Transistor::MaskVersion::_getString() const
|
||||||
// *************************************************
|
// *************************************************
|
||||||
{
|
{
|
||||||
|
@ -228,20 +258,16 @@ Record* Transistor::MaskV1Info::_getRecord() const
|
||||||
// Transistor implementation
|
// Transistor implementation
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
|
|
||||||
Transistor::Transistor(Library* library, const Name& name, char type)
|
Transistor::Transistor(Library* library, const Name& name, const Polarity& polarity) :
|
||||||
// *******************************************************************
|
Inherit(library, name),
|
||||||
: Inherit(library, name),
|
_polarity(polarity),
|
||||||
_type(type),
|
_masqueInfo(NULL),
|
||||||
_masqueInfo(NULL),
|
_genTrans(NULL)
|
||||||
_genTrans(NULL)
|
{}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Transistor* Transistor::create(Library* library, const Name& name, char type)
|
Transistor* Transistor::create(Library* library, const Name& name, const Polarity& polarity) {
|
||||||
// **************************************************************************
|
Transistor* transistor = new Transistor(library, name, polarity);
|
||||||
{
|
|
||||||
Transistor* transistor = new Transistor(library, name, type);
|
|
||||||
|
|
||||||
transistor->_postCreate();
|
transistor->_postCreate();
|
||||||
|
|
||||||
|
@ -250,9 +276,7 @@ Transistor* Transistor::create(Library* library, const Name& name, char type)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Transistor::_preDestroy()
|
void Transistor::_preDestroy() {
|
||||||
// ******************************
|
|
||||||
{
|
|
||||||
// Delete aggregated objets.
|
// Delete aggregated objets.
|
||||||
// *************************
|
// *************************
|
||||||
if(_masqueInfo)
|
if(_masqueInfo)
|
||||||
|
@ -281,19 +305,15 @@ void Transistor::_postCreate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string Transistor::_getString() const
|
string Transistor::_getString() const {
|
||||||
// ***********************************
|
|
||||||
{
|
|
||||||
string s = Inherit::_getString();
|
string s = Inherit::_getString();
|
||||||
s.insert(s.length()-1, " " + getString(_type));
|
s.insert(s.length()-1, " " + getString(_polarity));
|
||||||
s.insert(s.length()-1, " " + getAbutmentType()._getString());
|
s.insert(s.length()-1, " " + getAbutmentType()._getString());
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Record* Transistor::_getRecord() const
|
Record* Transistor::_getRecord() const {
|
||||||
// ************************************
|
|
||||||
{
|
|
||||||
Record* record = Inherit::_getRecord();
|
Record* record = Inherit::_getRecord();
|
||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
|
@ -440,15 +460,3 @@ void Transistor::duplicateLayout(Transistor* transistor)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ****************************************************************************************************
|
|
||||||
// Generic functions
|
|
||||||
// ****************************************************************************************************
|
|
||||||
|
|
||||||
string getString(const Hurricane::Transistor::MaskInfo& masqueinfo)
|
|
||||||
// **********************************************************
|
|
||||||
{
|
|
||||||
return masqueinfo._getString();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,30 +8,45 @@
|
||||||
#define HURRICANE_TRANSISTOR
|
#define HURRICANE_TRANSISTOR
|
||||||
|
|
||||||
#include "Cell.h"
|
#include "Cell.h"
|
||||||
#include "AnalogicalCommons.h"
|
using namespace Hurricane;
|
||||||
|
|
||||||
|
#include "Transistors.h"
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
class Library;
|
|
||||||
class Name;
|
|
||||||
class Symbol;
|
|
||||||
class Record;
|
|
||||||
class GenTrans;
|
class GenTrans;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Transistor : public Cell {
|
class Transistor : public Cell {
|
||||||
// ********************************
|
|
||||||
|
|
||||||
//# if !defined(__DOXYGEN_PROCESSOR__)
|
//# if !defined(__DOXYGEN_PROCESSOR__)
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
// *****
|
// *****
|
||||||
|
|
||||||
public : typedef Cell Inherit;
|
public: typedef Cell Inherit;
|
||||||
|
|
||||||
|
public: class Polarity {
|
||||||
|
public: enum Code {N=0, P=1};
|
||||||
|
|
||||||
|
private: Code _code;
|
||||||
|
|
||||||
|
public : Polarity(const Code& code=N);
|
||||||
|
public : Polarity(const Polarity&);
|
||||||
|
public : Polarity& operator=(const Polarity&);
|
||||||
|
|
||||||
|
public : operator const Code& () const { return _code; };
|
||||||
|
public : const Code& getCode() const { return _code; };
|
||||||
|
|
||||||
|
public : string _getTypeName() const { return _TName("Transistor::Polarity"); };
|
||||||
|
public : string _getString() const;
|
||||||
|
public : Record* _getRecord() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public : class MaskVersion {
|
public : class MaskVersion {
|
||||||
// ******************
|
|
||||||
public : enum Code { VERSION1=0 };
|
public : enum Code { VERSION1=0 };
|
||||||
|
|
||||||
private: Code _code;
|
private: Code _code;
|
||||||
|
@ -40,8 +55,6 @@ class Transistor : public Cell {
|
||||||
public : MaskVersion(const MaskVersion&);
|
public : MaskVersion(const MaskVersion&);
|
||||||
public : MaskVersion& operator=(const MaskVersion&);
|
public : MaskVersion& operator=(const MaskVersion&);
|
||||||
|
|
||||||
public : bool operator==(const MaskVersion&) const;
|
|
||||||
|
|
||||||
public : operator const Code& () const { return _code; };
|
public : operator const Code& () const { return _code; };
|
||||||
public : const Code& getCode() const { return _code; };
|
public : const Code& getCode() const { return _code; };
|
||||||
|
|
||||||
|
@ -173,7 +186,7 @@ class Transistor : public Cell {
|
||||||
|
|
||||||
// Attributes
|
// Attributes
|
||||||
// *******************
|
// *******************
|
||||||
private : char _type;
|
private : Polarity _polarity;
|
||||||
private : MaskInfo* _masqueInfo;
|
private : MaskInfo* _masqueInfo;
|
||||||
private : GenTrans * _genTrans;
|
private : GenTrans * _genTrans;
|
||||||
//public : RealInfo * _realInfo;
|
//public : RealInfo * _realInfo;
|
||||||
|
@ -185,10 +198,10 @@ class Transistor : public Cell {
|
||||||
// Constructors
|
// Constructors
|
||||||
// ************
|
// ************
|
||||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||||
protected : Transistor(Library* library, const Name& name, char type);
|
protected : Transistor(Library* library, const Name& name, const Polarity& polarity);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
public : static Transistor* create(Library* library, const Name& name, char type);
|
public : static Transistor* create(Library* library, const Name& name, const Polarity& polarity);
|
||||||
|
|
||||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||||
protected : virtual void _postCreate();
|
protected : virtual void _postCreate();
|
||||||
|
@ -202,11 +215,11 @@ class Transistor : public Cell {
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
// *********
|
// *********
|
||||||
public : char getType() const { return _type; };
|
public : const Polarity& getPolarity() const { return _polarity; };
|
||||||
public : MaskVersion getMaskVersion() const { return _getMaskInfoVersion(_masqueInfo); };
|
public : MaskVersion getMaskVersion() const { return _getMaskInfoVersion(_masqueInfo); };
|
||||||
public : const MaskInfo* getMaskInfo() const { return _masqueInfo; };
|
public : const MaskInfo* getMaskInfo() const { return _masqueInfo; };
|
||||||
public : const double& getL() const { return _masqueInfo->getL(); };
|
public : const double getL() const { return _masqueInfo->getL(); };
|
||||||
public : const double& getW() const { return _masqueInfo->getW(); };
|
public : const double getW() const { return _masqueInfo->getW(); };
|
||||||
public : const unsigned& getNbDrainColumn() const { return _masqueInfo->getNbDrainColumn(); };
|
public : const unsigned& getNbDrainColumn() const { return _masqueInfo->getNbDrainColumn(); };
|
||||||
public : const unsigned& getNbSourceColumn() const { return _masqueInfo->getNbSourceColumn(); };
|
public : const unsigned& getNbSourceColumn() const { return _masqueInfo->getNbSourceColumn(); };
|
||||||
public : const char* getDrainName() const { return "DRAIN"; };
|
public : const char* getDrainName() const { return "DRAIN"; };
|
||||||
|
@ -219,8 +232,8 @@ class Transistor : public Cell {
|
||||||
|
|
||||||
// Predicats
|
// Predicats
|
||||||
// *********
|
// *********
|
||||||
public : bool isNmos() const { return _type==TRANSN; };
|
public : bool isNmos() const { return _polarity==Polarity::N; };
|
||||||
public : bool isPmos() const { return _type==TRANSP; };
|
public : bool isPmos() const { return _polarity==Polarity::P; };
|
||||||
public : bool isInternal() const { return getAbutmentType().getCode()==Type::INTERNAL; };
|
public : bool isInternal() const { return getAbutmentType().getCode()==Type::INTERNAL; };
|
||||||
public : bool isLeft() const { return getAbutmentType().getCode()==Type::LEFT; };
|
public : bool isLeft() const { return getAbutmentType().getCode()==Type::LEFT; };
|
||||||
public : bool isRight() const { return getAbutmentType().getCode()==Type::RIGHT; };
|
public : bool isRight() const { return getAbutmentType().getCode()==Type::RIGHT; };
|
||||||
|
@ -254,9 +267,40 @@ class Transistor : public Cell {
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
#if !defined(__DOXYGEN_PROCESSOR__)
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
// Class : "Proxy...<const Transistor::Polarity::Code*>".
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline string ProxyTypeName<Transistor::Polarity::Code>
|
||||||
|
( const Transistor::Polarity::Code* object )
|
||||||
|
{ return "<PointerSlotAdapter<Transistor::Polarity::Code>>"; }
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline string ProxyString <Transistor::Polarity::Code>
|
||||||
|
( const Transistor::Polarity::Code* object )
|
||||||
|
{
|
||||||
|
switch ( *object ) {
|
||||||
|
case Transistor::Polarity::N: return "N";
|
||||||
|
case Transistor::Polarity::P: return "P";
|
||||||
|
}
|
||||||
|
return "ABNORMAL";
|
||||||
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline Record* ProxyRecord <Transistor::Polarity::Code>
|
||||||
|
( const Transistor::Polarity::Code* object )
|
||||||
|
{
|
||||||
|
Record* record = new Record(getString(object));
|
||||||
|
record->Add(getSlot("Code", (unsigned int*)object));
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "Proxy...<const Transistor::MaskVersion::Code*>".
|
// Class : "Proxy...<const Transistor::MaskVersion::Code*>".
|
||||||
|
|
||||||
|
@ -269,7 +313,7 @@ template<>
|
||||||
inline string ProxyString <Transistor::MaskVersion::Code>
|
inline string ProxyString <Transistor::MaskVersion::Code>
|
||||||
( const Transistor::MaskVersion::Code* object )
|
( const Transistor::MaskVersion::Code* object )
|
||||||
{
|
{
|
||||||
switch ( *object ) {
|
switch ( *object ) {
|
||||||
case Transistor::MaskVersion::VERSION1: return "VERSION1";
|
case Transistor::MaskVersion::VERSION1: return "VERSION1";
|
||||||
}
|
}
|
||||||
return "ABNORMAL";
|
return "ABNORMAL";
|
||||||
|
@ -278,11 +322,11 @@ template<>
|
||||||
template<>
|
template<>
|
||||||
inline Record* ProxyRecord <Transistor::MaskVersion::Code>
|
inline Record* ProxyRecord <Transistor::MaskVersion::Code>
|
||||||
( const Transistor::MaskVersion::Code* object )
|
( const Transistor::MaskVersion::Code* object )
|
||||||
{
|
{
|
||||||
Record* record = new Record(getString(object));
|
Record* record = new Record(getString(object));
|
||||||
record->Add(getSlot("Code", (unsigned int*)object));
|
record->Add(getSlot("Code", (unsigned int*)object));
|
||||||
return record;
|
return record;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
@ -291,7 +335,7 @@ template<>
|
||||||
template<>
|
template<>
|
||||||
inline string ProxyTypeName<Transistor::Type::Code>
|
inline string ProxyTypeName<Transistor::Type::Code>
|
||||||
( const Transistor::Type::Code* object )
|
( const Transistor::Type::Code* object )
|
||||||
{ return "<PointerSlotAdapter<Transistor::Type::Code>>"; }
|
{ return "<PointerSlotAdapter<Transistor::Type::Code>>"; }
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline string ProxyString <Transistor::Type::Code>
|
inline string ProxyString <Transistor::Type::Code>
|
||||||
|
@ -309,7 +353,7 @@ template<>
|
||||||
template<>
|
template<>
|
||||||
inline Record* ProxyRecord <Transistor::Type::Code>
|
inline Record* ProxyRecord <Transistor::Type::Code>
|
||||||
( const Transistor::Type::Code* object )
|
( const Transistor::Type::Code* object )
|
||||||
{
|
{
|
||||||
Record* record = new Record(getString(object));
|
Record* record = new Record(getString(object));
|
||||||
record->Add(getSlot("Code", (unsigned int*)object));
|
record->Add(getSlot("Code", (unsigned int*)object));
|
||||||
return record;
|
return record;
|
||||||
|
@ -329,4 +373,6 @@ template<>
|
||||||
string getString(const Hurricane::Transistor::MaskInfo&);
|
string getString(const Hurricane::Transistor::MaskInfo&);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // HURRICANE_TRANSISTOR
|
#endif // HURRICANE_TRANSISTOR
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
|
|
||||||
namespace Hurricane {
|
namespace Hurricane {
|
||||||
|
|
||||||
|
|
||||||
class Transistor;
|
class Transistor;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
// ****************************************************************************************************
|
// ****************************************************************************************************
|
||||||
|
|
||||||
|
|
||||||
#include "TrMos.h"
|
|
||||||
|
|
||||||
#include "Instance.h"
|
#include "Instance.h"
|
||||||
#include "MetaTransistor.h"
|
#include "MetaTransistor.h"
|
||||||
|
@ -16,6 +15,8 @@
|
||||||
#include "UpdateSession.h"
|
#include "UpdateSession.h"
|
||||||
|
|
||||||
#include "DtrAccess.h"
|
#include "DtrAccess.h"
|
||||||
|
|
||||||
|
#include "TrMos.h"
|
||||||
using namespace Hurricane;
|
using namespace Hurricane;
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +28,7 @@ namespace DEVICE {
|
||||||
|
|
||||||
TrMos::TrMos(Library* library, const Name& name):
|
TrMos::TrMos(Library* library, const Name& name):
|
||||||
Inherit(library, name),
|
Inherit(library, name),
|
||||||
_type('N'),
|
_polarity(Transistor::Polarity::N),
|
||||||
_isBsConnected(false),
|
_isBsConnected(false),
|
||||||
_m(1),
|
_m(1),
|
||||||
_sourceIsFirst(true),
|
_sourceIsFirst(true),
|
||||||
|
@ -75,19 +76,14 @@ Transistors TrMos::getTransistors() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TrMos::create(const char type, const bool isbsconnected)
|
void TrMos::create(const Transistor::Polarity& polarity, const bool isbsconnected)
|
||||||
// **********************************************************
|
|
||||||
{
|
{
|
||||||
if( _tr1 ) {
|
if( _tr1 ) {
|
||||||
throw Error("Can't Create Logical View of TrMos " + getString(getName()) +
|
throw Error("Can't Create Logical View of TrMos " + getString(getName()) +
|
||||||
" : " + "it has already been created");
|
" : " + "it has already been created");
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (type!=TRANSN) && (type!=TRANSP)) {
|
_polarity = polarity;
|
||||||
throw Error("Can't Create TrMos " + getString(getName()) + " : type " + getString(type) + " is invalid");
|
|
||||||
}
|
|
||||||
|
|
||||||
_type = type;
|
|
||||||
_isBsConnected = isbsconnected;
|
_isBsConnected = isbsconnected;
|
||||||
|
|
||||||
// MetaTransistor is in the same library than Trmos
|
// MetaTransistor is in the same library than Trmos
|
||||||
|
@ -114,7 +110,7 @@ void TrMos::create(const char type, const bool isbsconnected)
|
||||||
// The name of MetaTransistor is nameoftrmos_tr1
|
// The name of MetaTransistor is nameoftrmos_tr1
|
||||||
// ****************************************************
|
// ****************************************************
|
||||||
|
|
||||||
_tr1 = MetaTransistor::create(library, Name( getString(getName())+"_Mos1" ), _type);
|
_tr1 = MetaTransistor::create(library, Name( getString(getName())+"_Mos1" ), _polarity);
|
||||||
Instance * instance = Instance::create(this,
|
Instance * instance = Instance::create(this,
|
||||||
Name("Ins_" + getString(_tr1->getName())),
|
Name("Ins_" + getString(_tr1->getName())),
|
||||||
_tr1);
|
_tr1);
|
||||||
|
@ -195,7 +191,7 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
||||||
for(unsigned i=0; i<m; i++){
|
for(unsigned i=0; i<m; i++){
|
||||||
Transistor* finger = Transistor::create(library,
|
Transistor* finger = Transistor::create(library,
|
||||||
getString(_tr1->getName()) + "_Finger_" + getString(i),
|
getString(_tr1->getName()) + "_Finger_" + getString(i),
|
||||||
_type);
|
_polarity);
|
||||||
|
|
||||||
_transistorList.push_back(finger);
|
_transistorList.push_back(finger);
|
||||||
Instance::create(_tr1, Name("Ins_" + getString(finger->getName())), finger);
|
Instance::create(_tr1, Name("Ins_" + getString(finger->getName())), finger);
|
||||||
|
|
|
@ -7,34 +7,16 @@
|
||||||
#ifndef DEVICE_TRMOS
|
#ifndef DEVICE_TRMOS
|
||||||
#define DEVICE_TRMOS
|
#define DEVICE_TRMOS
|
||||||
|
|
||||||
|
#include "Net.h"
|
||||||
|
using namespace Hurricane;
|
||||||
|
|
||||||
#include "Device.h"
|
#include "Device.h"
|
||||||
#include "Transistors.h"
|
#include "Transistor.h"
|
||||||
#include "MetaTransistor.h"
|
#include "MetaTransistor.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Hurricane {
|
|
||||||
|
|
||||||
class Library;
|
|
||||||
class Name;
|
|
||||||
class Record;
|
|
||||||
class Transistor;
|
|
||||||
|
|
||||||
class Net;
|
|
||||||
class Pin;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace DEVICE {
|
namespace DEVICE {
|
||||||
|
|
||||||
using Hurricane::Library;
|
|
||||||
using Hurricane::Name;
|
|
||||||
using Hurricane::Record;
|
|
||||||
using Hurricane::MetaTransistor;
|
|
||||||
using Hurricane::Transistor;
|
|
||||||
using Hurricane::Transistors;
|
|
||||||
using Hurricane::Net;
|
|
||||||
using Hurricane::Pin;
|
|
||||||
|
|
||||||
|
|
||||||
class TrMos : public Device {
|
class TrMos : public Device {
|
||||||
// **************************
|
// **************************
|
||||||
|
@ -51,7 +33,7 @@ class TrMos : public Device {
|
||||||
|
|
||||||
// Structural parameter.
|
// Structural parameter.
|
||||||
// ********************
|
// ********************
|
||||||
private : char _type;
|
private : Transistor::Polarity _polarity;
|
||||||
private : bool _isBsConnected;
|
private : bool _isBsConnected;
|
||||||
private : unsigned _m;
|
private : unsigned _m;
|
||||||
|
|
||||||
|
@ -100,13 +82,13 @@ class TrMos : public Device {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
public : void create(const char type, const bool isbsconnected);
|
public : void create(const Transistor::Polarity& polarity, const bool isbsconnected);
|
||||||
public : void generate(const unsigned m, const bool sourceisfirst, const bool hasring,
|
public : void generate(const unsigned m, const bool sourceisfirst, const bool hasring,
|
||||||
const unsigned nbsourcecolumn, const unsigned nbdraincolumn);
|
const unsigned nbsourcecolumn, const unsigned nbdraincolumn);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
// *********
|
// *********
|
||||||
public : char getType() const { return _type; };
|
public : const Transistor::Polarity& getPolarity() const { return _polarity; };
|
||||||
public : unsigned getM() const { return _m; };
|
public : unsigned getM() const { return _m; };
|
||||||
public : const double getWidthOfSourceWire() const { return _widthOfSourceWire; };
|
public : const double getWidthOfSourceWire() const { return _widthOfSourceWire; };
|
||||||
public : const double getWidthOfDrainWire() const { return _widthOfDrainWire; };
|
public : const double getWidthOfDrainWire() const { return _widthOfDrainWire; };
|
||||||
|
|
|
@ -44,11 +44,11 @@ void TrMos::_PlaceAndRoute()
|
||||||
// **************************************************************
|
// **************************************************************
|
||||||
DtrAccess * dtraccess = DtrAccess::getDtrAccess();
|
DtrAccess * dtraccess = DtrAccess::getDtrAccess();
|
||||||
|
|
||||||
char type;
|
Transistor::Polarity polarity;
|
||||||
if(_type == 'P') type = 'N';
|
if(_polarity == Transistor::Polarity::P) polarity = Transistor::Polarity::N;
|
||||||
else type = 'P';
|
else polarity = Transistor::Polarity::P;
|
||||||
|
|
||||||
long minImpWidth = dtraccess->getSingleRdsRuleByLabel("RW_", getString(type), "IMP");
|
long minImpWidth = dtraccess->getSingleRdsRuleByLabel("RW_", getString(polarity), "IMP");
|
||||||
long minContWidth = dtraccess->getSingleRdsRuleByLabel(string("RW_CONT"));
|
long minContWidth = dtraccess->getSingleRdsRuleByLabel(string("RW_CONT"));
|
||||||
long minAlu1Width = dtraccess->getSingleRdsRuleByLabel(string("RW_ALU1"));
|
long minAlu1Width = dtraccess->getSingleRdsRuleByLabel(string("RW_ALU1"));
|
||||||
long minVia1Width = dtraccess->getSingleRdsRuleByLabel(string("RW_VIA1"));
|
long minVia1Width = dtraccess->getSingleRdsRuleByLabel(string("RW_VIA1"));
|
||||||
|
@ -57,7 +57,7 @@ void TrMos::_PlaceAndRoute()
|
||||||
long rdActive = dtraccess->getSingleRdsRuleByLabel(string("RD_ACTI"));
|
long rdActive = dtraccess->getSingleRdsRuleByLabel(string("RD_ACTI"));
|
||||||
long rdAlu2 = dtraccess->getSingleRdsRuleByLabel(string("RD_ALU1"));
|
long rdAlu2 = dtraccess->getSingleRdsRuleByLabel(string("RD_ALU1"));
|
||||||
|
|
||||||
long reImpActi = dtraccess->getSingleRdsRuleByLabel("RE_", getString(type), "IMP_CONT");
|
long reImpActi = dtraccess->getSingleRdsRuleByLabel("RE_", getString(polarity), "IMP_CONT");
|
||||||
long reActiContact = dtraccess->getSingleRdsRuleByLabel("RE_ACTI_CONT");
|
long reActiContact = dtraccess->getSingleRdsRuleByLabel("RE_ACTI_CONT");
|
||||||
long reAlu1Contact = dtraccess->getSingleRdsRuleByLabel("RE_ALU1_CONT");
|
long reAlu1Contact = dtraccess->getSingleRdsRuleByLabel("RE_ALU1_CONT");
|
||||||
long reAlu1Via1 = dtraccess->getSingleRdsRuleByLabel("RE_ALU1_VIA1");
|
long reAlu1Via1 = dtraccess->getSingleRdsRuleByLabel("RE_ALU1_VIA1");
|
||||||
|
@ -235,7 +235,7 @@ void TrMos::_PlaceAndRoute()
|
||||||
|
|
||||||
Layer * layerImp = NULL;
|
Layer * layerImp = NULL;
|
||||||
|
|
||||||
if(_type == 'P')
|
if(_polarity == Transistor::Polarity::P)
|
||||||
layerImp = db->getTechnology()->getLayer(Name("NIMP"));
|
layerImp = db->getTechnology()->getLayer(Name("NIMP"));
|
||||||
else
|
else
|
||||||
layerImp = db->getTechnology()->getLayer(Name("PIMP"));
|
layerImp = db->getTechnology()->getLayer(Name("PIMP"));
|
||||||
|
@ -670,7 +670,7 @@ void TrMos::_PlaceAndRoute()
|
||||||
|
|
||||||
// Create Caission NWELL if this is a PMOS.
|
// Create Caission NWELL if this is a PMOS.
|
||||||
// ****************************************
|
// ****************************************
|
||||||
if(_type == 'P') {
|
if(_polarity == Transistor::Polarity::P) {
|
||||||
Net * netCaisson = Net::create(this, Name("CAISSON"));
|
Net * netCaisson = Net::create(this, Name("CAISSON"));
|
||||||
Contact::create(netCaisson, layerNwell
|
Contact::create(netCaisson, layerNwell
|
||||||
, getAbutmentBox().getXCenter()
|
, getAbutmentBox().getXCenter()
|
||||||
|
|
Loading…
Reference in New Issue