cleaning
This commit is contained in:
parent
afda64c645
commit
85840d026e
|
@ -97,7 +97,7 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
long ymax = 0;
|
||||
string mostype; // get Mos Type (N/P).
|
||||
|
||||
if(transistor->IsNmos())
|
||||
if(transistor->isNmos())
|
||||
mostype='N';
|
||||
else
|
||||
mostype='P';
|
||||
|
@ -277,7 +277,7 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
|
||||
// Calculate Rectangle 50 just for PMOS.
|
||||
// -------------------------------------------------------------
|
||||
if (transistor->IsPmos()) { // Calculate Rectangle 50 for PMos.
|
||||
if (transistor->isPmos()) { // Calculate Rectangle 50 for PMos.
|
||||
x50 = x10 - GET_RULE("RE_NWELL_ACTI");
|
||||
y50 = y10 - GET_RULE("RE_NWELL_ACTI");
|
||||
dx50 = dx10 + 2 * GET_RULE("RE_NWELL_ACTI");
|
||||
|
@ -322,7 +322,7 @@ void GenV1Trans::Generate(Transistor* transistor)
|
|||
|
||||
string mostype; // get Mos Type (N/P).
|
||||
|
||||
if(transistor->IsNmos())
|
||||
if(transistor->isNmos())
|
||||
mostype='N';
|
||||
else
|
||||
mostype='P';
|
||||
|
@ -454,7 +454,7 @@ IF_DEBUG_HUR_ANALOG
|
|||
END_IF
|
||||
Net * anonym = Net::create(transistor, Name("anonym"));
|
||||
for(size_t i=0; i<sizeof(segsforanonym)/sizeof(string);i++) {
|
||||
if(transistor->IsNmos() && segsforanonym[i]=="50")
|
||||
if(transistor->isNmos() && segsforanonym[i]=="50")
|
||||
continue;
|
||||
|
||||
Contact::create(anonym, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforanonym[i])
|
||||
|
|
|
@ -105,33 +105,30 @@ void MetaTransistor::createLayout()
|
|||
string err_msg = "Can't genrate layout : " + getString(mastercell) + " isn't a Transistor";
|
||||
}
|
||||
|
||||
if(trans->IsInternal()) {
|
||||
if(trans->isInternal()) {
|
||||
if(!internal_ref) {
|
||||
trans->createLayout();
|
||||
internal_ref = trans;
|
||||
}
|
||||
else {
|
||||
trans->DuplicateLayout(internal_ref);
|
||||
} else {
|
||||
trans->duplicateLayout(internal_ref);
|
||||
}
|
||||
}
|
||||
else if(trans->IsLeft()) {
|
||||
} else if(trans->isLeft()) {
|
||||
if(!left_ref) {
|
||||
trans->createLayout();
|
||||
left_ref=trans;
|
||||
} else {
|
||||
trans->duplicateLayout(left_ref);
|
||||
}
|
||||
else
|
||||
trans->DuplicateLayout(left_ref);
|
||||
}
|
||||
else if(trans->IsRight()) {
|
||||
} else if(trans->isRight()) {
|
||||
if(!right_ref) {
|
||||
trans->createLayout();
|
||||
right_ref=trans;
|
||||
} else {
|
||||
trans->duplicateLayout(right_ref);
|
||||
}
|
||||
else
|
||||
trans->DuplicateLayout(right_ref);
|
||||
}
|
||||
else
|
||||
} else {
|
||||
trans->createLayout();
|
||||
}
|
||||
end_for
|
||||
|
||||
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
#include "Cell.h"
|
||||
#include "AnalogicalCommons.h"
|
||||
|
||||
|
||||
//BEGIN_NAMESPACE_HURRICANE
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
class Library;
|
||||
|
@ -105,10 +102,10 @@ class MetaTransistor: public Cell {
|
|||
|
||||
// Updators
|
||||
// ********
|
||||
public : void SetLe (const Micro le) { _le=le; };
|
||||
public : void SetWe (const Micro we) { _we=we; };
|
||||
public : void SetType(const char type) { _type=type; };
|
||||
public : void SetM (const unsigned m) { _m=m; };
|
||||
public : void setLe (const Micro le) { _le=le; };
|
||||
public : void setWe (const Micro we) { _we=we; };
|
||||
public : void setType(const char type) { _type=type; };
|
||||
public : void setM (const unsigned m) { _m=m; };
|
||||
|
||||
|
||||
//#endif
|
||||
|
@ -126,8 +123,4 @@ class MetaTransistor: public Cell {
|
|||
|
||||
}
|
||||
|
||||
//END_NAMESPACE_HURRICANE
|
||||
|
||||
#endif // HURRICANE_METATRANSISTOR
|
||||
|
||||
|
||||
|
|
|
@ -327,7 +327,7 @@ Transistor::MaskInfo* Transistor::_createMaskInfo(const MaskVersion& version)
|
|||
}
|
||||
|
||||
|
||||
void Transistor::SetMaskInfo(MaskInfo* masqueinfo)
|
||||
void Transistor::setMaskInfo(MaskInfo* masqueinfo)
|
||||
// ***************************************************
|
||||
{
|
||||
if(!masqueinfo)
|
||||
|
@ -386,7 +386,7 @@ void Transistor::createLayout()
|
|||
}
|
||||
|
||||
|
||||
void Transistor::DuplicateLayout(Transistor* transistor)
|
||||
void Transistor::duplicateLayout(Transistor* transistor)
|
||||
// *****************************************************
|
||||
{
|
||||
OpenUpdateSession();
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#include "AnalogicalCommons.h"
|
||||
|
||||
|
||||
//BEGIN_NAMESPACE_HURRICANE
|
||||
|
||||
namespace Hurricane {
|
||||
|
||||
class Library;
|
||||
|
@ -66,7 +64,7 @@ class Transistor : public Cell {
|
|||
public : Type& operator=(const Type& type);
|
||||
public : operator const Code&() const { return _code; };
|
||||
|
||||
public : void SetCode(const Code& code) { _code = code; };
|
||||
public : void setCode(const Code& code) { _code = code; };
|
||||
|
||||
public : const Code& getCode() const { return _code; };
|
||||
|
||||
|
@ -113,12 +111,12 @@ class Transistor : public Cell {
|
|||
|
||||
// Update
|
||||
// ******
|
||||
public : void SetL(const double& l) { _l=l;};
|
||||
public : void SetW(const double& w) { _w=w;};
|
||||
public : void SetNbDrainColumn(const unsigned& column) { _nbDrainColumn=column; };
|
||||
public : void SetNbSourceColumn(const unsigned& column) { _nbSourceColumn=column; };
|
||||
public : void SetType(const Type::Code& code) { _type.SetCode(code); };
|
||||
public : void SetType(const Type& type) { _type = type; };
|
||||
public : void setL(const double& l) { _l=l;};
|
||||
public : void setW(const double& w) { _w=w;};
|
||||
public : void setNbDrainColumn(const unsigned& column) { _nbDrainColumn=column; };
|
||||
public : void setNbSourceColumn(const unsigned& column) { _nbSourceColumn=column; };
|
||||
public : void setType(const Type::Code& code) { _type.setCode(code); };
|
||||
public : void setType(const Type& type) { _type = type; };
|
||||
|
||||
// Predicats
|
||||
// *********
|
||||
|
@ -221,17 +219,17 @@ class Transistor : public Cell {
|
|||
|
||||
// Predicats
|
||||
// *********
|
||||
public : bool IsNmos() const { return _type==TRANSN; };
|
||||
public : bool IsPmos() const { return _type==TRANSP; };
|
||||
public : bool IsInternal() const { return getAbutmentType().getCode()==Type::INTERNAL; };
|
||||
public : bool IsLeft() const { return getAbutmentType().getCode()==Type::LEFT; };
|
||||
public : bool IsRight() const { return getAbutmentType().getCode()==Type::RIGHT; };
|
||||
public : bool IsSingle() const { return getAbutmentType().getCode()==Type::SINGLE; };
|
||||
public : bool isNmos() const { return _type==TRANSN; };
|
||||
public : bool isPmos() const { return _type==TRANSP; };
|
||||
public : bool isInternal() const { return getAbutmentType().getCode()==Type::INTERNAL; };
|
||||
public : bool isLeft() const { return getAbutmentType().getCode()==Type::LEFT; };
|
||||
public : bool isRight() const { return getAbutmentType().getCode()==Type::RIGHT; };
|
||||
public : bool isSingle() const { return getAbutmentType().getCode()==Type::SINGLE; };
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
public : void SetL(const double& l) { _masqueInfo->SetL(l); };
|
||||
public : void SetW(const double& w) { _masqueInfo->SetW(w); };
|
||||
public : void setL(const double& l) { _masqueInfo->setL(l); };
|
||||
public : void setW(const double& w) { _masqueInfo->setW(w); };
|
||||
|
||||
//# endif
|
||||
|
||||
|
@ -250,9 +248,9 @@ class Transistor : public Cell {
|
|||
|
||||
// Operators
|
||||
// *********
|
||||
public : void SetMaskInfo(MaskInfo*);
|
||||
public : void setMaskInfo(MaskInfo*);
|
||||
public : void createLayout();
|
||||
public : void DuplicateLayout(Transistor* transistor) ;
|
||||
public : void duplicateLayout(Transistor* transistor) ;
|
||||
|
||||
|
||||
};
|
||||
|
|
|
@ -57,8 +57,8 @@ class Device : public Cell {
|
|||
// Operations
|
||||
// **********
|
||||
// public : virtual void Create(const char, const bool) = 0;
|
||||
public : virtual void Dses() = 0;
|
||||
public : virtual void Shape() = 0;
|
||||
public : virtual void dses() = 0;
|
||||
public : virtual void shape() = 0;
|
||||
// public : virtual void Generate() = 0;
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
using namespace Hurricane;
|
||||
|
||||
|
||||
namespace DEVICE{
|
||||
namespace DEVICE {
|
||||
|
||||
// ****************************************************************************************************
|
||||
// TrMos implementation
|
||||
|
@ -132,7 +132,7 @@ void TrMos::create(const char type, const bool isbsconnected)
|
|||
}
|
||||
|
||||
|
||||
void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasring
|
||||
void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasring
|
||||
, const unsigned nbsourcecolumn, const unsigned nbdraincolumn)
|
||||
// *********************************************************************************
|
||||
{
|
||||
|
@ -190,7 +190,7 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
// Set m of MetaTransistor.
|
||||
// The name of motif is nameofDevice_nameofMetaTrans_finger_index
|
||||
// ****************************************************************
|
||||
_tr1->SetM(_m);
|
||||
_tr1->setM(_m);
|
||||
|
||||
for(unsigned i=0; i<m; i++){
|
||||
Transistor* finger = Transistor::create(library,
|
||||
|
@ -228,8 +228,8 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
// Pseudo dimensionnement of metatransistor.
|
||||
// In the futur, this will be the work of auto-dimensionnement tool (DSES).
|
||||
// ************************************************************************
|
||||
// _tr1->SetLe(10);
|
||||
// _tr1->SetWe(11);
|
||||
// _tr1->setLe(10);
|
||||
// _tr1->setWe(11);
|
||||
|
||||
/* (3) */
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
|
@ -243,29 +243,29 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
unsigned count = 0;
|
||||
|
||||
Transistor::MaskV1Info * masqueinfo = new Transistor::MaskV1Info(l_finger, w_finger);
|
||||
masqueinfo->SetNbSourceColumn(nbsourcecolumn);
|
||||
masqueinfo->SetNbDrainColumn(nbdraincolumn);
|
||||
masqueinfo->setNbSourceColumn(nbsourcecolumn);
|
||||
masqueinfo->setNbDrainColumn(nbdraincolumn);
|
||||
|
||||
list<Transistor*>::iterator i = _transistorList.begin()
|
||||
, j = _transistorList.end();
|
||||
|
||||
if(_m == 1){
|
||||
masqueinfo->SetType(Transistor::Type::SINGLE);
|
||||
(*(_transistorList.begin()))->SetMaskInfo(masqueinfo);
|
||||
masqueinfo->setType(Transistor::Type::SINGLE);
|
||||
(*(_transistorList.begin()))->setMaskInfo(masqueinfo);
|
||||
}
|
||||
else if(_m%2==0) { // if m is pair, create two left fingers if is source first.
|
||||
// and create two right fingers if is drain first.
|
||||
while(i!=j) {
|
||||
if(++count>2)
|
||||
masqueinfo->SetType(Transistor::Type::INTERNAL);
|
||||
masqueinfo->setType(Transistor::Type::INTERNAL);
|
||||
else {
|
||||
if ( _sourceIsFirst )
|
||||
masqueinfo->SetType(Transistor::Type::LEFT);
|
||||
masqueinfo->setType(Transistor::Type::LEFT);
|
||||
else
|
||||
masqueinfo->SetType(Transistor::Type::RIGHT);
|
||||
masqueinfo->setType(Transistor::Type::RIGHT);
|
||||
}
|
||||
|
||||
(*i)->SetMaskInfo(masqueinfo);
|
||||
(*i)->setMaskInfo(masqueinfo);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -273,13 +273,13 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
while(i!=j){
|
||||
++ count ;
|
||||
if (count == 1)
|
||||
masqueinfo-> SetType(Transistor::Type::LEFT);
|
||||
masqueinfo-> setType(Transistor::Type::LEFT);
|
||||
else if (count == 2)
|
||||
masqueinfo-> SetType(Transistor::Type::RIGHT);
|
||||
masqueinfo-> setType(Transistor::Type::RIGHT);
|
||||
else
|
||||
masqueinfo-> SetType(Transistor::Type::INTERNAL);
|
||||
masqueinfo-> setType(Transistor::Type::INTERNAL);
|
||||
|
||||
(*i)->SetMaskInfo(masqueinfo);
|
||||
(*i)->setMaskInfo(masqueinfo);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
cout << " Place And Route " <<endl;
|
||||
|
||||
for_each_instance(instance, getInstances())
|
||||
//instance->SetTransformation(instance->getTransformation());
|
||||
//instance->setTransformation(instance->getTransformation());
|
||||
instance->unmaterialize();
|
||||
instance->materialize();
|
||||
|
||||
|
@ -360,7 +360,7 @@ END_IF
|
|||
}
|
||||
|
||||
|
||||
void TrMos::SetLowPinOrder(const PinName pin1, const PinName pin2)
|
||||
void TrMos::setLowPinOrder(const PinName pin1, const PinName pin2)
|
||||
// ***************************************************************
|
||||
{
|
||||
_lowPinOrder[0]=pin1;
|
||||
|
@ -378,7 +378,7 @@ void TrMos::SetLowPinOrder(const PinName pin1, const PinName pin2)
|
|||
}
|
||||
|
||||
|
||||
void TrMos::SetHighPinOrder(const PinName pin1, const PinName pin2)
|
||||
void TrMos::setHighPinOrder(const PinName pin1, const PinName pin2)
|
||||
// *****************************************************************
|
||||
{
|
||||
_highPinOrder[0]=pin1;
|
||||
|
|
|
@ -95,13 +95,13 @@ class TrMos : public Device {
|
|||
|
||||
// Operations
|
||||
// **********
|
||||
public : virtual void Dses() { /* to do */};
|
||||
public : virtual void Shape() { /* to do */};
|
||||
public : virtual void dses() { /* to do */};
|
||||
public : virtual void shape() { /* to do */};
|
||||
#endif
|
||||
|
||||
|
||||
public : void create(const char type, 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);
|
||||
|
||||
// Accessors
|
||||
|
@ -115,18 +115,18 @@ class TrMos : public Device {
|
|||
|
||||
// Updators
|
||||
// ********
|
||||
public : void SetMosLength(const double length) { if(_tr1) _tr1->SetLe(length); }
|
||||
public : void SetMosWidth(const double width) { if(_tr1) _tr1->SetWe(width); }
|
||||
public : void SetWidthOfSourceWire(const double width) { _widthOfSourceWire = width; };
|
||||
public : void SetWidthOfDrainWire(const double width) { _widthOfDrainWire=width; };
|
||||
public : void SetLowPinOrder(const PinName, const PinName) ;
|
||||
public : void SetHighPinOrder(const PinName, const PinName) ;
|
||||
public : void setMosLength(const double length) { if(_tr1) _tr1->setLe(length); }
|
||||
public : void setMosWidth(const double width) { if(_tr1) _tr1->setWe(width); }
|
||||
public : void setWidthOfSourceWire(const double width) { _widthOfSourceWire = width; };
|
||||
public : void setWidthOfDrainWire(const double width) { _widthOfDrainWire=width; };
|
||||
public : void setLowPinOrder(const PinName, const PinName) ;
|
||||
public : void setHighPinOrder(const PinName, const PinName) ;
|
||||
|
||||
// Predicats
|
||||
// *********
|
||||
public : bool IsBsConnected() const { return _isBsConnected; };
|
||||
public : bool SourceIsFirst() const { return _sourceIsFirst; };
|
||||
public : bool HasRing() const { return _hasRing; };
|
||||
public : bool isBsConnected() const { return _isBsConnected; };
|
||||
public : bool sourceIsFirst() const { return _sourceIsFirst; };
|
||||
public : bool hasRing() const { return _hasRing; };
|
||||
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
|
|
|
@ -115,19 +115,19 @@ void TrMos::_PlaceAndRoute()
|
|||
Transistor * trans = dynamic_cast<Transistor*>(instance->getMasterCell());
|
||||
|
||||
if ( _sourceIsFirst ) {
|
||||
if(trans->IsLeft() && !leftins)
|
||||
if(trans->isLeft() && !leftins)
|
||||
leftins = instance;
|
||||
else if ( trans->IsLeft() && leftins)
|
||||
else if ( trans->isLeft() && leftins)
|
||||
rightins = instance;
|
||||
else if ( trans->IsRight())
|
||||
else if ( trans->isRight())
|
||||
rightins = instance;
|
||||
}
|
||||
else {
|
||||
if(trans->IsRight() && !leftins)
|
||||
if(trans->isRight() && !leftins)
|
||||
leftins = instance;
|
||||
else if (trans->IsRight() && leftins )
|
||||
else if (trans->isRight() && leftins )
|
||||
rightins = instance;
|
||||
else if (trans->IsLeft())
|
||||
else if (trans->isLeft())
|
||||
rightins = instance;
|
||||
}
|
||||
end_for
|
||||
|
@ -172,7 +172,7 @@ void TrMos::_PlaceAndRoute()
|
|||
// **********************
|
||||
Transistor * trans = dynamic_cast<Transistor*>(rightins->getMasterCell());
|
||||
|
||||
if( trans->IsRight())
|
||||
if( trans->isRight())
|
||||
_PlaceRight( rightins, Transformation::Orientation::ID);
|
||||
else
|
||||
_PlaceRight( rightins, Transformation::Orientation::MX);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <iostream>
|
||||
|
||||
#include "DataBase.h"
|
||||
#include "Technology.h"
|
||||
#include "Library.h"
|
||||
#include "Warning.h"
|
||||
using namespace Hurricane;
|
||||
|
@ -12,7 +13,7 @@ int main() {
|
|||
try {
|
||||
cout << "simple analogic test" << endl;
|
||||
DataBase* db = DataBase::create();
|
||||
//Technology* technology = Technology::create(db);
|
||||
Technology* technology = Technology::create(db, Name("MyTechnology"));
|
||||
Library* rootLibrary = Library::create(db, Name("RootLibrary"));
|
||||
Library* workLibrary = Library::create(rootLibrary, Name("WorkLibrary"));
|
||||
TrMos* trmos = TrMos::create(workLibrary, Name("MosTr"));
|
||||
|
|
Loading…
Reference in New Issue