hurricane cleaning still in progress

This commit is contained in:
The Coriolis Project 2008-03-18 09:44:23 +00:00
parent 7fb2d3222d
commit 6aba9ac985
21 changed files with 674 additions and 787 deletions

View File

@ -23,17 +23,17 @@
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Macro Method : "GET_RULE(s)" // Macro Method : "GET_RULE(s)"
// This Method Macro is For Geting The Value in RdsUnit of a DRM Rule. // This Method Macro is For geting The Value in RdsUnit of a DRM Rule.
// To Use This Macro, you must predefine Pointeur dtraccess. // To Use This Macro, you must predefine Pointeur dtraccess.
#define GET_RULE(s) \ #define GET_RULE(s) \
dtraccess->GetSingleRdsRuleByLabel(string(s)) dtraccess->getSingleRdsRuleByLabel(string(s))
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Macro Method "GET_RULE_BYNP(prefix, type, suffix)" // Macro Method "GET_RULE_BYNP(prefix, type, suffix)"
// This Method Macro is For Geting The Value in RdsUnit of a DRM Rule // This Method Macro is For geting The Value in RdsUnit of a DRM Rule
// selected by string type which is mostype . // selected by string type which is mostype .
/* \prefix must be a chain character. /* \prefix must be a chain character.
@ -44,13 +44,13 @@
// To Use This Macro, you must Predefine Pointeur dtraccess. // To Use This Macro, you must Predefine Pointeur dtraccess.
#define GET_RULE_BYNP(prefix, type, suffix) \ #define GET_RULE_BYNP(prefix, type, suffix) \
dtraccess->GetSingleRdsRuleByLabel(prefix, type, suffix) dtraccess->getSingleRdsRuleByLabel(prefix, type, suffix)
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Macro Method : "Get_LAYER_BYNP(prefix, type, suffix)" // Macro Method : "get_LAYER_BYNP(prefix, type, suffix)"
// This Method Macro is For Geting the Layer of a Layer Rule Selected // This Method Macro is For geting the Layer of a Layer Rule Selected
// by string type which is mostype. To Use This Macro, you must predefine // by string type which is mostype. To Use This Macro, you must predefine
// Pointeur dtraccess. // Pointeur dtraccess.
@ -62,7 +62,7 @@
// To Use This Macro, you must Predefine Pointeur dtraccess. // To Use This Macro, you must Predefine Pointeur dtraccess.
#define GET_LAYER_BYNP(prefix, type, suffix) \ #define GET_LAYER_BYNP(prefix, type, suffix) \
dtraccess->GetSingleLayerByLabel(prefix, type, suffix) dtraccess->getSingleLayerByLabel(prefix, type, suffix)
@ -80,14 +80,14 @@
// This Method Macro must be used in Membre Function Calculate. // This Method Macro must be used in Membre Function Calculate.
#define SAVE_RECTANGLE(s, x, y, dx, dy) \ #define SAVE_RECTANGLE(s, x, y, dx, dy) \
_mapString2Box[string(s)] = Box(GetUnit(x), GetUnit(y), GetUnit(x+dx), GetUnit(y+dy)); \ _mapString2Box[string(s)] = Box(getUnit(x), getUnit(y), getUnit(x+dx), getUnit(y+dy)); \
xmin = MINLONG(xmin, GetUnit(x)); \ xmin = MINLONG(xmin, getUnit(x)); \
ymin = MINLONG(ymin, GetUnit(y)); ymin = MINLONG(ymin, getUnit(y));
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// Macro Method : "GET_BOX(s)" // Macro Method : "GET_BOX(s)"
// This Method Macro is For Get the box According to the its name. // This Method Macro is For get the box According to the its name.
/* /*
* \s name of rectangle, must be a string. * \s name of rectangle, must be a string.
@ -130,7 +130,7 @@
for(unsigned i=0; i<nbcolumn; i++) { \ for(unsigned i=0; i<nbcolumn; i++) { \
\ \
for(unsigned j=0; j<nbcontact; j++) { \ for(unsigned j=0; j<nbcontact; j++) { \
Contact::Create(net, layer \ Contact::create(net, layer \
, tmp_xcenter \ , tmp_xcenter \
, tmp_ycenter \ , tmp_ycenter \
, rw_cont \ , rw_cont \
@ -155,10 +155,10 @@
*/ */
# define BOX_IS_VALID(box) \ # define BOX_IS_VALID(box) \
( (long)(GetValue(box.getXMin()))%2==0 )&& \ ( (long)(getValue(box.getXMin()))%2==0 )&& \
( (long)(GetValue(box.getXMax()))%2==0 )&& \ ( (long)(getValue(box.getXMax()))%2==0 )&& \
( (long)(GetValue(box.getYMin()))%2==0 )&& \ ( (long)(getValue(box.getYMin()))%2==0 )&& \
( (long)(GetValue(box.getYMax()))%2==0 ) ( (long)(getValue(box.getYMax()))%2==0 )
BEGIN_NAMESPACE_HURRICANE BEGIN_NAMESPACE_HURRICANE

View File

@ -32,7 +32,7 @@ string segsforanonym[] = {string("10"), string("11"), string("12"), string("50")
// **************************************************************************************************** // ****************************************************************************************************
// Class GetV1Trans implementation // Class getV1Trans implementation
// **************************************************************************************************** // ****************************************************************************************************
GenV1Trans::GenV1Trans(Transistor::MaskV1Info* masqueinfo) GenV1Trans::GenV1Trans(Transistor::MaskV1Info* masqueinfo)
// ********************************************************* // *********************************************************
@ -48,28 +48,28 @@ void GenV1Trans::Calculate(Transistor* transistor)
// Check out mask param. // Check out mask param.
// ********************* // *********************
if(_masqueV1Info->GetL() < dtraccess->GetSingleRealRuleByLabel("L_TRANS") || if(_masqueV1Info->getL() < dtraccess->getSingleRealRuleByLabel("L_TRANS") ||
_masqueV1Info->GetL() > dtraccess->GetSingleRealRuleByLabel("L_TRANS_MAX") || _masqueV1Info->getL() > dtraccess->getSingleRealRuleByLabel("L_TRANS_MAX") ||
_masqueV1Info->GetW() < dtraccess->GetSingleRealRuleByLabel("W_TRANS") || _masqueV1Info->getW() < dtraccess->getSingleRealRuleByLabel("W_TRANS") ||
_masqueV1Info->GetW() > dtraccess->GetSingleRealRuleByLabel("W_TRANS_MAX") ) _masqueV1Info->getW() > dtraccess->getSingleRealRuleByLabel("W_TRANS_MAX") )
throw Error("Can't launch function GenV1Trans::Calculate for " + GetString(transistor) throw Error("Can't launch function GenV1Trans::Calculate for " + getString(transistor)
+ " the L " + GetString(_masqueV1Info->GetL()) + " the L " + getString(_masqueV1Info->getL())
+ " or the W " + GetString(_masqueV1Info->GetW()) + " or the W " + getString(_masqueV1Info->getW())
+ " of this transistor is invalid." + " of this transistor is invalid."
); );
if(_masqueV1Info->GetNbSourceColumn() < 1 || _masqueV1Info->GetNbSourceColumn() > MAXNBCONTACT || if(_masqueV1Info->getNbSourceColumn() < 1 || _masqueV1Info->getNbSourceColumn() > MAXNBCONTACT ||
_masqueV1Info->GetNbDrainColumn() < 1 || _masqueV1Info->GetNbDrainColumn() > MAXNBCONTACT ) _masqueV1Info->getNbDrainColumn() < 1 || _masqueV1Info->getNbDrainColumn() > MAXNBCONTACT )
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())
+ " or the nbdraincolumn " + GetString(_masqueV1Info->GetNbDrainColumn()) + " or the nbdraincolumn " + getString(_masqueV1Info->getNbDrainColumn())
+ " of this transistor is invalid." + " of this transistor is invalid."
); );
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << GetString(transistor) + " 's masqueinfo is " + GetString(_masqueV1Info) cout << ts << getString(transistor) + " 's masqueinfo is " + getString(_masqueV1Info)
<< endl; << endl;
END_IF END_IF
@ -99,15 +99,15 @@ void GenV1Trans::Calculate(Transistor* transistor)
long extension3 = 0; long extension3 = 0;
long extension4 = 0; long extension4 = 0;
long ymax = 0; long ymax = 0;
string mostype; // Get Mos Type (N/P). string mostype; // get Mos Type (N/P).
if(transistor->IsNmos()) if(transistor->IsNmos())
mostype='N'; mostype='N';
else else
mostype='P'; mostype='P';
//string mostype; // Get Mos Type (N/P). //string mostype; // get Mos Type (N/P).
//mostype=transistor->GetType(); //mostype=transistor->getType();
// ------------------------------------------------------------- // -------------------------------------------------------------
// Begin Calculate. // Begin Calculate.
@ -124,8 +124,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
x00 = 0; x00 = 0;
y00 = -( GET_RULE("RE_GATE_ACTI") ); y00 = -( GET_RULE("RE_GATE_ACTI") );
dx00 = ConvertRealToRdsUnit(_masqueV1Info->GetL()); dx00 = ConvertRealToRdsUnit(_masqueV1Info->getL());
realw = ConvertRealToRdsUnit(_masqueV1Info->GetW()); realw = ConvertRealToRdsUnit(_masqueV1Info->getW());
dy00 = realw + 2*(-y00); dy00 = realw + 2*(-y00);
@ -202,8 +202,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
// ********************** // **********************
y20 = 0 + GET_RULE("RE_ACTI_CONT"); y20 = 0 + GET_RULE("RE_ACTI_CONT");
dy20 = realw - 2 * GET_RULE("RE_ACTI_CONT"); dy20 = realw - 2 * GET_RULE("RE_ACTI_CONT");
dx20 = (_masqueV1Info->GetNbSourceColumn()) * GET_RULE("RW_CONT") + dx20 = (_masqueV1Info->getNbSourceColumn()) * GET_RULE("RW_CONT") +
((_masqueV1Info->GetNbSourceColumn()) - 1) * GET_RULE("RD_CONT"); ((_masqueV1Info->getNbSourceColumn()) - 1) * GET_RULE("RD_CONT");
x20 = 0 - ( dx20 + GET_RULE("RD_CONT_GATE") ); x20 = 0 - ( dx20 + GET_RULE("RD_CONT_GATE") );
SAVE_RECTANGLE("20", x20, y20, dx20, dy20) SAVE_RECTANGLE("20", x20, y20, dx20, dy20)
@ -213,8 +213,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
// ********************** // **********************
y40 = y20; y40 = y20;
x40 = x00 + dx00 + GET_RULE("RD_CONT_GATE"); x40 = x00 + dx00 + GET_RULE("RD_CONT_GATE");
dx40 = (_masqueV1Info->GetNbDrainColumn()) * GET_RULE("RW_CONT") + dx40 = (_masqueV1Info->getNbDrainColumn()) * GET_RULE("RW_CONT") +
((_masqueV1Info->GetNbDrainColumn()) - 1) * GET_RULE("RD_CONT"); ((_masqueV1Info->getNbDrainColumn()) - 1) * GET_RULE("RD_CONT");
dy40 = dy20; dy40 = dy20;
SAVE_RECTANGLE("40", x40, y40, dx40, dy40) SAVE_RECTANGLE("40", x40, y40, dx40, dy40)
@ -302,7 +302,7 @@ void GenV1Trans::Calculate(Transistor* transistor)
_mapString2Box[(*i).first] = (*i).second.translate(-xmin, -ymin); _mapString2Box[(*i).first] = (*i).second.translate(-xmin, -ymin);
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << (*i).first <<" " << GetString((*i).second) << endl; cout << ts << (*i).first <<" " << getString((*i).second) << endl;
END_IF END_IF
assert(BOX_IS_VALID((*i).second)); assert(BOX_IS_VALID((*i).second));
@ -317,31 +317,31 @@ void GenV1Trans::Generate(Transistor* transistor)
{ {
OpenUpdateSession(); OpenUpdateSession();
Net* source = transistor->GetNet(Name(transistor->GetSourceName())); Net* source = transistor->getNet(Name(transistor->getSourceName()));
Net* drain = transistor->GetNet(Name(transistor->GetDrainName()) ); Net* drain = transistor->getNet(Name(transistor->getDrainName()) );
Net* grid = transistor->GetNet(Name(transistor->GetGridName()) ); Net* grid = transistor->getNet(Name(transistor->getGridName()) );
DtrAccess * dtraccess = DtrAccess::Instance(); DtrAccess * dtraccess = DtrAccess::Instance();
//string mostype(1, transistor->GetType()); // Get Mos Type (N/P). //string mostype(1, transistor->getType()); // get Mos Type (N/P).
string mostype; // Get Mos Type (N/P). string mostype; // get Mos Type (N/P).
if(transistor->IsNmos()) if(transistor->IsNmos())
mostype='N'; mostype='N';
else else
mostype='P'; mostype='P';
long rw_cont = GetUnit(GET_RULE("RW_CONT")); long rw_cont = getUnit(GET_RULE("RW_CONT"));
long rd_cont = GetUnit(GET_RULE("RD_CONT")); long rd_cont = getUnit(GET_RULE("RD_CONT"));
unsigned nbcontact = 0; unsigned nbcontact = 0;
long tmp_xcenter = 0; long tmp_xcenter = 0;
long tmp_ycenter = 0; long tmp_ycenter = 0;
DataBase * db = GetDataBase(); DataBase * db = getDataBase();
if(!db) throw Error("In GetV1Trans::Generate : can't find DataBase"); if(!db) throw Error("In getV1Trans::Generate : can't find DataBase");
//Technology * tech = db->GetTechnology(); //Technology * tech = db->getTechnology();
Layer * layer_20 = GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_20"); Layer * layer_20 = GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_20");
Layer * layer_30 = GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_30"); Layer * layer_30 = GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_30");
@ -354,19 +354,19 @@ void GenV1Trans::Generate(Transistor* transistor)
// Cenerate Components For Net Source. // Cenerate Components For Net Source.
// *********************************** // ***********************************
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Source of " << GetString(transistor) << endl; cout << ts << "Begin for create components for net Source of " << getString(transistor) << endl;
END_IF END_IF
for(size_t i=0; i<sizeof(segsforsource)/sizeof(string); i++) { for(size_t i=0; i<sizeof(segsforsource)/sizeof(string); i++) {
if(segsforsource[i]=="20") { if(segsforsource[i]=="20") {
//cout << ts << " Begin create contact for source , Under Box is " << GetString(GET_BOX(segsforsource[i])) <<endl; //cout << ts << " Begin create contact for source , Under Box is " << getString(GET_BOX(segsforsource[i])) <<endl;
Box underbox = GET_BOX(segsforsource[i]); Box underbox = GET_BOX(segsforsource[i]);
CREATE_CONTACT_MATRIX_UNDER(underbox, transistor->GetNbSourceColumn(), layer_20, source) CREATE_CONTACT_MATRIX_UNDER(underbox, transistor->getNbSourceColumn(), layer_20, source)
//cout << ts << " Finish create contact for source " <<endl; //cout << ts << " Finish create contact for source " <<endl;
} }
else { else {
Contact::Create(source, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforsource[i]) Contact::create(source, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforsource[i])
, GET_BOX(segsforsource[i]).getXCenter() , GET_BOX(segsforsource[i]).getXCenter()
, GET_BOX(segsforsource[i]).getYCenter() , GET_BOX(segsforsource[i]).getYCenter()
, GET_BOX(segsforsource[i]).getWidth() , GET_BOX(segsforsource[i]).getWidth()
@ -376,19 +376,19 @@ END_IF
} }
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Source of " << GetString(transistor) << endl; cout << ts << "End for create components for net Source of " << getString(transistor) << endl;
END_IF END_IF
// Generate Components For Net Grid. // Generate Components For Net Grid.
// ********************************* // *********************************
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Grid of " << GetString(transistor) << endl; cout << ts << "Begin for create components for net Grid of " << getString(transistor) << endl;
END_IF END_IF
for(size_t i=0; i<sizeof(segsforgrid)/sizeof(string); i++) { for(size_t i=0; i<sizeof(segsforgrid)/sizeof(string); i++) {
if(segsforgrid[i]=="30"){ if(segsforgrid[i]=="30"){
if( GET_BOX(segsforgrid[i]).getWidth()==GET_RULE("RW_CONT") ) { if( GET_BOX(segsforgrid[i]).getWidth()==GET_RULE("RW_CONT") ) {
Contact::Create(grid, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforgrid[i]) Contact::create(grid, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforgrid[i])
, GET_BOX(segsforgrid[i]).getXCenter() , GET_BOX(segsforgrid[i]).getXCenter()
, GET_BOX(segsforgrid[i]).getYCenter() , GET_BOX(segsforgrid[i]).getYCenter()
, GET_BOX(segsforgrid[i]).getWidth() , GET_BOX(segsforgrid[i]).getWidth()
@ -408,7 +408,7 @@ END_IF
} }
else { else {
if(GET_BOX(segsforgrid[i]).getXMin() < GET_BOX(segsforgrid[i]).getXMax()) { if(GET_BOX(segsforgrid[i]).getXMin() < GET_BOX(segsforgrid[i]).getXMax()) {
Contact::Create(grid, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforgrid[i]) Contact::create(grid, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforgrid[i])
, GET_BOX(segsforgrid[i]).getXCenter() , GET_BOX(segsforgrid[i]).getXCenter()
, GET_BOX(segsforgrid[i]).getYCenter() , GET_BOX(segsforgrid[i]).getYCenter()
, GET_BOX(segsforgrid[i]).getWidth() , GET_BOX(segsforgrid[i]).getWidth()
@ -420,25 +420,25 @@ END_IF
} }
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Grid of " << GetString(transistor) << endl; cout << ts << "End for create components for net Grid of " << getString(transistor) << endl;
END_IF END_IF
// Generate Components For Net Drain. // Generate Components For Net Drain.
// ********************************** // **********************************
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Drain of " << GetString(transistor) << endl; cout << ts << "Begin for create components for net Drain of " << getString(transistor) << endl;
END_IF END_IF
for(size_t i=0; i<sizeof(segsfordrain)/sizeof(string); i++) { for(size_t i=0; i<sizeof(segsfordrain)/sizeof(string); i++) {
if(segsfordrain[i]=="40") { if(segsfordrain[i]=="40") {
//cout << ts << " Begin create contact for drain, Under Box is " << GetString(GET_BOX(segsforsource[i])) <<endl; //cout << ts << " Begin create contact for drain, Under Box is " << getString(GET_BOX(segsforsource[i])) <<endl;
Box underbox = GET_BOX(segsfordrain[i]); Box underbox = GET_BOX(segsfordrain[i]);
CREATE_CONTACT_MATRIX_UNDER(underbox, transistor->GetNbDrainColumn(), layer_40, drain) CREATE_CONTACT_MATRIX_UNDER(underbox, transistor->getNbDrainColumn(), layer_40, drain)
//cout << ts << " Finish create contact for drain" <<endl; //cout << ts << " Finish create contact for drain" <<endl;
} }
else { else {
Contact::Create(drain, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsfordrain[i]) Contact::create(drain, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsfordrain[i])
, GET_BOX(segsfordrain[i]).getXCenter() , GET_BOX(segsfordrain[i]).getXCenter()
, GET_BOX(segsfordrain[i]).getYCenter() , GET_BOX(segsfordrain[i]).getYCenter()
, GET_BOX(segsfordrain[i]).getWidth() , GET_BOX(segsfordrain[i]).getWidth()
@ -448,20 +448,20 @@ END_IF
} }
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Drain of " << GetString(transistor) << endl; cout << ts << "End for create components for net Drain of " << getString(transistor) << endl;
END_IF END_IF
// Generate Components For Anonyms Nets. // Generate Components For Anonyms Nets.
// ************************************* // *************************************
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Anonyme of " << GetString(transistor) << endl; cout << ts << "Begin for create components for net Anonyme of " << getString(transistor) << endl;
END_IF END_IF
Net * anonym = Net::Create(transistor, Name("anonym")); Net * anonym = Net::create(transistor, Name("anonym"));
for(size_t i=0; i<sizeof(segsforanonym)/sizeof(string);i++) { for(size_t i=0; i<sizeof(segsforanonym)/sizeof(string);i++) {
if(transistor->IsNmos() && segsforanonym[i]=="50") if(transistor->IsNmos() && segsforanonym[i]=="50")
continue; continue;
Contact::Create(anonym, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforanonym[i]) Contact::create(anonym, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforanonym[i])
, GET_BOX(segsforanonym[i]).getXCenter() , GET_BOX(segsforanonym[i]).getXCenter()
, GET_BOX(segsforanonym[i]).getYCenter() , GET_BOX(segsforanonym[i]).getYCenter()
, GET_BOX(segsforanonym[i]).getWidth() , GET_BOX(segsforanonym[i]).getWidth()
@ -470,7 +470,7 @@ END_IF
} }
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Anonyme of " << GetString(transistor) << endl; cout << ts << "End for create components for net Anonyme of " << getString(transistor) << endl;
END_IF END_IF
// End Generation. // End Generation.
@ -480,50 +480,50 @@ END_IF
// Set Transistor::_mapNet2Box. // Set Transistor::_mapNet2Box.
// **************************** // ****************************
(*(transistor->_GetMapNet2Box()))[grid] = _mapString2Box[string("30")]; (*(transistor->_getMapNet2Box()))[grid] = _mapString2Box[string("30")];
(*(transistor->_GetMapNet2Box()))[source] = _mapString2Box[string("20")]; (*(transistor->_getMapNet2Box()))[source] = _mapString2Box[string("20")];
(*(transistor->_GetMapNet2Box()))[drain] = _mapString2Box[string("40")]; (*(transistor->_getMapNet2Box()))[drain] = _mapString2Box[string("40")];
cout<< GetString(_mapString2Box[string("30")]) <<endl; cout<< getString(_mapString2Box[string("30")]) <<endl;
cout<< GetString(_mapString2Box[string("20")]) <<endl; cout<< getString(_mapString2Box[string("20")]) <<endl;
cout<< GetString(_mapString2Box[string("40")]) <<endl; cout<< getString(_mapString2Box[string("40")]) <<endl;
// Set Abutment Box. // Set Abutment Box.
// ***************** // *****************
switch(transistor->GetAbutmentType().GetCode()) { switch(transistor->getAbutmentType().getCode()) {
case Transistor::Type::INTERNAL : case Transistor::Type::INTERNAL :
transistor->SetAbutmentBox( Box(GET_BOX(string("20")).getXCenter() transistor->SetAbutmentBox( Box(GET_BOX(string("20")).getXCenter()
, transistor->GetBoundingBox().getYMin() , transistor->getBoundingBox().getYMin()
, GET_BOX(string("40")).getXCenter() , GET_BOX(string("40")).getXCenter()
, transistor->GetBoundingBox().getYMax() , transistor->getBoundingBox().getYMax()
) )
); );
break; break;
case Transistor::Type::LEFT: case Transistor::Type::LEFT:
transistor->SetAbutmentBox( Box(GET_BOX(string("11")).getXMin() transistor->SetAbutmentBox( Box(GET_BOX(string("11")).getXMin()
, transistor->GetBoundingBox().getYMin() , transistor->getBoundingBox().getYMin()
, GET_BOX(string("40")).getXCenter() , GET_BOX(string("40")).getXCenter()
, transistor->GetBoundingBox().getYMax() , transistor->getBoundingBox().getYMax()
) )
); );
break ; break ;
case Transistor::Type::RIGHT: case Transistor::Type::RIGHT:
transistor->SetAbutmentBox( Box(GET_BOX(string("20")).getXCenter() transistor->SetAbutmentBox( Box(GET_BOX(string("20")).getXCenter()
, transistor->GetBoundingBox().getYMin() , transistor->getBoundingBox().getYMin()
, GET_BOX(string("11")).getXMax() , GET_BOX(string("11")).getXMax()
, transistor->GetBoundingBox().getYMax() , transistor->getBoundingBox().getYMax()
) )
); );
break ; break ;
case Transistor::Type::SINGLE: case Transistor::Type::SINGLE:
transistor->SetAbutmentBox( Box(GET_BOX(string("11")).getXMin() transistor->SetAbutmentBox( Box(GET_BOX(string("11")).getXMin()
, transistor->GetBoundingBox().getYMin() , transistor->getBoundingBox().getYMin()
, GET_BOX(string("11")).getXMax() , GET_BOX(string("11")).getXMax()
, transistor->GetBoundingBox().getYMax() , transistor->getBoundingBox().getYMax()
) )
); );
break ; break ;

View File

@ -19,7 +19,6 @@ BEGIN_NAMESPACE_HURRICANE
// **************************************************************************************************** // ****************************************************************************************************
MetaTransistor::MetaTransistor(Library* library, const Name& name, char type) MetaTransistor::MetaTransistor(Library* library, const Name& name, char type)
// **************************************************************************
: Inherit(library, name), : Inherit(library, name),
_type(type), _type(type),
_m(1), _m(1),
@ -29,67 +28,61 @@ MetaTransistor::MetaTransistor(Library* library, const Name& name, char type)
} }
MetaTransistor* MetaTransistor::Create(Library* library, const Name& name, char type) MetaTransistor* MetaTransistor::create(Library* library, const Name& name, char type) {
// **********************************************************************************
{
MetaTransistor* metatransistor = new MetaTransistor(library, name, type); MetaTransistor* metatransistor = new MetaTransistor(library, name, type);
metatransistor->_PostCreate(); metatransistor->_postCreate();
return metatransistor; return metatransistor;
} }
void MetaTransistor::_PreDelete() void MetaTransistor::_preDestroy() {
// ******************************
{
// do something // do something
// ************ // ************
Inherit::_PreDelete(); Inherit::_preDestroy();
} }
void MetaTransistor::_PostCreate() void MetaTransistor::_postCreate() {
// ******************************* Inherit::_postCreate();
{
Inherit::_PostCreate();
(Net::Create(this, Name("DRAIN")))->SetExternal(true); (Net::create(this, Name("DRAIN")))->SetExternal(true);
(Net::Create(this, Name("SOURCE")))->SetExternal(true); (Net::create(this, Name("SOURCE")))->SetExternal(true);
(Net::Create(this, Name("GRID")))->SetExternal(true); (Net::create(this, Name("GRID")))->SetExternal(true);
(Net::Create(this, Name("BULK")))->SetExternal(true); (Net::create(this, Name("BULK")))->SetExternal(true);
} }
void MetaTransistor::CreateConnection() void MetaTransistor::createConnection()
// *********************************** // ***********************************
{ {
for_each_instance(instance, this->GetInstances()) for_each_instance(instance, this->getInstances())
Cell * mastercell = instance->GetMasterCell(); Cell * mastercell = instance->getMasterCell();
// Assurance of unique instanciation // Assurance of unique instanciation
// ********************************* // *********************************
if(mastercell->_GetSlaveInstanceSet()._GetSize()!=1) { if(mastercell->_getSlaveInstanceSet()._getSize()!=1) {
string err_msg = "Can't create connection : " + GetString(mastercell) + " hasn't only one slave instance"; string err_msg = "Can't create connection : " + getString(mastercell) + " hasn't only one slave instance";
assert(err_msg.c_str()); assert(err_msg.c_str());
} }
instance->GetPlug(mastercell->GetNet(Name("DRAIN")))->SetNet(GetNet(Name("DRAIN"))); instance->getPlug(mastercell->getNet(Name("DRAIN")))->SetNet(getNet(Name("DRAIN")));
instance->GetPlug(mastercell->GetNet(Name("SOURCE")))->SetNet(GetNet(Name("SOURCE"))); instance->getPlug(mastercell->getNet(Name("SOURCE")))->SetNet(getNet(Name("SOURCE")));
instance->GetPlug(mastercell->GetNet(Name("GRID")))->SetNet(GetNet(Name("GRID"))); instance->getPlug(mastercell->getNet(Name("GRID")))->SetNet(getNet(Name("GRID")));
instance->GetPlug(mastercell->GetNet(Name("BULK")))->SetNet(GetNet(Name("BULK"))); instance->getPlug(mastercell->getNet(Name("BULK")))->SetNet(getNet(Name("BULK")));
end_for end_for
} }
void MetaTransistor::CreateLayout() void MetaTransistor::createLayout()
// ******************************** // ********************************
{ {
// OpenUpdateSession(); // OpenUpdateSession();
if((_le == 0.0) || (_we == 0.0)) { if((_le == 0.0) || (_we == 0.0)) {
throw Error("Can't generate layout : " + GetString(this) + " hasn't been dimensionned"); throw Error("Can't generate layout : " + getString(this) + " hasn't been dimensionned");
} }
SetTerminal(false); SetTerminal(false);
@ -98,24 +91,24 @@ void MetaTransistor::CreateLayout()
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();
// Assurance of unique instanciation // Assurance of unique instanciation
// ********************************* // *********************************
if(mastercell->_GetSlaveInstanceSet()._GetSize()!=1) { if(mastercell->_getSlaveInstanceSet()._getSize()!=1) {
string err_msg = "Can't generate layout : " + GetString(mastercell) + " hasn't only one slave instance"; string err_msg = "Can't generate layout : " + getString(mastercell) + " hasn't only one slave instance";
assert(err_msg.c_str()); assert(err_msg.c_str());
} }
Transistor * trans = dynamic_cast<Transistor*>(mastercell); Transistor * trans = dynamic_cast<Transistor*>(mastercell);
if(!trans){ if(!trans){
string err_msg = "Can't genrate layout : " + GetString(mastercell) + " isn't a Transistor"; string err_msg = "Can't genrate layout : " + getString(mastercell) + " isn't a Transistor";
} }
if(trans->IsInternal()) { if(trans->IsInternal()) {
if(!internal_ref) { if(!internal_ref) {
trans->CreateLayout(); trans->createLayout();
internal_ref = trans; internal_ref = trans;
} }
else { else {
@ -124,7 +117,7 @@ void MetaTransistor::CreateLayout()
} }
else if(trans->IsLeft()) { else if(trans->IsLeft()) {
if(!left_ref) { if(!left_ref) {
trans->CreateLayout(); trans->createLayout();
left_ref=trans; left_ref=trans;
} }
else else
@ -132,14 +125,14 @@ void MetaTransistor::CreateLayout()
} }
else if(trans->IsRight()) { else if(trans->IsRight()) {
if(!right_ref) { if(!right_ref) {
trans->CreateLayout(); trans->createLayout();
right_ref=trans; right_ref=trans;
} }
else else
trans->DuplicateLayout(right_ref); trans->DuplicateLayout(right_ref);
} }
else else
trans->CreateLayout(); trans->createLayout();
end_for end_for
@ -153,29 +146,29 @@ void MetaTransistor::Flush()
// ************************* // *************************
{ {
OpenUpdateSession(); OpenUpdateSession();
for_each_instance(instance, this->GetInstances()) for_each_instance(instance, this->getInstances())
Cell * mastercell = instance->GetMasterCell(); Cell * mastercell = instance->getMasterCell();
instance->Delete(); instance->destroy();
mastercell->Delete(); mastercell->destroy();
end_for end_for
CloseUpdateSession(); CloseUpdateSession();
} }
string MetaTransistor::_GetString() const string MetaTransistor::_getString() const
// *************************************** // ***************************************
{ {
string s= Inherit::_GetString(); string s= Inherit::_getString();
s.insert(s.length()-1, " " + GetString(GetType()) ); s.insert(s.length()-1, " " + getString(getType()) );
s.insert(s.length()-1, " " + GetString(GetM()) ); s.insert(s.length()-1, " " + getString(getM()) );
return s; return s;
} }
Record* MetaTransistor::_GetRecord() const Record* MetaTransistor::_getRecord() const
// *************************************** // ***************************************
{ {
Record* record = Inherit::_GetRecord(); Record* record = Inherit::_getRecord();
return record; return record;
} }

View File

@ -60,16 +60,16 @@ class MetaTransistor: public Cell {
protected : MetaTransistor(Library* library, const Name& name, char type); protected : MetaTransistor(Library* library, const Name& name, char type);
# endif # endif
public : static MetaTransistor* Create(Library* library, const Name& name, char type); public : static MetaTransistor* create(Library* library, const Name& name, char type);
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
protected : virtual void _PostCreate(); protected : virtual void _postCreate();
// Destructors // Destructors
// *********** // ***********
protected : ~MetaTransistor() {}; protected : ~MetaTransistor() {};
protected : virtual void _PreDelete(); protected : virtual void _preDestroy();
# endif # endif
// Operations // Operations
@ -77,17 +77,17 @@ class MetaTransistor: public Cell {
// Create the connection between all instances. // Create the connection between all instances.
// ******************************************** // ********************************************
public : void CreateConnection(); public : void createConnection();
// Create the layout of all motifs in this metatransistor. // Create the layout of all motifs in this metatransistor.
// ******************************************************* // *******************************************************
public : void CreateLayout(); public : void createLayout();
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
// Get all paramters after generation of Layout (capa..). // get all paramters after generation of Layout (capa..).
// ***************************************************** // *****************************************************
public : void GetParameterOfGeneration() { /* to do */}; public : void getParameterOfGeneration() { /* to do */};
// Delete all instances and all motifs in this metatransistor. // Delete all instances and all motifs in this metatransistor.
// *********************************************************** // ***********************************************************
@ -97,10 +97,10 @@ class MetaTransistor: public Cell {
// Accessors // Accessors
// ********* // *********
public : const Micro& GetLe() const { return _le; }; public : const Micro& getLe() const { return _le; };
public : const Micro& GetWe() const { return _we; }; public : const Micro& getWe() const { return _we; };
public : const char GetType() const { return _type; }; public : const char getType() const { return _type; };
public : const unsigned GetM() const { return _m; }; public : const unsigned getM() const { return _m; };
// Updators // Updators
@ -116,9 +116,9 @@ class MetaTransistor: public Cell {
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
// Others // Others
// ****** // ******
public: virtual string _GetTypeName() const {return _TName("MetaTransistor");}; public: virtual string _getTypeName() const {return _TName("MetaTransistor");};
public: virtual string _GetString() const; public: virtual string _getString() const;
public: virtual Record* _GetRecord() const; public: virtual Record* _getRecord() const;
# endif # endif
}; };

View File

@ -28,19 +28,19 @@ static long RDS_LAMBDA = -1;
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// Function : "GetPattern()". // Function : "getPattern()".
/* \static char * GetPattern (const string& str, const char* pattern) /* \static char * getPattern (const string& str, const char* pattern)
* \param str the string to check for regex. * \param str the string to check for regex.
* \param pattern the pattern to find. * \param pattern the pattern to find.
* *
* Get and return the march substring from str according to the pattern. * get and return the march substring from str according to the pattern.
* *
* \return NULL if Failure. * \return NULL if Failure.
* \return the according substring if Success. * \return the according substring if Success.
*/ */
static char* GetPattern(const string& str, const char* pattern) static char* getPattern(const string& str, const char* pattern)
// ************************************************************ // ************************************************************
{ {
int err; int err;
@ -158,7 +158,7 @@ static void CalculateRdsUnit() {
} }
if( !(rdstechnofile = fopen(rdsfilename, "r")) ) { if( !(rdstechnofile = fopen(rdsfilename, "r")) ) {
throw Error("Can't not open rds techno file : " + GetString(rdsfilename)); throw Error("Can't not open rds techno file : " + getString(rdsfilename));
} }
char buffer[80]; // For stock a line of the rds techno file char buffer[80]; // For stock a line of the rds techno file
@ -172,8 +172,8 @@ static void CalculateRdsUnit() {
string pattern; string pattern;
if( (pattern = GetPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) { // Get the value behind if( (pattern = getPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) { // get the value behind
throw Error("Can't get rds_physical_grid : GetPattern(string&, char*) return NULL"); throw Error("Can't get rds_physical_grid : getPattern(string&, char*) return NULL");
} }
if(!Scan(pattern, rds_physical_grid)){ // Convert from string to double if(!Scan(pattern, rds_physical_grid)){ // Convert from string to double
@ -186,8 +186,8 @@ static void CalculateRdsUnit() {
string pattern; string pattern;
if( (pattern = GetPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) { if( (pattern = getPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) {
throw Error("Can't get rds_lambda : GetPattern(string&, char*) return NULL"); throw Error("Can't get rds_lambda : getPattern(string&, char*) return NULL");
} }
if(!Scan(pattern, rds_lambda)){ if(!Scan(pattern, rds_lambda)){
@ -230,7 +230,7 @@ BEGIN_NAMESPACE_HURRICANE
// Utilitarians // Utilitarians
// **************************************************************************************************** // ****************************************************************************************************
const long& GetRdsUnit() const long& getRdsUnit()
// ********************* // *********************
{ {
if ( RDS_UNIT == -1) if ( RDS_UNIT == -1)
@ -239,13 +239,13 @@ const long& GetRdsUnit()
return RDS_UNIT; return RDS_UNIT;
} }
const long& GetRdsPhysicalGrid() const long& getRdsPhysicalGrid()
// ***************************** // *****************************
{ {
return RDS_PHYSICAL_GRID; return RDS_PHYSICAL_GRID;
} }
const long& GetRdsLambda() const long& getRdsLambda()
// *********************** // ***********************
{ {
if ( RDS_LAMBDA == -1) if ( RDS_LAMBDA == -1)

View File

@ -20,11 +20,11 @@ namespace Hurricane {
// Utilitarians // Utilitarians
// **************************************************************************************************** // ****************************************************************************************************
extern const long& GetRdsUnit(); extern const long& getRdsUnit();
extern const long& GetRdsPhysicalGrid(); extern const long& getRdsPhysicalGrid();
extern const long& GetRdsLambda(); extern const long& getRdsLambda();
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Function : "ConvertRealToRdsUnit(const double&)". // Function : "ConvertRealToRdsUnit(const double&)".
@ -40,7 +40,7 @@ extern const long& GetRdsLambda();
inline long ConvertRealToRdsUnit(const double& value) inline long ConvertRealToRdsUnit(const double& value)
// ******************************************************* // *******************************************************
{ {
long tmp_value = (long)rint(value*GetRdsUnit()); long tmp_value = (long)rint(value*getRdsUnit());
return (tmp_value%2)==0?tmp_value:(tmp_value+1); return (tmp_value%2)==0?tmp_value:(tmp_value+1);
} }

View File

@ -47,7 +47,7 @@ bool Transistor::MaskVersion::operator==(const MaskVersion& version) const
} }
string Transistor::MaskVersion::_GetString() const string Transistor::MaskVersion::_getString() const
// ************************************************* // *************************************************
{ {
switch(_code) { switch(_code) {
@ -57,11 +57,11 @@ string Transistor::MaskVersion::_GetString() const
} }
Record* Transistor::MaskVersion::_GetRecord() const Record* Transistor::MaskVersion::_getRecord() const
// ************************************************** // **************************************************
{ {
Record* record = new Record(GetString(this)); Record* record = new Record(getString(this));
record->Add(GetSlot("Code", _code)); record->Add(getSlot("Code", _code));
return record; return record;
} }
@ -91,7 +91,7 @@ Transistor::Type& Transistor::Type::operator=(const Type& type)
} }
string Transistor::Type::_GetString() const string Transistor::Type::_getString() const
// ***************************************** // *****************************************
{ {
switch(_code) { switch(_code) {
@ -105,11 +105,11 @@ string Transistor::Type::_GetString() const
} }
Record* Transistor::Type::_GetRecord() const Record* Transistor::Type::_getRecord() const
// ***************************************** // *****************************************
{ {
Record* record = new Record(GetString(this)); Record* record = new Record(getString(this));
record->Add(GetSlot("Code", _code)); record->Add(getSlot("Code", _code));
return record; return record;
} }
@ -132,44 +132,24 @@ Transistor::MaskInfo::MaskInfo(const double& l, const double& w, const Type::Cod
Transistor::MaskInfo& Transistor::MaskInfo::operator=(const MaskInfo& masqueinfo) Transistor::MaskInfo& Transistor::MaskInfo::operator=(const MaskInfo& masqueinfo)
// ************************************************************************************ // ************************************************************************************
{ {
_l = masqueinfo.GetL(); _l = masqueinfo.getL();
_w = masqueinfo.GetW(); _w = masqueinfo.getW();
_type= masqueinfo.GetType(); _type= masqueinfo.getType();
_nbDrainColumn = masqueinfo.GetNbDrainColumn(); _nbDrainColumn = masqueinfo.getNbDrainColumn();
_nbSourceColumn = masqueinfo.GetNbSourceColumn(); _nbSourceColumn = masqueinfo.getNbSourceColumn();
return *this; return *this;
} }
void Transistor::MaskInfo::_PostCreate()
// ***************************************
{
}
void Transistor::MaskInfo::_PreDelete()
// **************************************
{
}
void Transistor::MaskInfo::Delete()
// **********************************
{
_PreDelete();
delete this;
}
bool Transistor::MaskInfo::operator==(const MaskInfo& masqueinfo) bool Transistor::MaskInfo::operator==(const MaskInfo& masqueinfo)
// ****************************************************************** // ******************************************************************
{ {
if(_l == masqueinfo.GetL() && if(_l == masqueinfo.getL() &&
_w == masqueinfo.GetW() && _w == masqueinfo.getW() &&
_type== masqueinfo.GetType() && _type== masqueinfo.getType() &&
_nbDrainColumn == masqueinfo.GetNbDrainColumn() && _nbDrainColumn == masqueinfo.getNbDrainColumn() &&
_nbSourceColumn == masqueinfo.GetNbSourceColumn() _nbSourceColumn == masqueinfo.getNbSourceColumn()
) )
return true; return true;
@ -177,24 +157,24 @@ bool Transistor::MaskInfo::operator==(const MaskInfo& masqueinfo)
} }
string Transistor::MaskInfo::_GetString() const string Transistor::MaskInfo::_getString() const
// ********************************************** // **********************************************
{ {
string s = "<" + _GetTypeName() + " " string s = "<" + _getTypeName() + " "
+ GetString(_l) + " " + getString(_l) + " "
+ GetString(_w) + " " + getString(_w) + " "
+ _type._GetString() + " " + _type._getString() + " "
+ GetString(_nbSourceColumn) + " " + getString(_nbSourceColumn) + " "
+ GetString(_nbDrainColumn) + getString(_nbDrainColumn)
+ ">"; + ">";
return s; return s;
} }
Record* Transistor::MaskInfo::_GetRecord() const Record* Transistor::MaskInfo::_getRecord() const
// *********************************************** // ***********************************************
{ {
Record * record = new Record(_GetString()); Record * record = new Record(_getString());
return record; return record;
} }
@ -214,21 +194,6 @@ Transistor::MaskV1Info::MaskV1Info(const double& l, const double& w, const Type:
) )
{} {}
Transistor::MaskV1Info* Transistor::MaskV1Info::Create(const double& l, const double& w
, const Type::Code& type
, const unsigned& nbDrainColumn
, const unsigned& nbSourceColumn)
// **********************************************************************************************
{
MaskV1Info* masquev1info = new MaskV1Info(l, w, type, nbDrainColumn, nbSourceColumn);
masquev1info->_PostCreate();
return masquev1info;
}
Transistor::MaskInfo& Transistor::MaskV1Info::operator=(const MaskInfo& masqueinfo) Transistor::MaskInfo& Transistor::MaskV1Info::operator=(const MaskInfo& masqueinfo)
// ************************************************************************************** // **************************************************************************************
{ {
@ -238,21 +203,6 @@ Transistor::MaskInfo& Transistor::MaskV1Info::operator=(const MaskInfo& masquein
return *this; return *this;
} }
void Transistor::MaskV1Info::_PostCreate()
// *****************************************
{
Inherit::_PostCreate();
}
void Transistor::MaskV1Info::_PreDelete()
// ****************************************
{
Inherit::_PreDelete();
}
bool Transistor::MaskV1Info::operator == (const MaskInfo& masqueinfo) bool Transistor::MaskV1Info::operator == (const MaskInfo& masqueinfo)
// ********************************************************************** // **********************************************************************
{ {
@ -261,17 +211,17 @@ bool Transistor::MaskV1Info::operator == (const MaskInfo& masqueinfo)
} }
string Transistor::MaskV1Info::_GetString() const string Transistor::MaskV1Info::_getString() const
// ************************************************ // ************************************************
{ {
string s = Inherit::_GetString(); string s = Inherit::_getString();
return s; return s;
} }
Record* Transistor::MaskV1Info::_GetRecord() const Record* Transistor::MaskV1Info::_getRecord() const
// ************************************************* // *************************************************
{ {
Record* record = Inherit::_GetRecord(); Record* record = Inherit::_getRecord();
return record; return record;
} }
@ -289,42 +239,42 @@ Transistor::Transistor(Library* library, const Name& name, char type)
} }
Transistor* Transistor::Create(Library* library, const Name& name, char type) Transistor* Transistor::create(Library* library, const Name& name, char type)
// ************************************************************************** // **************************************************************************
{ {
Transistor* transistor = new Transistor(library, name, type); Transistor* transistor = new Transistor(library, name, type);
transistor->_PostCreate(); transistor->_postCreate();
return transistor; return transistor;
} }
void Transistor::_PreDelete() void Transistor::_preDestroy()
// ****************************** // ******************************
{ {
// Delete aggregated objets. // Delete aggregated objets.
// ************************* // *************************
if(_masqueInfo) if(_masqueInfo)
_masqueInfo->Delete(); delete _masqueInfo;
if(_genTrans) if(_genTrans)
delete _genTrans; delete _genTrans;
Inherit::_PreDelete(); Inherit::_preDestroy();
} }
void Transistor::_PostCreate() void Transistor::_postCreate()
// ******************************* // *******************************
{ {
Inherit::_PostCreate(); Inherit::_postCreate();
(Net::Create(this, Name("DRAIN")))->SetExternal(true); (Net::create(this, Name("DRAIN")))->SetExternal(true);
(Net::Create(this, Name("SOURCE")))->SetExternal(true); (Net::create(this, Name("SOURCE")))->SetExternal(true);
(Net::Create(this, Name("GRID")))->SetExternal(true); (Net::create(this, Name("GRID")))->SetExternal(true);
(Net::Create(this, Name("BULK")))->SetExternal(true); (Net::create(this, Name("BULK")))->SetExternal(true);
// By default, transistor's length and heigth is NULL, and is internal. // By default, transistor's length and heigth is NULL, and is internal.
// ******************************************************************** // ********************************************************************
@ -332,47 +282,47 @@ 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(_type));
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;
} }
Transistor::MaskVersion Transistor::_GetMaskInfoVersion(MaskInfo* masqueinfo) Transistor::MaskVersion Transistor::_getMaskInfoVersion(MaskInfo* masqueinfo)
// *************************************************************************************** // ***************************************************************************************
{ {
if(!masqueinfo) if(!masqueinfo)
throw Error("Error : In Transistor::_GetMaskInfoVersion, param masqueinfo is NULL"); throw Error("Error : In Transistor::_getMaskInfoVersion, param masqueinfo is NULL");
if(dynamic_cast<MaskV1Info*>(masqueinfo)) if(dynamic_cast<MaskV1Info*>(masqueinfo))
return MaskVersion(MaskVersion::VERSION1); return MaskVersion(MaskVersion::VERSION1);
throw Error("Error : In Transistor::_GetMaskInfoVersion, can't dynamic cast param masqueinfo"); throw Error("Error : In Transistor::_getMaskInfoVersion, can't dynamic cast param masqueinfo");
return MaskVersion(MaskVersion::VERSION1); return MaskVersion(MaskVersion::VERSION1);
} }
Transistor::MaskInfo* Transistor::_CreateMaskInfo(const MaskVersion& version) Transistor::MaskInfo* Transistor::_createMaskInfo(const MaskVersion& version)
// ******************************************************************************* // *******************************************************************************
{ {
switch((const MaskVersion::Code&)version) { switch((const MaskVersion::Code&)version) {
case MaskVersion::VERSION1 : case MaskVersion::VERSION1 :
return MaskV1Info::Create(0.0, 0.0); return new MaskV1Info(0.0, 0.0);
default : default :
throw Error ("Error : In Transistor::_CreateMaskInfoBy, unknown param version"); throw Error ("Error : In Transistor::_createMaskInfoBy, unknown param version");
return NULL; return NULL;
} }
} }
@ -382,12 +332,12 @@ void Transistor::SetMaskInfo(MaskInfo* masqueinfo)
// *************************************************** // ***************************************************
{ {
if(!masqueinfo) if(!masqueinfo)
throw Error("Error : In Transistor::CreateLayout : masqueinfo is NULL"); throw Error("Error : In Transistor::createLayout : masqueinfo is NULL");
// Set new Param. // Set new Param.
// *************** // ***************
MaskVersion newversion = _GetMaskInfoVersion(masqueinfo); MaskVersion newversion = _getMaskInfoVersion(masqueinfo);
MaskVersion oldversion = _GetMaskInfoVersion(_masqueInfo); MaskVersion oldversion = _getMaskInfoVersion(_masqueInfo);
if(newversion == oldversion) { // If they are the same version. if(newversion == oldversion) { // If they are the same version.
if((*_masqueInfo)==(*masqueinfo)) // If they are identical. if((*_masqueInfo)==(*masqueinfo)) // If they are identical.
@ -396,17 +346,17 @@ void Transistor::SetMaskInfo(MaskInfo* masqueinfo)
(*_masqueInfo)=(*masqueinfo); (*_masqueInfo)=(*masqueinfo);
} }
else { // If change the version. else { // If change the version.
_masqueInfo->Delete(); delete _masqueInfo;
_masqueInfo = _CreateMaskInfo(newversion); _masqueInfo = _createMaskInfo(newversion);
(*_masqueInfo) == (*masqueinfo); (*_masqueInfo) == (*masqueinfo);
} }
} }
void Transistor::CreateLayout() void Transistor::createLayout()
// **************************** // ****************************
{ {
MaskVersion version = _GetMaskInfoVersion(_masqueInfo); MaskVersion version = _getMaskInfoVersion(_masqueInfo);
MaskV1Info* masquev1info = NULL; MaskV1Info* masquev1info = NULL;
// Select algorithme with technology and masque version. // Select algorithme with technology and masque version.
@ -448,39 +398,39 @@ void Transistor::DuplicateLayout(Transistor* transistor)
Contact * con = NULL; Contact * con = NULL;
Segment * seg = NULL; Segment * seg = NULL;
for_each_net(net, transistor->GetNets()) for_each_net(net, transistor->getNets())
if( !( tmp=GetNet(net->GetName()) ) ) { // if( !( tmp=getNet(net->getName()) ) ) { //
tmp = Net::Create(this, net->GetName()); tmp = Net::create(this, net->getName());
tmp->SetExternal(net->IsExternal()); tmp->SetExternal(net->IsExternal());
} }
for_each_component(component, net->GetComponents()) for_each_component(component, net->getComponents())
if( (con=dynamic_cast<Contact*>(component)) ){ if( (con=dynamic_cast<Contact*>(component)) ){
Contact::Create(tmp, component->GetLayer(), con->GetX(), con->GetY(), con->GetWidth(), con->GetHeight()); Contact::create(tmp, component->getLayer(), con->getX(), con->getY(), con->getWidth(), con->getHeight());
} }
else if( (seg=dynamic_cast<Vertical*>(component)) ) { else if( (seg=dynamic_cast<Vertical*>(component)) ) {
Vertical::Create(tmp, component->GetLayer(), seg->GetSourceX(), seg->GetWidth(), seg->GetSourceY(), Vertical::create(tmp, component->getLayer(), seg->getSourceX(), seg->getWidth(), seg->getSourceY(),
seg->GetTargetY()); seg->getTargetY());
} }
else if( (seg=dynamic_cast<Horizontal*>(component)) ){ else if( (seg=dynamic_cast<Horizontal*>(component)) ){
Horizontal::Create(tmp, component->GetLayer(), seg->GetSourceY(), seg->GetWidth(), seg->GetSourceX(), Horizontal::create(tmp, component->getLayer(), seg->getSourceY(), seg->getWidth(), seg->getSourceX(),
seg->GetTargetX()); seg->getTargetX());
} }
else else
throw Error ("Error : In Transistor::DuplicateLayout, find illegal elem : " + GetString(component) + throw Error ("Error : In Transistor::DuplicateLayout, find illegal elem : " + getString(component) +
"In Transistor, all component must be contact or segment" ) ; "In Transistor, all component must be contact or segment" ) ;
end_for end_for
end_for end_for
SetAbutmentBox(transistor->GetAbutmentBox()); SetAbutmentBox(transistor->getAbutmentBox());
_mapNet2Box.clear(); _mapNet2Box.clear();
map<Net*, Box>::iterator i = transistor->_GetMapNet2Box()->begin(), map<Net*, Box>::iterator i = transistor->_getMapNet2Box()->begin(),
j = transistor->_GetMapNet2Box()->end(); j = transistor->_getMapNet2Box()->end();
while(i!=j) { while(i!=j) {
_mapNet2Box[GetNet((*i).first->GetName())]=(*i).second; _mapNet2Box[getNet((*i).first->getName())]=(*i).second;
i++; i++;
} }
@ -497,9 +447,9 @@ END_NAMESPACE_HURRICANE
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
string GetString(const H::Transistor::MaskInfo& masqueinfo) string getString(const H::Transistor::MaskInfo& masqueinfo)
// ********************************************************** // **********************************************************
{ {
return masqueinfo._GetString(); return masqueinfo._getString();
} }

View File

@ -45,11 +45,11 @@ class Transistor : public Cell {
public : bool operator==(const MaskVersion&) const; 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; };
public : string _GetTypeName() const { return _TName("Transistor::MaskVersion"); }; public : string _getTypeName() const { return _TName("Transistor::MaskVersion"); };
public : string _GetString() const; public : string _getString() const;
public : Record* _GetRecord() const; public : Record* _getRecord() const;
}; };
@ -68,11 +68,11 @@ class Transistor : public Cell {
public : void SetCode(const Code& code) { _code = code; }; public : void SetCode(const Code& code) { _code = code; };
public : const Code& GetCode() const { return _code; }; public : const Code& getCode() const { return _code; };
public : string _GetTypeName() const { return _TName("Transistor::Type"); }; public : string _getTypeName() const { return _TName("Transistor::Type"); };
public : string _GetString() const; public : string _getString() const;
public : Record* _GetRecord() const; public : Record* _getRecord() const;
}; };
@ -98,21 +98,18 @@ class Transistor : public Cell {
private : MaskInfo(const MaskInfo& ); private : MaskInfo(const MaskInfo& );
protected : virtual void _PostCreate();
// Destructors // Destructors
// *********** // ***********
protected: virtual ~MaskInfo() {}; public: virtual ~MaskInfo() {};
protected: virtual void _PreDelete();
public : virtual void Delete();
// Accessors // Accessors
// ********* // *********
public : const double& GetL() const { return _l; }; public : const double& getL() const { return _l; };
public : const double& GetW() const { return _w; }; public : const double& getW() const { return _w; };
public : const unsigned & GetNbDrainColumn() const { return _nbDrainColumn; }; public : const unsigned & getNbDrainColumn() const { return _nbDrainColumn; };
public : const unsigned & GetNbSourceColumn() const { return _nbSourceColumn; }; public : const unsigned & getNbSourceColumn() const { return _nbSourceColumn; };
public : const Type& GetType() const { return _type; }; public : const Type& getType() const { return _type; };
// Update // Update
// ****** // ******
@ -132,9 +129,9 @@ class Transistor : public Cell {
// Others // Others
// ****** // ******
public : virtual string _GetTypeName() const =0; public : virtual string _getTypeName() const =0;
public : virtual string _GetString() const; public : virtual string _getString() const;
public : virtual Record* _GetRecord() const; public : virtual Record* _getRecord() const;
}; };
@ -155,18 +152,12 @@ class Transistor : public Cell {
, const unsigned& nbDrainColumn = 1 , const unsigned& nbDrainColumn = 1
, const unsigned& nbSourceColumn = 1); , const unsigned& nbSourceColumn = 1);
public: static MaskV1Info* Create(const double& l, const double& w, const Type::Code& type=Type::INTERNAL
, const unsigned& nbDrainColumn = 1
, const unsigned& nbSourceColumn = 1);
public : MaskInfo& operator=(const MaskInfo&); public : MaskInfo& operator=(const MaskInfo&);
protected : void _PostCreate();
// Destructor // Destructor
// *********** // ***********
public : virtual ~MaskV1Info() {}; public : virtual ~MaskV1Info() {};
protected: void _PreDelete();
// Operators // Operators
// ********* // *********
@ -174,9 +165,9 @@ class Transistor : public Cell {
// Others // Others
// ********* // *********
public : virtual string _GetTypeName() const { return _TName("Transistor::MaskV1Info"); }; public : virtual string _getTypeName() const { return _TName("Transistor::MaskV1Info"); };
public : virtual string _GetString() const; public : virtual string _getString() const;
public : virtual Record* _GetRecord() const; public : virtual Record* _getRecord() const;
}; };
@ -199,43 +190,43 @@ class Transistor : public Cell {
protected : Transistor(Library* library, const Name& name, char type); protected : Transistor(Library* library, const Name& name, char type);
# endif # endif
public : static Transistor* Create(Library* library, const Name& name, char type); public : static Transistor* create(Library* library, const Name& name, char type);
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
protected : virtual void _PostCreate(); protected : virtual void _postCreate();
// Destructors // Destructors
// *********** // ***********
protected : ~Transistor() {}; protected : ~Transistor() {};
protected : virtual void _PreDelete(); protected : virtual void _preDestroy();
# endif # endif
// Accessors // Accessors
// ********* // *********
public : char GetType() const { return _type; }; public : char getType() const { return _type; };
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"; };
public : const char* GetSourceName() const { return "SOURCE"; }; public : const char* getSourceName() const { return "SOURCE"; };
public : const char* GetGridName() const { return "GRID"; }; public : const char* getGridName() const { return "GRID"; };
public : Net* GetDrain() const { return GetNet(GetDrainName()); }; public : Net* getDrain() const { return getNet(getDrainName()); };
public : Net* GetSource() const { return GetNet(GetSourceName()); }; public : Net* getSource() const { return getNet(getSourceName()); };
public : Net* GetGrid() const { return GetNet(GetGridName()); }; public : Net* getGrid() const { return getNet(getGridName()); };
public : const Type& GetAbutmentType() const { return _masqueInfo->GetType(); }; public : const Type& getAbutmentType() const { return _masqueInfo->getType(); };
// Predicats // Predicats
// ********* // *********
public : bool IsNmos() const { return _type==TRANSN; }; public : bool IsNmos() const { return _type==TRANSN; };
public : bool IsPmos() const { return _type==TRANSP; }; public : bool IsPmos() const { return _type==TRANSP; };
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; };
public : bool IsSingle() const { return GetAbutmentType().GetCode()==Type::SINGLE; }; public : bool IsSingle() const { return getAbutmentType().getCode()==Type::SINGLE; };
// Updators // Updators
// ******** // ********
@ -247,20 +238,20 @@ class Transistor : public Cell {
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
// Others // Others
// ****** // ******
public : virtual string _GetTypeName() const {return _TName("Transistor");}; public : virtual string _getTypeName() const {return _TName("Transistor");};
public : virtual string _GetString() const; public : virtual string _getString() const;
public : virtual Record* _GetRecord() const; public : virtual Record* _getRecord() const;
public : const GenTrans* _GetGenTrans() const {return _genTrans; }; public : const GenTrans* _getGenTrans() const {return _genTrans; };
public : static MaskVersion _GetMaskInfoVersion(MaskInfo*) ; public : static MaskVersion _getMaskInfoVersion(MaskInfo*) ;
public : static MaskInfo* _CreateMaskInfo(const MaskVersion&) ; public : static MaskInfo* _createMaskInfo(const MaskVersion&) ;
public : map<Net*, Box>* _GetMapNet2Box() { return &_mapNet2Box; }; public : map<Net*, Box>* _getMapNet2Box() { return &_mapNet2Box; };
# endif # endif
// Operators // Operators
// ********* // *********
public : void SetMaskInfo(MaskInfo*); public : void SetMaskInfo(MaskInfo*);
public : void CreateLayout(); public : void createLayout();
public : void DuplicateLayout(Transistor* transistor) ; public : void DuplicateLayout(Transistor* transistor) ;
@ -290,8 +281,8 @@ 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;
} }
@ -321,8 +312,8 @@ 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;
} }
@ -338,7 +329,7 @@ template<>
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
string GetString(const H::Transistor::MaskInfo&); string getString(const H::Transistor::MaskInfo&);
#endif // HURRICANE_TRANSISTOR #endif // HURRICANE_TRANSISTOR

View File

@ -1,5 +1,5 @@
INCLUDE_DIRECTORIES(${HURRICANE_INCLUDE_DIR} ${CHAMSIN_SOURCE_DIR}/src/dtr INCLUDE_DIRECTORIES(${HURRICANE_INCLUDE_DIR}
${CHAMSIN_SOURCE_DIR}/src/analogic) ${CHAMSIN_SOURCE_DIR}/src/dtr ${CHAMSIN_SOURCE_DIR}/src/analogic)
ADD_LIBRARY(device SHARED Device.cpp TrMos.cpp TrMos_PlaceRoute.cpp) ADD_LIBRARY(device SHARED Device.cpp TrMos.cpp TrMos_PlaceRoute.cpp)

View File

@ -28,15 +28,15 @@ static Instance * refins = NULL;
static set<Cell*> cellSet; static set<Cell*> cellSet;
static void GetAllCells(Cell* cell) static void getAllCells(Cell* cell)
// ******************************** // ********************************
{ {
cellSet.insert(cell); cellSet.insert(cell);
if(!(cell->IsLeaf())){ if(!(cell->IsLeaf())){
for_each_instance(instance, cell->GetInstances()) for_each_instance(instance, cell->getInstances())
Cell * mastercell = instance->GetMasterCell(); Cell * mastercell = instance->getMasterCell();
GetAllCells(mastercell); getAllCells(mastercell);
end_for end_for
} }
} }
@ -57,34 +57,16 @@ Device::Device(Library* library, const Name& name)
} }
void Device::Delete() void Device::_postCreate() {
// ************************** Inherit::_postCreate();
{
_PreDelete();
delete this;
}
//CDataBase* database = getCDataBase();
void Device::_PreDelete() //CCatal* ccatal = database->getCCatal();
// ******************************
{
// do something
// ************
Inherit::_PreDelete(); //CCatal::State* state = ccatal->getState(getName(), true);
}
void Device::_PostCreate() {
Inherit::_PostCreate();
//CDataBase* database = GetCDataBase();
//CCatal* ccatal = database->GetCCatal();
//CCatal::State* state = ccatal->GetState(GetName(), true);
//state->SetFlags(CCatal::State::LOGICAL|CCatal::State::PHYSICAL|CCatal::State::IN_MEMORY|CCatal::State::GDS, true); //state->SetFlags(CCatal::State::LOGICAL|CCatal::State::PHYSICAL|CCatal::State::IN_MEMORY|CCatal::State::GDS, true);
//state->SetCell(this); //state->SetCell(this);
//state->SetLibrary(GetLibrary()); //state->SetLibrary(getLibrary());
// Create GenericDtrAccess and DtrAccess // Create GenericDtrAccess and DtrAccess
// ************************************* // *************************************
@ -96,9 +78,9 @@ void Device::SaveLogicalView()
// *************************** // ***************************
{ {
cellSet.clear(); cellSet.clear();
GetAllCells(this); getAllCells(this);
//CDataBase * db = GetCDataBase(); //CDataBase * db = getCDataBase();
// set<Cell*>::iterator i = cellSet.begin(), j = cellSet.end(); // set<Cell*>::iterator i = cellSet.begin(), j = cellSet.end();
// //
@ -110,17 +92,17 @@ void Device::SaveLogicalView()
string Device::_GetString() const string Device::_getString() const
// *************************************** // ***************************************
{ {
string s= Inherit::_GetString(); string s= Inherit::_getString();
return s; return s;
} }
Record* Device::_GetRecord() const Record* Device::_getRecord() const
// ********************************* // *********************************
{ {
Record* record = Inherit::_GetRecord(); Record* record = Inherit::_getRecord();
return record; return record;
} }
@ -133,11 +115,11 @@ void Device::_Place(Instance* ins, const Transformation::Orientation& orientatio
} }
if(ins->IsPlaced()) { if(ins->IsPlaced()) {
throw Error("Can't Place " + GetString(ins) + " : it has already been placed"); throw Error("Can't Place " + getString(ins) + " : it has already been placed");
} }
Transformation transformation(Point(0,0), orientation); Transformation transformation(Point(0,0), orientation);
Box orientedmastercellbox = transformation.getBox(ins->GetMasterCell()->GetAbutmentBox()); Box orientedmastercellbox = transformation.getBox(ins->getMasterCell()->getAbutmentBox());
Point translation( point.getX() - orientedmastercellbox.getXMin() Point translation( point.getX() - orientedmastercellbox.getXMin()
, point.getY() - orientedmastercellbox.getYMin() ); , point.getY() - orientedmastercellbox.getYMin() );
@ -172,18 +154,18 @@ void Device::_PlaceRight(Instance* ins, const Transformation::Orientation& orien
} }
if(ins->IsPlaced()) { if(ins->IsPlaced()) {
throw Error("Can't PlaceRight " + GetString(ins) + " : it has already been placed"); throw Error("Can't PlaceRight " + getString(ins) + " : it has already been placed");
} }
if(!refins) { if(!refins) {
throw Error("Can't Place Right " + GetString(ins) + " : can't find refins"); throw Error("Can't Place Right " + getString(ins) + " : can't find refins");
} }
Box refinsbox = refins->GetAbutmentBox(); Box refinsbox = refins->getAbutmentBox();
Transformation transformation(Point(0,0), orientation); Transformation transformation(Point(0,0), orientation);
Box orientedmastercellbox = transformation.getBox(ins->GetMasterCell()->GetAbutmentBox()); Box orientedmastercellbox = transformation.getBox(ins->getMasterCell()->getAbutmentBox());
Point translation( refinsbox.getXMax() - orientedmastercellbox.getXMin() + offset.getX() Point translation( refinsbox.getXMax() - orientedmastercellbox.getXMin() + offset.getX()
, refinsbox.getYMin() - orientedmastercellbox.getYMin() + offset.getY() ); , refinsbox.getYMin() - orientedmastercellbox.getYMin() + offset.getY() );

View File

@ -49,14 +49,9 @@ class Device : public Cell {
// Constructors // Constructors
// ************ // ************
protected : Device(Library* library, const Name& name); protected : Device(Library* library, const Name& name);
protected : virtual void _PostCreate(); protected : virtual void _postCreate();
// Destructors
// ***********
protected : ~Device() {};
public : virtual void Delete();
protected : virtual void _PreDelete();
# endif # endif
// Operations // Operations
@ -79,9 +74,9 @@ class Device : public Cell {
// Others // Others
// ****** // ******
public: virtual string _GetTypeName() const {return _TName("Device"); }; public: virtual string _getTypeName() const {return _TName("Device"); };
public: virtual string _GetString() const; public: virtual string _getString() const;
public: virtual Record* _GetRecord() const; public: virtual Record* _getRecord() const;
public : virtual void _Flush() = 0; public : virtual void _Flush() = 0;
// Description of Layout // Description of Layout

View File

@ -38,33 +38,14 @@ TrMos::TrMos(Library* library, const Name& name):
{} {}
TrMos* TrMos::Create(Library* library, const Name & name) { TrMos* TrMos::create(Library* library, const Name & name) {
TrMos* trmos= new TrMos(library, name); TrMos* trmos= new TrMos(library, name);
trmos->_PostCreate(); trmos->_postCreate();
return trmos; return trmos;
} }
void TrMos::_postCreate() {
void TrMos::Delete() Inherit::_postCreate();
// *****************
{
_PreDelete();
delete this;
}
void TrMos::_PreDelete()
// ******************************
{
// do something
// ************
Inherit::_PreDelete();
}
void TrMos::_PostCreate() {
Inherit::_PostCreate();
// do something. // do something.
// Initialize pin order list and other attributes. // Initialize pin order list and other attributes.
@ -81,7 +62,7 @@ void TrMos::_PostCreate() {
_lowPinOrder.push_back(S); _lowPinOrder.push_back(S);
_lowPinOrder.push_back(B); _lowPinOrder.push_back(B);
double minWidth = (DtrAccess::Instance())->GetSingleRealRuleByLabel(string("RW_ALU1")); double minWidth = (DtrAccess::Instance())->getSingleRealRuleByLabel(string("RW_ALU1"));
_widthOfSourceWire = minWidth; _widthOfSourceWire = minWidth;
_widthOfDrainWire = minWidth; _widthOfDrainWire = minWidth;
@ -89,21 +70,21 @@ void TrMos::_PostCreate() {
} }
Transistors TrMos::GetTransistors() const { Transistors TrMos::getTransistors() const {
return GetCollection(_transistorList); return getCollection(_transistorList);
} }
void TrMos::Create(const char type, const bool isbsconnected) void TrMos::create(const char type, 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)) { if( (type!=TRANSN) && (type!=TRANSP)) {
throw Error("Can't Create TrMos " + GetString(GetName()) + " : type " + GetString(type) + " is invalid"); throw Error("Can't Create TrMos " + getString(getName()) + " : type " + getString(type) + " is invalid");
} }
_type = type; _type = type;
@ -111,7 +92,7 @@ void TrMos::Create(const char type, const bool isbsconnected)
// MetaTransistor is in the same library than Trmos // MetaTransistor is in the same library than Trmos
// ************************************************ // ************************************************
Library * library = GetLibrary(); Library * library = getLibrary();
// Create signals // Create signals
// ************** // **************
@ -120,12 +101,12 @@ void TrMos::Create(const char type, const bool isbsconnected)
Net * grid = NULL; Net * grid = NULL;
Net * bulk = NULL; Net * bulk = NULL;
(drain = Net::Create(this, Name("drain")))->SetExternal(true); (drain = Net::create(this, Name("drain")))->SetExternal(true);
(source = Net::Create(this, Name("source")))->SetExternal(true); (source = Net::create(this, Name("source")))->SetExternal(true);
(grid = Net::Create(this, Name("grid")))->SetExternal(true); (grid = Net::create(this, Name("grid")))->SetExternal(true);
if(!isbsconnected) { if(!isbsconnected) {
(bulk = Net::Create(this, Name("bulk")))->SetExternal(true); (bulk = Net::create(this, Name("bulk")))->SetExternal(true);
} }
@ -133,19 +114,19 @@ 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" ), _type);
Instance * instance = Instance::Create(this, Instance * instance = Instance::create(this,
Name("Ins_" + GetString(_tr1->GetName())), Name("Ins_" + getString(_tr1->getName())),
_tr1); _tr1);
instance->GetPlug(_tr1->GetNet(Name("DRAIN")))->SetNet(drain); instance->getPlug(_tr1->getNet(Name("DRAIN")))->SetNet(drain);
instance->GetPlug(_tr1->GetNet(Name("SOURCE")))->SetNet(source); instance->getPlug(_tr1->getNet(Name("SOURCE")))->SetNet(source);
instance->GetPlug(_tr1->GetNet(Name("GRID")))->SetNet(grid); instance->getPlug(_tr1->getNet(Name("GRID")))->SetNet(grid);
if(!isbsconnected) if(!isbsconnected)
instance->GetPlug(_tr1->GetNet(Name("BULK")))->SetNet(bulk); instance->getPlug(_tr1->getNet(Name("BULK")))->SetNet(bulk);
else else
instance->GetPlug(_tr1->GetNet(Name("BULK")))->SetNet(source); instance->getPlug(_tr1->getNet(Name("BULK")))->SetNet(source);
} }
@ -156,28 +137,28 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
// ********************************************************************************* // *********************************************************************************
{ {
if( !_tr1 ) { if( !_tr1 ) {
throw Error("Can't Create Physical View for " + GetString(this) + throw Error("Can't Create Physical View for " + getString(this) +
" : " + "Logical view has't been created yet."); " : " + "Logical view has't been created yet.");
} }
// if( !(_transistorList.empty()) ) { // if( !(_transistorList.empty()) ) {
// throw Error("Can't Create Physical View of TrMos " + GetString(GetName()) + " : " // throw Error("Can't Create Physical View of TrMos " + getString(getName()) + " : "
// + "it has already been created"); // + "it has already been created");
// } // }
// Check out param of realization. // Check out param of realization.
// ******************************* // *******************************
if( m <= 0 ) if( m <= 0 )
throw Error("Can't generate for " + GetString(this) + " : m " throw Error("Can't generate for " + getString(this) + " : m "
+ GetString(m) + " is invalid."); + getString(m) + " is invalid.");
if(nbsourcecolumn<1) if(nbsourcecolumn<1)
throw Error("Can't generate for " + GetString(this) throw Error("Can't generate for " + getString(this)
+ " : nbsourcecolumn " + GetString(nbsourcecolumn) + " is invalid."); + " : nbsourcecolumn " + getString(nbsourcecolumn) + " is invalid.");
if(nbdraincolumn<1) if(nbdraincolumn<1)
throw Error("Can't generate for" + GetString(this) + " : nbdraincolumn " throw Error("Can't generate for" + getString(this) + " : nbdraincolumn "
+ GetString(nbdraincolumn) + " is invalid."); + getString(nbdraincolumn) + " is invalid.");
if(!(_transistorList.empty())) { if(!(_transistorList.empty())) {
@ -190,10 +171,10 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
// Motifs are in the same library than Trmos // Motifs are in the same library than Trmos
// ***************************************** // *****************************************
Library * library = GetLibrary(); Library * library = getLibrary();
cout << ts << "################################################################" << endl << cout << ts << "################################################################" << endl <<
ts << "#### BEGIN AUTOGENERATON FOR " + _GetTypeName() + " " + GetString(GetName()) + " #####" << endl << ts << "#### BEGIN AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" << endl <<
ts << "################################################################" << endl << endl; ts << "################################################################" << endl << endl;
// OpenUpdateSession(); // OpenUpdateSession();
@ -201,7 +182,7 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
/* (1) */ /* (1) */
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 1 : CreateLayout of " + GetString(this) + " Begin ***" <<endl; cout << "*** Stage 1 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF END_IF
// Create Motifs according to m, and instance the Motifs according // Create Motifs according to m, and instance the Motifs according
@ -212,35 +193,35 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
_tr1->SetM(_m); _tr1->SetM(_m);
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); _type);
_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);
} }
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 1 : CreateLayout of " + GetString(this) + " finish ***" <<endl; cout << "*** Stage 1 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << ts << GetString(_tr1) + " 's M is " + GetString(_tr1->GetM()) + ".\n" cout << ts << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n"
<< ts << GetString(_m) + " Transistors are created.\n" <<endl; << ts << getString(_m) + " Transistors are created.\n" <<endl;
END_IF END_IF
/* (2) */ /* (2) */
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 2 : CreateLayout of " + GetString(this) + " Begin ***" <<endl; cout << "*** Stage 2 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF END_IF
// Create connexion for each MetaTransistor. // Create connexion for each MetaTransistor.
// ***************************************** // *****************************************
_tr1->CreateConnection(); _tr1->createConnection();
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 2 : CreateLayout of " + GetString(this) + " finish ***" <<endl; cout << "*** Stage 2 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << " The connection in " + GetString(_tr1) + " is created.\n" cout << " The connection in " + getString(_tr1) + " is created.\n"
<<endl; <<endl;
END_IF END_IF
@ -252,16 +233,16 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
/* (3) */ /* (3) */
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + GetString(this) + " Begin ***" <<endl; cout << "*** Stage 3 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF END_IF
// Set dessin Parameter of generation for each finger. // Set dessin Parameter of generation for each finger.
// *************************************************** // ***************************************************
double l_finger = _tr1->GetLe() ; double l_finger = _tr1->getLe() ;
double w_finger = (_tr1->GetWe()) / (double)(_tr1->GetM()) ; double w_finger = (_tr1->getWe()) / (double)(_tr1->getM()) ;
unsigned count = 0; unsigned count = 0;
Transistor::MaskV1Info * masqueinfo = Transistor::MaskV1Info::Create( l_finger, w_finger); Transistor::MaskV1Info * masqueinfo = new Transistor::MaskV1Info(l_finger, w_finger);
masqueinfo->SetNbSourceColumn(nbsourcecolumn); masqueinfo->SetNbSourceColumn(nbsourcecolumn);
masqueinfo->SetNbDrainColumn(nbdraincolumn); masqueinfo->SetNbDrainColumn(nbdraincolumn);
@ -303,19 +284,19 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
} }
} }
masqueinfo->Delete(); delete masqueinfo;
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + GetString(this) + " finish ***" <<endl; cout << "*** Stage 3 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << ts << "Real l_finger is " + GetString(l_finger) + "." << endl cout << ts << "Real l_finger is " + getString(l_finger) + "." << endl
<< ts << "Real w_finger is " + GetString(w_finger) + "." << endl << ts << "Real w_finger is " + getString(w_finger) + "." << endl
<<endl; <<endl;
END_IF END_IF
/* (4) */ /* (4) */
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + GetString(this) + " Begin ***" <<endl; cout << "*** Stage 4 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
cout << ts << "Call GenerateLayout for " + GetString(_tr1) cout << ts << "Call GenerateLayout for " + getString(_tr1)
+ " who will launch the generator of its fingers" << ".\n" + " who will launch the generator of its fingers" << ".\n"
<<endl; <<endl;
END_IF END_IF
@ -327,15 +308,15 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
// //
// IF_DEBUG_HUR_ANALOG // IF_DEBUG_HUR_ANALOG
// cout << endl; // cout << endl;
// cout << ts << "Real l of " << (long)_tr1 << GetString(_tr1) + " is " + GetString(_tr1->_le) + "." << endl // cout << ts << "Real l of " << (long)_tr1 << getString(_tr1) + " is " + getString(_tr1->_le) + "." << endl
// << ts << "Real w of " << (long)_tr1 << GetString(_tr1) + " is " + GetString(_tr1->_we) + "." << endl // << ts << "Real w of " << (long)_tr1 << getString(_tr1) + " is " + getString(_tr1->_we) + "." << endl
// <<endl; // <<endl;
// END_IF // END_IF
// //
_tr1->CreateLayout(); _tr1->createLayout();
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + GetString(this) + " finish ***"<<endl cout << "*** Stage 4 : CreateLayout of " + getString(this) + " finish ***"<<endl
<< endl; << endl;
END_IF END_IF
@ -348,13 +329,13 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
cout << " Place And Route " <<endl; cout << " Place And Route " <<endl;
for_each_instance(instance, GetInstances()) for_each_instance(instance, getInstances())
//instance->SetTransformation(instance->GetTransformation()); //instance->SetTransformation(instance->getTransformation());
instance->Unmaterialize(); instance->Unmaterialize();
instance->Materialize(); instance->Materialize();
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << GetString(instance) <<" 's boundingBox is " << GetString(instance->GetBoundingBox())<<endl; cout << ts << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<<endl;
END_IF END_IF
end_for end_for
@ -362,18 +343,18 @@ END_IF
// CloseUpdateSession(); // CloseUpdateSession();
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << GetString(this) << " 's primary (without wire) boundingBox is " << GetString(GetBoundingBox()) <<endl; cout << ts << getString(this) << " 's primary (without wire) boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF END_IF
Materialize(); Materialize();
IF_DEBUG_HUR_ANALOG IF_DEBUG_HUR_ANALOG
cout << ts << GetString(this) << " 's boundingBox is " << GetString(GetBoundingBox()) <<endl; cout << ts << getString(this) << " 's boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF END_IF
cout << ts << endl cout << ts << endl
<< ts << "################################################################" <<endl << ts << "################################################################" <<endl
<< ts << "#### END AUTOGENERATON FOR " + _GetTypeName() + " " + GetString(GetName()) + " #####" <<endl << ts << "#### END AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" <<endl
<< ts << "################################################################" <<endl << ts << "################################################################" <<endl
<< endl; << endl;
} }
@ -418,7 +399,7 @@ void TrMos::_Flush()
// **************** // ****************
{ {
if(_transistorList.empty()) { if(_transistorList.empty()) {
throw Error("Can't delete Physical View of TrMos " + GetString(GetName()) + " : " + "il doesn't exist"); throw Error("Can't delete Physical View of TrMos " + getString(getName()) + " : " + "il doesn't exist");
} }
_tr1->Flush(); _tr1->Flush();
@ -433,17 +414,17 @@ void TrMos::_Flush()
} }
string TrMos::_GetString() const string TrMos::_getString() const
// *************************************** // ***************************************
{ {
string s= Inherit::_GetString(); string s= Inherit::_getString();
return s; return s;
} }
Record* TrMos::_GetRecord() const Record* TrMos::_getRecord() const
// ********************************* // *********************************
{ {
Record* record = Inherit::_GetRecord(); Record* record = Inherit::_getRecord();
return record; return record;
} }

View File

@ -85,19 +85,13 @@ class TrMos : public Device {
// Constructors // Constructors
// ************ // ************
protected : TrMos(Library* library, const Name& name); protected : TrMos(Library* library, const Name& name);
protected : virtual void _PostCreate(); protected : virtual void _postCreate();
#endif #endif
public : static TrMos* Create(Library* library, const Name & name); public : static TrMos* create(Library* library, const Name & name);
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
// Destructors
// ***********
protected : ~TrMos() {};
public : virtual void Delete();
protected : virtual void _PreDelete();
// Operations // Operations
// ********** // **********
@ -106,18 +100,18 @@ class TrMos : public Device {
#endif #endif
public : void Create(const char type, const bool isbsconnected); 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); const unsigned nbsourcecolumn, const unsigned nbdraincolumn);
// Accessors // Accessors
// ********* // *********
public : char GetType() const { return _type; }; public : char getType() const { return _type; };
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; };
public : MetaTransistor* GetTr1() const { return _tr1; }; public : MetaTransistor* getTr1() const { return _tr1; };
public : Transistors GetTransistors() const ; public : Transistors getTransistors() const ;
// Updators // Updators
// ******** // ********
@ -139,15 +133,15 @@ class TrMos : public Device {
// Others // Others
// ****** // ******
public: virtual string _GetTypeName() const {return _TName("TrMos"); }; public: virtual string _getTypeName() const {return _TName("TrMos"); };
public: virtual string _GetString() const; public: virtual string _getString() const;
public: virtual Record* _GetRecord() const; public: virtual Record* _getRecord() const;
public: vector<PinName>& GetLowPinOrder() { return _lowPinOrder; }; public: vector<PinName>& getLowPinOrder() { return _lowPinOrder; };
public: vector<PinName>& GetHighPinOrder() { return _highPinOrder; }; public: vector<PinName>& getHighPinOrder() { return _highPinOrder; };
public: map<Net*, Pin*>& GetMapNetToPinBoxInLeftSide() { return _mapNetToPinBoxInLeftSide; }; public: map<Net*, Pin*>& getMapNetToPinBoxInLeftSide() { return _mapNetToPinBoxInLeftSide; };
public: map<Net*, Pin*>& GetMapNetToPinBoxInRightSide() { return _mapNetToPinBoxInRightSide; }; public: map<Net*, Pin*>& getMapNetToPinBoxInRightSide() { return _mapNetToPinBoxInRightSide; };
public : virtual void _Flush(); public : virtual void _Flush();
protected : void _PlaceAndRoute(); protected : void _PlaceAndRoute();

View File

@ -40,7 +40,7 @@ void TrMos::_PlaceAndRoute()
// ************************* // *************************
{ {
// Get Dtr Rules And Calculate the Size of AbutmentBox of Device. // get Dtr Rules And Calculate the Size of AbutmentBox of Device.
// ************************************************************** // **************************************************************
DtrAccess * dtraccess = DtrAccess::Instance(); DtrAccess * dtraccess = DtrAccess::Instance();
@ -48,19 +48,19 @@ void TrMos::_PlaceAndRoute()
if(_type == 'P') type = 'N'; if(_type == 'P') type = 'N';
else type = 'P'; else type = 'P';
long minImpWidth = dtraccess->GetSingleRdsRuleByLabel("RW_", GetString(type), "IMP"); long minImpWidth = dtraccess->getSingleRdsRuleByLabel("RW_", getString(type), "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"));
long rdImp = dtraccess->GetSingleRdsRuleByLabel(string("RD_NIMP")); long rdImp = dtraccess->getSingleRdsRuleByLabel(string("RD_NIMP"));
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(type), "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");
long minActiWidth = 2*reActiContact + minContWidth; long minActiWidth = 2*reActiContact + minContWidth;
@ -85,19 +85,19 @@ void TrMos::_PlaceAndRoute()
Instance * leftins = NULL; Instance * leftins = NULL;
Instance * rightins = NULL; Instance * rightins = NULL;
OccurrenceLocator locator = GetLeafInstanceOccurrences().GetLocator(); OccurrenceLocator locator = getLeafInstanceOccurrences().getLocator();
Instance * instance = dynamic_cast<Instance*>(locator.GetElement().GetEntity());; Instance * instance = dynamic_cast<Instance*>(locator.getElement().getEntity());;
fingerHeight = instance->GetCell()->GetBoundingBox().getHeight(); fingerHeight = instance->getCell()->getBoundingBox().getHeight();
horizontalMargin = GetUnit(RETURN_EVEN((long)(GetValue(fingerHeight))/4)); horizontalMargin = getUnit(RETURN_EVEN((long)(getValue(fingerHeight))/4));
verticalLowMargin = GetUnit(RETURN_EVEN((long)(GetValue(fingerHeight))/2)); verticalLowMargin = getUnit(RETURN_EVEN((long)(getValue(fingerHeight))/2));
verticalHighMargin = GetUnit(RETURN_EVEN((long)(GetValue(fingerHeight))/2)); verticalHighMargin = getUnit(RETURN_EVEN((long)(getValue(fingerHeight))/2));
verticalLowMargin = MAX_INTEGER(verticalLowMargin, GetUnit(RETURN_EVEN(rdImp + widthOfImp/2 + widthOfSourceWire verticalLowMargin = MAX_INTEGER(verticalLowMargin, getUnit(RETURN_EVEN(rdImp + widthOfImp/2 + widthOfSourceWire
+ rdAlu2 + widthOfActive + rdActive)) ); + rdAlu2 + widthOfActive + rdActive)) );
verticalHighMargin = MAX_INTEGER(verticalHighMargin, horizontalMargin + GetUnit(2*rdAlu2 + 2*widthOfDrainWire) ); verticalHighMargin = MAX_INTEGER(verticalHighMargin, horizontalMargin + getUnit(2*rdAlu2 + 2*widthOfDrainWire) );
horizontalMargin = MAX_INTEGER(horizontalMargin, GetUnit(RETURN_EVEN(rdImp + widthOfImp/2)) ); horizontalMargin = MAX_INTEGER(horizontalMargin, getUnit(RETURN_EVEN(rdImp + widthOfImp/2)) );
OpenUpdateSession(); OpenUpdateSession();
@ -108,11 +108,11 @@ void TrMos::_PlaceAndRoute()
} }
else { else {
// Get instance who's model's abutment type is Left or Right. // get instance who's model's abutment type is Left or Right.
// ************************************************************ // ************************************************************
for_each_occurrence(occurrence, GetLeafInstanceOccurrences()) for_each_occurrence(occurrence, getLeafInstanceOccurrences())
instance = dynamic_cast<Instance*>(occurrence.GetEntity()); instance = dynamic_cast<Instance*>(occurrence.getEntity());
Transistor * trans = dynamic_cast<Transistor*>(instance->GetMasterCell()); Transistor * trans = dynamic_cast<Transistor*>(instance->getMasterCell());
if ( _sourceIsFirst ) { if ( _sourceIsFirst ) {
if(trans->IsLeft() && !leftins) if(trans->IsLeft() && !leftins)
@ -152,9 +152,9 @@ void TrMos::_PlaceAndRoute()
// Place internal finger. // Place internal finger.
// ********************* // *********************
for_each_occurrence(occurrence, GetLeafInstanceOccurrences()) for_each_occurrence(occurrence, getLeafInstanceOccurrences())
Instance * instance = dynamic_cast<Instance*>(occurrence.GetEntity()); Instance * instance = dynamic_cast<Instance*>(occurrence.getEntity());
if(instance==leftins || instance==rightins ) if(instance==leftins || instance==rightins )
continue; continue;
@ -170,7 +170,7 @@ void TrMos::_PlaceAndRoute()
// Place the last finger. // Place the last finger.
// ********************** // **********************
Transistor * trans = dynamic_cast<Transistor*>(rightins->GetMasterCell()); Transistor * trans = dynamic_cast<Transistor*>(rightins->getMasterCell());
if( trans->IsRight()) if( trans->IsRight())
_PlaceRight( rightins, Transformation::Orientation::ID); _PlaceRight( rightins, Transformation::Orientation::ID);
@ -185,7 +185,7 @@ void TrMos::_PlaceAndRoute()
// Set AbutmentBox. // Set AbutmentBox.
// **************** // ****************
for_each_instance(instance, GetInstances()) for_each_instance(instance, getInstances())
instance->Unmaterialize(); instance->Unmaterialize();
instance->Materialize(); instance->Materialize();
end_for end_for
@ -193,11 +193,11 @@ void TrMos::_PlaceAndRoute()
OpenUpdateSession(); OpenUpdateSession();
cout <<"Bounding box of TrMos is "<<GetString(GetBoundingBox())<<endl; cout <<"Bounding box of TrMos is "<<getString(getBoundingBox())<<endl;
SetAbutmentBox(Box(0, 0, SetAbutmentBox(Box(0, 0,
GetBoundingBox().getWidth() + 2*horizontalMargin, getBoundingBox().getWidth() + 2*horizontalMargin,
GetBoundingBox().getHeight() + verticalLowMargin + verticalHighMargin getBoundingBox().getHeight() + verticalLowMargin + verticalHighMargin
) )
); );
@ -206,9 +206,9 @@ void TrMos::_PlaceAndRoute()
// Routing . // Routing .
// ************************************************************** // **************************************************************
Unit expectedInterval = GetUnit(RETURN_EVEN((long)(GetValue(horizontalMargin))/2)); Unit expectedInterval = getUnit(RETURN_EVEN((long)(getValue(horizontalMargin))/2));
Unit interval = 0; Unit interval = 0;
Unit initialPosition = verticalLowMargin + fingerHeight + GetUnit(rdAlu2 + widthOfDrainWire/2); Unit initialPosition = verticalLowMargin + fingerHeight + getUnit(rdAlu2 + widthOfDrainWire/2);
map<string, Unit> netName2PositionOfConnectorMap; map<string, Unit> netName2PositionOfConnectorMap;
list<Box> routingZoneList; list<Box> routingZoneList;
@ -217,28 +217,28 @@ void TrMos::_PlaceAndRoute()
Unit sourceRoutingZoneWidth; Unit sourceRoutingZoneWidth;
Unit drainRoutingZoneWidth; Unit drainRoutingZoneWidth;
DataBase * db = GetDataBase(); DataBase * db = getDataBase();
if(!db) throw Error("Can't launch Trmos::PlaceAndRoute for " + GetString(this) + " : can't find DataBase"); if(!db) throw Error("Can't launch Trmos::PlaceAndRoute for " + getString(this) + " : can't find DataBase");
Layer * layerAlu1 = db->GetTechnology()->GetLayer(Name("ALU1")); Layer * layerAlu1 = db->getTechnology()->getLayer(Name("ALU1"));
Layer * layerAlu2 = db->GetTechnology()->GetLayer(Name("ALU2")); Layer * layerAlu2 = db->getTechnology()->getLayer(Name("ALU2"));
Layer * layerVia1 = db->GetTechnology()->GetLayer(Name("VIA1")); Layer * layerVia1 = db->getTechnology()->getLayer(Name("VIA1"));
Layer * layerActive = db->GetTechnology()->GetLayer(Name("ACTIVE")); Layer * layerActive = db->getTechnology()->getLayer(Name("ACTIVE"));
Layer * layerVia01 = db->GetTechnology()->GetLayer(Name("via01")); Layer * layerVia01 = db->getTechnology()->getLayer(Name("via01"));
Layer * layerVia12 = db->GetTechnology()->GetLayer(Name("via12")); Layer * layerVia12 = db->getTechnology()->getLayer(Name("via12"));
Layer * layerPoly = db->GetTechnology()->GetLayer(Name("POLY")); Layer * layerPoly = db->getTechnology()->getLayer(Name("POLY"));
Layer * layerNwell = db->GetTechnology()->GetLayer(Name("NWELL")); Layer * layerNwell = db->getTechnology()->getLayer(Name("NWELL"));
Layer * layerCont = db->GetTechnology()->GetLayer(Name("CONT")); Layer * layerCont = db->getTechnology()->getLayer(Name("CONT"));
Layer * layerImp = NULL; Layer * layerImp = NULL;
if(_type == 'P') if(_type == '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"));
Pin * pin = NULL; // For get the adresse of Created Pins. Pin * pin = NULL; // For get the adresse of Created Pins.
@ -259,7 +259,7 @@ void TrMos::_PlaceAndRoute()
if(*i == G) if(*i == G)
netName2PositionOfConnectorMap[string("grid")] = initialPosition; netName2PositionOfConnectorMap[string("grid")] = initialPosition;
interval = MAX_INTEGER(expectedInterval, GetUnit(widthOfDrainWire + rdAlu2)); interval = MAX_INTEGER(expectedInterval, getUnit(widthOfDrainWire + rdAlu2));
// initialPosition += horizontalMargin/2; // initialPosition += horizontalMargin/2;
initialPosition += interval; initialPosition += interval;
@ -270,8 +270,8 @@ void TrMos::_PlaceAndRoute()
n = _lowPinOrder.end(); n = _lowPinOrder.end();
//initialPosition = verticalMargin - horizontalMargin/2; //initialPosition = verticalMargin - horizontalMargin/2;
//initialPosition = verticalLowMargin - MAX_INTEGER(expectedInterval, GetUnit(rdImp + widthOfImp/2)); //initialPosition = verticalLowMargin - MAX_INTEGER(expectedInterval, getUnit(rdImp + widthOfImp/2));
initialPosition = verticalLowMargin - GetUnit(rdImp + widthOfImp/2); initialPosition = verticalLowMargin - getUnit(rdImp + widthOfImp/2);
while(m!=n) { while(m!=n) {
if(*m == S) if(*m == S)
@ -279,7 +279,7 @@ void TrMos::_PlaceAndRoute()
if(*m == B) if(*m == B)
netName2PositionOfConnectorMap[string("bulk")] = initialPosition; netName2PositionOfConnectorMap[string("bulk")] = initialPosition;
interval = MAX_INTEGER(expectedInterval, GetUnit(rdAlu2 + widthOfSourceWire)); interval = MAX_INTEGER(expectedInterval, getUnit(rdAlu2 + widthOfSourceWire));
initialPosition -= interval; initialPosition -= interval;
m++; m++;
@ -292,38 +292,38 @@ void TrMos::_PlaceAndRoute()
// Main Loop. // Main Loop.
// ********** // **********
for_each_net(net, GetNets()) // For all hypernets. for_each_net(net, getNets()) // For all hypernets.
if(GetString(net->GetName())=="bulk" || GetString(net->GetName())=="BULK" ) if(getString(net->getName())=="bulk" || getString(net->getName())=="BULK" )
continue; continue;
// Get Routing Zone. // get Routing Zone.
// ***************** // *****************
HyperNet hyperNet(Occurrence(net, Path())); HyperNet hyperNet(Occurrence(net, Path()));
for_each_occurrence(occurrence, hyperNet.GetNetOccurrences()) // For all net occurrences. for_each_occurrence(occurrence, hyperNet.getNetOccurrences()) // For all net occurrences.
Net * net = dynamic_cast<Net*>(occurrence.GetEntity()); Net * net = dynamic_cast<Net*>(occurrence.getEntity());
Box routingZone; Box routingZone;
if(net->GetCell()->IsLeaf()) { if(net->getCell()->IsLeaf()) {
Transistor * trans = dynamic_cast<Transistor*>(net->GetCell()); Transistor * trans = dynamic_cast<Transistor*>(net->getCell());
if ( !trans ) if ( !trans )
throw Error("Can't launch Trmos::PlaceAndRoute for " + GetString(this) throw Error("Can't launch Trmos::PlaceAndRoute for " + getString(this)
+ ", it is not a Transistor"); + ", it is not a Transistor");
cout << GetString(occurrence) << endl; cout << getString(occurrence) << endl;
cout << GetString(occurrence.GetPath().GetTransformation()) <<endl; cout << getString(occurrence.getPath().getTransformation()) <<endl;
cout << GetString((*(trans->_GetMapNet2Box()))[net]) << endl; cout << getString((*(trans->_getMapNet2Box()))[net]) << endl;
// Get Routing Zone. // get Routing Zone.
// ***************** // *****************
routingZone = occurrence.GetPath().GetTransformation().getBox((*(trans->_GetMapNet2Box()))[net]); routingZone = occurrence.getPath().getTransformation().getBox((*(trans->_getMapNet2Box()))[net]);
routingZoneList.push_back(routingZone); routingZoneList.push_back(routingZone);
if(GetString(net->GetName())=="SOURCE") { if(getString(net->getName())=="SOURCE") {
sourcePositionList.push_back(routingZone.getXCenter()); sourcePositionList.push_back(routingZone.getXCenter());
sourceRoutingZoneWidth = routingZone.getWidth(); sourceRoutingZoneWidth = routingZone.getWidth();
} }
else if (GetString(net->GetName())=="DRAIN") { else if (getString(net->getName())=="DRAIN") {
drainPositionList.push_back(routingZone.getXCenter()); drainPositionList.push_back(routingZone.getXCenter());
drainRoutingZoneWidth = routingZone.getWidth(); drainRoutingZoneWidth = routingZone.getWidth();
} }
@ -332,26 +332,26 @@ void TrMos::_PlaceAndRoute()
end_for end_for
cout <<"Print routing zone for " <<GetString(net)<<endl; cout <<"Print routing zone for " <<getString(net)<<endl;
list<Box>::iterator it_begin_listbox = routingZoneList.begin(), list<Box>::iterator it_begin_listbox = routingZoneList.begin(),
it_end_listbox = routingZoneList.end(); it_end_listbox = routingZoneList.end();
while(it_begin_listbox != it_end_listbox) while(it_begin_listbox != it_end_listbox)
{ {
cout<< GetString(*it_begin_listbox) <<endl; cout<< getString(*it_begin_listbox) <<endl;
it_begin_listbox++; it_begin_listbox++;
} }
cout <<"End Print Routing Zone for "<<GetString(net)<<endl; cout <<"End Print Routing Zone for "<<getString(net)<<endl;
// Create routing line. // Create routing line.
// ******************** // ********************
list<Box>::iterator routingzonelist_begin_it = routingZoneList.begin(), list<Box>::iterator routingzonelist_begin_it = routingZoneList.begin(),
routingzonelist_end_it = routingZoneList.end(); routingzonelist_end_it = routingZoneList.end();
connectorPosition = netName2PositionOfConnectorMap[GetString(net->GetName())]; connectorPosition = netName2PositionOfConnectorMap[getString(net->getName())];
cout << "Connector Position is " << netName2PositionOfConnectorMap[GetString(net)] << endl; cout << "Connector Position is " << netName2PositionOfConnectorMap[getString(net)] << endl;
while(routingzonelist_begin_it!=routingzonelist_end_it) { while(routingzonelist_begin_it!=routingzonelist_end_it) {
@ -360,22 +360,22 @@ void TrMos::_PlaceAndRoute()
// Create vertical line and Contact. // Create vertical line and Contact.
// ******************************** // ********************************
if(connectorPosition > routingZoneBox.getYMin()) { if(connectorPosition > routingZoneBox.getYMin()) {
Vertical::Create(net, layerAlu1, routingZoneBox.getXCenter() Vertical::create(net, layerAlu1, routingZoneBox.getXCenter()
, routingZoneBox.getWidth() + GetUnit(2*reAlu1Contact) , routingZoneBox.getWidth() + getUnit(2*reAlu1Contact)
, routingZoneBox.getYMin() - GetUnit(reAlu1Contact) , routingZoneBox.getYMin() - getUnit(reAlu1Contact)
, connectorPosition); , connectorPosition);
} }
else { else {
Vertical::Create(net, layerAlu1, routingZoneBox.getXCenter() Vertical::create(net, layerAlu1, routingZoneBox.getXCenter()
, routingZoneBox.getWidth() + GetUnit(2*reAlu1Contact) , routingZoneBox.getWidth() + getUnit(2*reAlu1Contact)
, connectorPosition , connectorPosition
, routingZoneBox.getYMax() + GetUnit(reAlu1Contact) ) ; , routingZoneBox.getYMax() + getUnit(reAlu1Contact) ) ;
} }
Contact::Create(net, layerVia12, routingZoneBox.getXCenter() Contact::create(net, layerVia12, routingZoneBox.getXCenter()
, connectorPosition , connectorPosition
, GetUnit(minVia1Width) , getUnit(minVia1Width)
, GetUnit(minVia1Width) , getUnit(minVia1Width)
); );
routingzonelist_begin_it ++ ; routingzonelist_begin_it ++ ;
@ -385,44 +385,44 @@ void TrMos::_PlaceAndRoute()
// *********************** // ***********************
long widthOfWire = 0; long widthOfWire = 0;
if(GetString(net->GetName())=="source") if(getString(net->getName())=="source")
widthOfWire = widthOfSourceWire; widthOfWire = widthOfSourceWire;
else if(GetString(net->GetName())=="drain") else if(getString(net->getName())=="drain")
widthOfWire = widthOfDrainWire; widthOfWire = widthOfDrainWire;
else else
widthOfWire = widthOfDrainWire; widthOfWire = widthOfDrainWire;
Horizontal::Create(net, layerAlu2, connectorPosition Horizontal::create(net, layerAlu2, connectorPosition
, GetUnit(widthOfWire) , getUnit(widthOfWire)
, 0 , 0
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
); );
// Create Two Pins. // Create Two Pins.
// **************** // ****************
pin = Pin::Create(net pin = Pin::create(net
, Name(GetString(net->GetName())+"_west") , Name(getString(net->getName())+"_west")
, Pin::AccessDirection(Pin::AccessDirection::WEST) , Pin::AccessDirection(Pin::AccessDirection::WEST)
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED) , Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
, layerAlu2 , layerAlu2
, GetAbutmentBox().getXMin() , getAbutmentBox().getXMin()
, connectorPosition , connectorPosition
, GetUnit(widthOfWire) , getUnit(widthOfWire)
, GetUnit(widthOfWire) , getUnit(widthOfWire)
); );
_mapNetToPinBoxInLeftSide[net] = pin; _mapNetToPinBoxInLeftSide[net] = pin;
pin = Pin::Create(net pin = Pin::create(net
, Name(GetString(net->GetName())+"_east") , Name(getString(net->getName())+"_east")
, Pin::AccessDirection(Pin::AccessDirection::EAST) , Pin::AccessDirection(Pin::AccessDirection::EAST)
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED) , Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
, layerAlu2 , layerAlu2
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
, connectorPosition , connectorPosition
, GetUnit(widthOfWire) , getUnit(widthOfWire)
, GetUnit(widthOfWire) , getUnit(widthOfWire)
); );
_mapNetToPinBoxInRightSide[net] = pin; _mapNetToPinBoxInRightSide[net] = pin;
@ -437,10 +437,10 @@ void TrMos::_PlaceAndRoute()
// *************** // ***************
connectorPosition = netName2PositionOfConnectorMap[string("bulk")]; connectorPosition = netName2PositionOfConnectorMap[string("bulk")];
Net * netBulk = GetNet(Name("bulk")); Net * netBulk = getNet(Name("bulk"));
if(!netBulk) // bulk and source are connected. if(!netBulk) // bulk and source are connected.
netBulk = GetNet(Name("source")); netBulk = getNet(Name("source"));
// Calculate the width of Contact Alu1. // Calculate the width of Contact Alu1.
// ************************************ // ************************************
@ -449,56 +449,56 @@ void TrMos::_PlaceAndRoute()
Unit bulkPosition = netName2PositionOfConnectorMap[string("bulk")]; Unit bulkPosition = netName2PositionOfConnectorMap[string("bulk")];
Unit sourcePosition = netName2PositionOfConnectorMap[string("source")]; Unit sourcePosition = netName2PositionOfConnectorMap[string("source")];
Horizontal::Create( netBulk Horizontal::create( netBulk
, layerImp , layerImp
, bulkPosition , bulkPosition
, GetUnit(widthOfImp) , getUnit(widthOfImp)
, 0 - GetUnit(reImpActi) , 0 - getUnit(reImpActi)
, GetAbutmentBox().getXMax() + GetUnit(reImpActi) , getAbutmentBox().getXMax() + getUnit(reImpActi)
); );
Horizontal::Create( netBulk Horizontal::create( netBulk
, layerActive , layerActive
, bulkPosition , bulkPosition
, GetUnit(widthOfActive) , getUnit(widthOfActive)
, 0 , 0
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
); );
Horizontal::Create( netBulk Horizontal::create( netBulk
, layerAlu2 , layerAlu2
, bulkPosition , bulkPosition
, GetUnit(widthOfSourceWire) , getUnit(widthOfSourceWire)
, 0 , 0
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
); );
// Create Two Pins For Net bulk. // Create Two Pins For Net bulk.
// ***************************** // *****************************
if(!_isBsConnected) { if(!_isBsConnected) {
pin = Pin::Create(netBulk pin = Pin::create(netBulk
, Name(GetString(netBulk->GetName())+"_west") , Name(getString(netBulk->getName())+"_west")
, Pin::AccessDirection(Pin::AccessDirection::WEST) , Pin::AccessDirection(Pin::AccessDirection::WEST)
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED) , Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
, layerAlu2 , layerAlu2
, GetAbutmentBox().getXMin() , getAbutmentBox().getXMin()
, bulkPosition , bulkPosition
, GetUnit(widthOfSourceWire) , getUnit(widthOfSourceWire)
, GetUnit(widthOfSourceWire) , getUnit(widthOfSourceWire)
); );
_mapNetToPinBoxInLeftSide[netBulk] = pin; _mapNetToPinBoxInLeftSide[netBulk] = pin;
pin = Pin::Create(netBulk pin = Pin::create(netBulk
, Name(GetString(netBulk->GetName())+"_east") , Name(getString(netBulk->getName())+"_east")
, Pin::AccessDirection(Pin::AccessDirection::EAST) , Pin::AccessDirection(Pin::AccessDirection::EAST)
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED) , Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
, layerAlu2 , layerAlu2
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
, bulkPosition , bulkPosition
, GetUnit(widthOfSourceWire) , getUnit(widthOfSourceWire)
, GetUnit(widthOfSourceWire) , getUnit(widthOfSourceWire)
); );
_mapNetToPinBoxInRightSide[netBulk] = pin; _mapNetToPinBoxInRightSide[netBulk] = pin;
@ -516,29 +516,29 @@ void TrMos::_PlaceAndRoute()
cout << " ######### Create Contact ###########" <<endl; cout << " ######### Create Contact ###########" <<endl;
Contact::Create(netBulk, layerVia01, *i Contact::create(netBulk, layerVia01, *i
, bulkPosition , bulkPosition
, GetUnit(minContWidth) , getUnit(minContWidth)
, GetUnit(minContWidth) , getUnit(minContWidth)
); );
Contact::Create(netBulk, layerAlu1, *i Contact::create(netBulk, layerAlu1, *i
, bulkPosition , bulkPosition
, GetUnit(widthOfAlu1) , getUnit(widthOfAlu1)
, GetUnit(widthOfAlu1) , getUnit(widthOfAlu1)
); );
Contact::Create(netBulk, layerVia12, *i Contact::create(netBulk, layerVia12, *i
, bulkPosition , bulkPosition
, GetUnit(minVia1Width) , getUnit(minVia1Width)
, GetUnit(minVia1Width) , getUnit(minVia1Width)
); );
if( _isBsConnected ) { // If bulk and Source are connected. if( _isBsConnected ) { // If bulk and Source are connected.
cout << " B S is connected in " << *i << endl; cout << " B S is connected in " << *i << endl;
Vertical::Create(netBulk, layerAlu1, *i Vertical::create(netBulk, layerAlu1, *i
, sourceRoutingZoneWidth , sourceRoutingZoneWidth
, bulkPosition , bulkPosition
, sourcePosition); , sourcePosition);
@ -565,22 +565,22 @@ void TrMos::_PlaceAndRoute()
cout << " ######### Create Contact ###########" <<endl; cout << " ######### Create Contact ###########" <<endl;
Contact::Create(netBulk, layerVia01, *i Contact::create(netBulk, layerVia01, *i
, bulkPosition , bulkPosition
, GetUnit(minContWidth) , getUnit(minContWidth)
, GetUnit(minContWidth) , getUnit(minContWidth)
); );
Contact::Create(netBulk, layerAlu1, *i Contact::create(netBulk, layerAlu1, *i
, bulkPosition , bulkPosition
, GetUnit(widthOfAlu1) , getUnit(widthOfAlu1)
, GetUnit(widthOfAlu1) , getUnit(widthOfAlu1)
); );
Contact::Create(netBulk, layerVia12, *i Contact::create(netBulk, layerVia12, *i
, bulkPosition , bulkPosition
, GetUnit(minVia1Width) , getUnit(minVia1Width)
, GetUnit(minVia1Width) , getUnit(minVia1Width)
); );
i++; i++;
@ -593,77 +593,77 @@ void TrMos::_PlaceAndRoute()
if( _hasRing ) { if( _hasRing ) {
widthOfImp = MAX_INTEGER(minImpWidth, minActiWidth + 2*reImpActi); widthOfImp = MAX_INTEGER(minImpWidth, minActiWidth + 2*reImpActi);
Net * netRing = Net::Create(this, Name("RING")); Net * netRing = Net::create(this, Name("RING"));
// Create rectangle in IMPLANT. // Create rectangle in IMPLANT.
// *************************** // ***************************
Horizontal::Create( netRing Horizontal::create( netRing
, layerImp , layerImp
, GetAbutmentBox().getYMax() , getAbutmentBox().getYMax()
, GetUnit(widthOfImp) , getUnit(widthOfImp)
, GetAbutmentBox().getXMin() - GetUnit(widthOfImp/2) , getAbutmentBox().getXMin() - getUnit(widthOfImp/2)
, GetAbutmentBox().getXMax() + GetUnit(widthOfImp/2) , getAbutmentBox().getXMax() + getUnit(widthOfImp/2)
); );
Horizontal::Create( netRing Horizontal::create( netRing
, layerImp , layerImp
, GetAbutmentBox().getYMin() , getAbutmentBox().getYMin()
, GetUnit(widthOfImp) , getUnit(widthOfImp)
, GetAbutmentBox().getXMin() - GetUnit(widthOfImp/2) , getAbutmentBox().getXMin() - getUnit(widthOfImp/2)
, GetAbutmentBox().getXMax() + GetUnit(widthOfImp/2) , getAbutmentBox().getXMax() + getUnit(widthOfImp/2)
); );
Vertical::Create(netRing Vertical::create(netRing
, layerImp , layerImp
, GetAbutmentBox().getXMin() , getAbutmentBox().getXMin()
, GetUnit(widthOfImp) , getUnit(widthOfImp)
, GetAbutmentBox().getYMin() , getAbutmentBox().getYMin()
, GetAbutmentBox().getYMax() , getAbutmentBox().getYMax()
); );
Vertical::Create(netRing Vertical::create(netRing
, layerImp , layerImp
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
, GetUnit(widthOfImp) , getUnit(widthOfImp)
, GetAbutmentBox().getYMin() , getAbutmentBox().getYMin()
, GetAbutmentBox().getYMax() , getAbutmentBox().getYMax()
); );
// Create rectangle in Active. // Create rectangle in Active.
// *************************** // ***************************
Horizontal::Create( netRing Horizontal::create( netRing
, layerActive , layerActive
, GetAbutmentBox().getYMax() , getAbutmentBox().getYMax()
, GetUnit(minActiWidth) , getUnit(minActiWidth)
, GetAbutmentBox().getXMin() - GetUnit(minActiWidth/2) , getAbutmentBox().getXMin() - getUnit(minActiWidth/2)
, GetAbutmentBox().getXMax() + GetUnit(minActiWidth/2) , getAbutmentBox().getXMax() + getUnit(minActiWidth/2)
); );
Horizontal::Create( netRing Horizontal::create( netRing
, layerActive , layerActive
, GetAbutmentBox().getYMin() , getAbutmentBox().getYMin()
, GetUnit(minActiWidth) , getUnit(minActiWidth)
, GetAbutmentBox().getXMin() - GetUnit(minActiWidth/2) , getAbutmentBox().getXMin() - getUnit(minActiWidth/2)
, GetAbutmentBox().getXMax() + GetUnit(minActiWidth/2) , getAbutmentBox().getXMax() + getUnit(minActiWidth/2)
); );
Vertical::Create(netRing Vertical::create(netRing
, layerActive , layerActive
, GetAbutmentBox().getXMin() , getAbutmentBox().getXMin()
, GetUnit(minActiWidth) , getUnit(minActiWidth)
, GetAbutmentBox().getYMin() , getAbutmentBox().getYMin()
, GetAbutmentBox().getYMax() , getAbutmentBox().getYMax()
); );
Vertical::Create(netRing Vertical::create(netRing
, layerActive , layerActive
, GetAbutmentBox().getXMax() , getAbutmentBox().getXMax()
, GetUnit(minActiWidth) , getUnit(minActiWidth)
, GetAbutmentBox().getYMin() , getAbutmentBox().getYMin()
, GetAbutmentBox().getYMax() , getAbutmentBox().getYMax()
); );
} }
@ -671,12 +671,12 @@ void TrMos::_PlaceAndRoute()
// Create Caission NWELL if this is a PMOS. // Create Caission NWELL if this is a PMOS.
// **************************************** // ****************************************
if(_type == 'P') { if(_type == '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()
, GetAbutmentBox().getYCenter() , getAbutmentBox().getYCenter()
, GetAbutmentBox().getWidth() , getAbutmentBox().getWidth()
, GetAbutmentBox().getHeight() , getAbutmentBox().getHeight()
); );
} }

View File

@ -3,7 +3,8 @@ ADD_CUSTOM_TARGET(DTRParser echo "Creating DTRParser")
SET(source_dir ${CHAMSIN_SOURCE_DIR}/src/dtr) SET(source_dir ${CHAMSIN_SOURCE_DIR}/src/dtr)
SET(binary_dir ${CHAMSIN_BINARY_DIR}/src/dtr) SET(binary_dir ${CHAMSIN_BINARY_DIR}/src/dtr)
INCLUDE_DIRECTORIES(${HURRICANE_INCLUDE_DIR} ${source_dir}) INCLUDE_DIRECTORIES(${HURRICANE_INCLUDE_DIR}
${CHAMSIN_SOURCE_DIR}/src/analogic ${source_dir})
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
SOURCE ${source_dir}/ParserDtrScan.ll SOURCE ${source_dir}/ParserDtrScan.ll

View File

@ -34,16 +34,16 @@ DtrAccess::DtrAccess()
} }
DtrAccess * DtrAccess::Create() { DtrAccess * DtrAccess::create() {
DtrAccess * dtraccess = new DtrAccess(); DtrAccess * dtraccess = new DtrAccess();
dtraccess->_PostCreate(); dtraccess->_postCreate();
return dtraccess; return dtraccess;
} }
void DtrAccess::_PostCreate() { void DtrAccess::_postCreate() {
const char* dtrFileName = getenv("DTR_FILE"); const char* dtrFileName = getenv("DTR_FILE");
if(!dtrFileName) { if(!dtrFileName) {
throw Error("Can't not get Macro DTR_FILE."); throw Error("Can't not get Macro DTR_FILE.");
@ -65,19 +65,19 @@ void DtrAccess::_PostCreate() {
} }
} }
// Get Objet Layer from Technology with its name. // get Objet Layer from Technology with its name.
// ********************************************** // **********************************************
DataBase* db = GetDataBase(); DataBase* db = getDataBase();
if(!db) { if(!db) {
throw Error("In GetV1Trans::Generate : can't find DataBase."); throw Error("In getV1Trans::Generate : can't find DataBase.");
} }
Technology* tech = db->GetTechnology(); Technology* tech = db->getTechnology();
if (!tech) { if (!tech) {
throw Error("In GetV1Trans::Generate : can't find Technology."); throw Error("In getV1Trans::Generate : can't find Technology.");
} }
@ -90,12 +90,12 @@ void DtrAccess::_PostCreate() {
n = (*it_layermap).second.end(); n = (*it_layermap).second.end();
while(m!=n) { while(m!=n) {
Layer * layer = tech->GetLayer(Name(*m)); Layer * layer = tech->getLayer(Name(*m));
if(!layer) { if(!layer) {
throw Error("Error : in function DtrAccess::_PostCreate , Can't find Layer " throw Error("Error : in function DtrAccess::_PostCreate , Can't find Layer "
+ GetString(*m) + " in technology file when parser DtrFile."); + getString(*m) + " in technology file when parser DtrFile.");
// cerr << Warning("In function DtrAccess::_PostCreate , Can't find Layer " // cerr << Warning("In function DtrAccess::_PostCreate , Can't find Layer "
// + GetString(*m) + " in technology file when parser DtrFile"); // + getString(*m) + " in technology file when parser DtrFile");
} }
_label2layerMap[(*it_layermap).first].push_back(layer); _label2layerMap[(*it_layermap).first].push_back(layer);
@ -114,19 +114,19 @@ DtrAccess * DtrAccess::Instance() {
if(!singleton_name) { // if MACRO IS INVALID if(!singleton_name) { // if MACRO IS INVALID
if(!_instance) { if(!_instance) {
_instance = DtrAccess::Create(); _instance = DtrAccess::create();
} }
} else { } else {
if(!_instance){ if(!_instance){
if( !(_instance=LookUp(string(singleton_name))) ) // if singleton hasn't been registered if( !(_instance=LookUp(string(singleton_name))) ) // if singleton hasn't been registered
_instance = DtrAccess::Create(); _instance = DtrAccess::create();
} }
} }
return _instance; return _instance;
} }
void DtrAccess::_PreDelete() void DtrAccess::_preDestroy()
// *********************** // ***********************
{ {
// Do something // Do something
@ -134,39 +134,39 @@ void DtrAccess::_PreDelete()
} }
void DtrAccess::Delete() void DtrAccess::destroy()
// ******************** // ********************
{ {
_PreDelete(); _preDestroy();
delete this; delete this;
} }
GenericCollection<double> DtrAccess::GetRuleByLabel(const string& label) const GenericCollection<double> DtrAccess::getRuleByLabel(const string& label) const
// *************************************************************************** // ***************************************************************************
{ {
map<string, list<double> >::const_iterator i = _label2ruleMap.find(label); map<string, list<double> >::const_iterator i = _label2ruleMap.find(label);
if(i==_label2ruleMap.end()) if(i==_label2ruleMap.end())
throw Error("Can't find in DtrFile rule the label : " + GetString(label)); throw Error("Can't find in DtrFile rule the label : " + getString(label));
return GetCollection((*i).second); return getCollection((*i).second);
} }
GenericCollection<long> DtrAccess::GetRdsRuleByLabel(const string& label) const GenericCollection<long> DtrAccess::getRdsRuleByLabel(const string& label) const
// ****************************************************************************** // ******************************************************************************
{ {
map<string, list<long> >::const_iterator i = _label2RdsRuleMap.find(label); map<string, list<long> >::const_iterator i = _label2RdsRuleMap.find(label);
if(i==_label2RdsRuleMap.end()) if(i==_label2RdsRuleMap.end())
throw Error("Can't find in DtrFile The Rds Value of Rule by label : " + GetString(label)); throw Error("Can't find in DtrFile The Rds Value of Rule by label : " + getString(label));
return GetCollection((*i).second); return getCollection((*i).second);
} }
GenericCollection<string> DtrAccess::GetLayerNamesByLabel(const string& label) const GenericCollection<string> DtrAccess::getLayerNamesByLabel(const string& label) const
// ********************************************************************************* // *********************************************************************************
{ {
map<string, list<string> >::const_iterator i = _label2layerNameMap.find(label); map<string, list<string> >::const_iterator i = _label2layerNameMap.find(label);
@ -174,11 +174,11 @@ GenericCollection<string> DtrAccess::GetLayerNamesByLabel(const string& label) c
if(i==_label2layerNameMap.end()) if(i==_label2layerNameMap.end())
throw Error("Can't find in DtrFile layers the label : " + label); throw Error("Can't find in DtrFile layers the label : " + label);
return GetCollection((*i).second); return getCollection((*i).second);
} }
GenericCollection<Layer*> DtrAccess::GetLayersByLabel(const string& label) const GenericCollection<Layer*> DtrAccess::getLayersByLabel(const string& label) const
// ****************************************************************************** // ******************************************************************************
{ {
map<string, list<Layer*> >::const_iterator i = _label2layerMap.find(label); map<string, list<Layer*> >::const_iterator i = _label2layerMap.find(label);
@ -186,11 +186,11 @@ GenericCollection<Layer*> DtrAccess::GetLayersByLabel(const string& label) const
if(i==_label2layerMap.end()) if(i==_label2layerMap.end())
throw Error("Can't find in DtrFile objet Layer by label : " + label ); throw Error("Can't find in DtrFile objet Layer by label : " + label );
return GetCollection((*i).second); return getCollection((*i).second);
} }
GenericCollection<double> DtrAccess::GetElectricalsByLabel(const string& label) const GenericCollection<double> DtrAccess::getElectricalsByLabel(const string& label) const
// ********************************************************************************** // **********************************************************************************
{ {
map<string, list<double> >::const_iterator i = _label2electricalMap.find(label); map<string, list<double> >::const_iterator i = _label2electricalMap.find(label);
@ -198,29 +198,29 @@ GenericCollection<double> DtrAccess::GetElectricalsByLabel(const string& label)
if(i==_label2electricalMap.end()) if(i==_label2electricalMap.end())
throw Error("Can't find in DtrFile electricals by label : " + label); throw Error("Can't find in DtrFile electricals by label : " + label);
return GetCollection((*i).second); return getCollection((*i).second);
} }
int DtrAccess::GetModellingByLabel(const string& label) const int DtrAccess::getModellingByLabel(const string& label) const
// ********************************************************** // **********************************************************
{ {
map<string, int>::const_iterator i = _label2modellingMap.find(label); map<string, int>::const_iterator i = _label2modellingMap.find(label);
if(i==_label2modellingMap.end()) if(i==_label2modellingMap.end())
throw Error("Can't find in DtrFile modelling by label : " + GetString(label)); throw Error("Can't find in DtrFile modelling by label : " + getString(label));
return (*i).second; return (*i).second;
} }
double DtrAccess::GetSimpleCapaMimByLabel(const string& label) const double DtrAccess::getSimpleCapaMimByLabel(const string& label) const
// **************************************************************** // ****************************************************************
{ {
map<string, double>::const_iterator i = _label2simplecapamimMap.find(label); map<string, double>::const_iterator i = _label2simplecapamimMap.find(label);
if(i==_label2simplecapamimMap.end()) if(i==_label2simplecapamimMap.end())
throw Error("Can't find in DtrFile simple capa mim by label : " + GetString(label)); throw Error("Can't find in DtrFile simple capa mim by label : " + getString(label));
return (*i).second; return (*i).second;
} }
@ -271,7 +271,7 @@ void DtrAccess::Register(const string& singletonname, DtrAccess* dtraccess)
} }
string DtrAccess::_GetString() const string DtrAccess::_getString() const
// ********************************** // **********************************
{ {
string s("Singleton DtrAccess"); string s("Singleton DtrAccess");
@ -279,10 +279,10 @@ string DtrAccess::_GetString() const
} }
Record* DtrAccess::_GetRecord() const Record* DtrAccess::_getRecord() const
// ********************************** // **********************************
{ {
Record* record = new Record(_GetString()); Record* record = new Record(_getString());
return record; return record;
} }
@ -292,10 +292,10 @@ END_NAMESPACE_HURRICANE
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
string GetString(const H::DtrAccess& access) string getString(const H::DtrAccess& access)
// ********************************************** // **********************************************
{ {
return access._GetString(); return access._getString();
} }

View File

@ -44,8 +44,8 @@ class DtrAccess {
private : DtrAccess(const DtrAccess&); private : DtrAccess(const DtrAccess&);
private : DtrAccess& operator=(const DtrAccess&); private : DtrAccess& operator=(const DtrAccess&);
protected : static DtrAccess * Create(); protected : static DtrAccess * create();
protected : virtual void _PostCreate(); protected : virtual void _postCreate();
# endif # endif
public : static DtrAccess* Instance(); public : static DtrAccess* Instance();
@ -54,11 +54,11 @@ class DtrAccess {
// *********** // ***********
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
protected : virtual ~DtrAccess() {}; protected : virtual ~DtrAccess() {};
protected : virtual void _PreDelete(); protected : virtual void _preDestroy();
# endif # endif
public : virtual void Delete(); public : virtual void destroy();
// Accessors // Accessors
@ -66,67 +66,67 @@ class DtrAccess {
// If can't find data , throw Hurricane::Error // If can't find data , throw Hurricane::Error
// ******************************************* // *******************************************
public : GenericCollection<double> GetRuleByLabel(const string&) const; public : GenericCollection<double> getRuleByLabel(const string&) const;
public : GenericCollection<long> GetRdsRuleByLabel(const string&) const; public : GenericCollection<long> getRdsRuleByLabel(const string&) const;
public : GenericCollection<string> GetLayerNamesByLabel(const string&) const; public : GenericCollection<string> getLayerNamesByLabel(const string&) const;
public : Layers GetLayersByLabel(const string&) const; public : Layers getLayersByLabel(const string&) const;
public : GenericCollection<double> GetElectricalsByLabel(const string& ) const; public : GenericCollection<double> getElectricalsByLabel(const string& ) const;
public : int GetModellingByLabel(const string&) const; public : int getModellingByLabel(const string&) const;
public : double GetSimpleCapaMimByLabel(const string&) const; public : double getSimpleCapaMimByLabel(const string&) const;
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
public : double GetSingleRealRuleByLabel(const string& s) const public : double getSingleRealRuleByLabel(const string& s) const
// ************************************************* // *************************************************
{ {
GenericLocator<double> locator = GetRuleByLabel(s).GetLocator(); GenericLocator<double> locator = getRuleByLabel(s).getLocator();
return locator.GetElement(); return locator.getElement();
} }
public : long GetSingleRdsRuleByLabel(const string& s) const public : long getSingleRdsRuleByLabel(const string& s) const
// ************************************************ // ************************************************
{ {
GenericLocator<long> locator = GetRdsRuleByLabel(s).GetLocator(); GenericLocator<long> locator = getRdsRuleByLabel(s).getLocator();
return locator.GetElement(); return locator.getElement();
} }
public : string GetSingleLayerNameByLabel(const string& s) const public : string getSingleLayerNameByLabel(const string& s) const
// **************************************************** // ****************************************************
{ {
GenericLocator<string> locator = GetLayerNamesByLabel(s).GetLocator(); GenericLocator<string> locator = getLayerNamesByLabel(s).getLocator();
return locator.GetElement(); return locator.getElement();
} }
public : Layer* GetSingleLayerByLabel(const string& s) const public : Layer* getSingleLayerByLabel(const string& s) const
// ************************************************ // ************************************************
{ {
LayerLocator locator = GetLayersByLabel(s).GetLocator(); LayerLocator locator = getLayersByLabel(s).getLocator();
return locator.GetElement(); return locator.getElement();
} }
public : double GetSingleRealRuleByLabel(char* prefix, const string& type, char* suffix) const public : double getSingleRealRuleByLabel(char* prefix, const string& type, char* suffix) const
// ********************************************************************************** // **********************************************************************************
{ {
return GetSingleRealRuleByLabel(prefix + type + suffix); return getSingleRealRuleByLabel(prefix + type + suffix);
} }
public : long GetSingleRdsRuleByLabel(char* prefix, const string& type, char* suffix) const public : long getSingleRdsRuleByLabel(char* prefix, const string& type, char* suffix) const
// ******************************************************************************* // *******************************************************************************
{ {
return GetSingleRdsRuleByLabel(prefix + type + suffix); return getSingleRdsRuleByLabel(prefix + type + suffix);
} }
public : string GetSingleLayerNameByLabel(char* prefix, const string& type, const string& suffix) const public : string getSingleLayerNameByLabel(char* prefix, const string& type, const string& suffix) const
// ************************************************************************************ // ************************************************************************************
{ {
return GetSingleLayerNameByLabel(prefix + type + suffix); return getSingleLayerNameByLabel(prefix + type + suffix);
} }
public : Layer* GetSingleLayerByLabel(char* prefix, const string& type, const string& suffix) const public : Layer* getSingleLayerByLabel(char* prefix, const string& type, const string& suffix) const
// *************************************************************************************** // ***************************************************************************************
{ {
return GetSingleLayerByLabel(prefix + type + suffix); return getSingleLayerByLabel(prefix + type + suffix);
} }
# endif # endif
@ -153,16 +153,16 @@ class DtrAccess {
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
// Others // Others
// ****** // ******
public: virtual string _GetTypeName() const {return _TName("DtrAccess");}; public: virtual string _getTypeName() const {return _TName("DtrAccess");};
public: virtual string _GetString() const; public: virtual string _getString() const;
public: virtual Record* _GetRecord() const; public: virtual Record* _getRecord() const;
public: map<string, list<double> >& _GetLabel2RuleMap() { return _label2ruleMap; }; public: map<string, list<double> >& _getLabel2RuleMap() { return _label2ruleMap; };
public: map<string, list<string> >& _GetLabel2LayerNameMap() { return _label2layerNameMap; }; public: map<string, list<string> >& _getLabel2LayerNameMap() { return _label2layerNameMap; };
public: map<string, list<double> >& _GetLabel2ElectricalMap() public: map<string, list<double> >& _getLabel2ElectricalMap()
{ return _label2electricalMap; }; { return _label2electricalMap; };
public: map<string, int>& _GetLabel2ModellingMap() { return _label2modellingMap; }; public: map<string, int>& _getLabel2ModellingMap() { return _label2modellingMap; };
public: map<string, double>& _GetLabel2SimpleCapaMimMap() public: map<string, double>& _getLabel2SimpleCapaMimMap()
{ return _label2simplecapamimMap; }; { return _label2simplecapamimMap; };
# endif # endif
@ -178,7 +178,7 @@ class DtrAccess {
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
string GetString(const H::DtrAccess&); string getString(const H::DtrAccess&);
#endif // HURRICANE_DTRACCESS #endif // HURRICANE_DTRACCESS

View File

@ -31,11 +31,11 @@ void GenericDtrAccess::Instance(DtrAccess* dtraccess)
GenericDtrAccess::~GenericDtrAccess() GenericDtrAccess::~GenericDtrAccess()
// ********************************* // *********************************
{ {
if(_dtrAccess) { cout<<GetString(_dtrAccess)<<" is delete "<<endl; _dtrAccess->Delete();} if(_dtrAccess) { cout<<getString(_dtrAccess)<<" is delete "<<endl; _dtrAccess->destroy();}
} }
string GenericDtrAccess::_GetString() const string GenericDtrAccess::_getString() const
// **************************************** // ****************************************
{ {
string s("Singleton GenericDtrAccess"); string s("Singleton GenericDtrAccess");
@ -51,10 +51,10 @@ END_NAMESPACE_HURRICANE
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
string GetString(const H::GenericDtrAccess& access) string getString(const H::GenericDtrAccess& access)
// ************************************************ // ************************************************
{ {
return access._GetString(); return access._getString();
} }

View File

@ -56,8 +56,8 @@ class GenericDtrAccess {
# if !defined(__DOXYGEN_PROCESSOR__) # if !defined(__DOXYGEN_PROCESSOR__)
// Others // Others
// ****** // ******
public: virtual string _GetTypeName() const {return _TName("GenericDtrAccess");}; public: virtual string _getTypeName() const {return _TName("GenericDtrAccess");};
public: virtual string _GetString() const; public: virtual string _getString() const;
# endif # endif
}; };
@ -71,7 +71,7 @@ class GenericDtrAccess {
// Generic functions // Generic functions
// **************************************************************************************************** // ****************************************************************************************************
string GetString(const H::GenericDtrAccess&); string getString(const H::GenericDtrAccess&);
#endif // HURRICANE_GENERICDTRACCESS #endif // HURRICANE_GENERICDTRACCESS

View File

@ -92,7 +92,7 @@ item: T_ID elems '\n'
, j = doubleList.end(); , j = doubleList.end();
while(i!=j) { while(i!=j) {
(dtraccess->_GetLabel2RuleMap())[label].push_back(*i); (dtraccess->_getLabel2RuleMap())[label].push_back(*i);
i++; i++;
} }
} }
@ -105,7 +105,7 @@ item: T_ID elems '\n'
, j = stringList.end(); , j = stringList.end();
while(i!=j) { while(i!=j) {
(dtraccess->_GetLabel2LayerNameMap())[label].push_back(*i);; (dtraccess->_getLabel2LayerNameMap())[label].push_back(*i);;
i++; i++;
} }
} }
@ -118,7 +118,7 @@ item: T_ID elems '\n'
, j = doubleList.end(); , j = doubleList.end();
while(i!=j) { while(i!=j) {
(dtraccess->_GetLabel2ElectricalMap())[label].push_back(*i); (dtraccess->_getLabel2ElectricalMap())[label].push_back(*i);
i++; i++;
} }
} }
@ -129,7 +129,7 @@ item: T_ID elems '\n'
list<double>::iterator i = doubleList.begin(); list<double>::iterator i = doubleList.begin();
(dtraccess->_GetLabel2ModellingMap())[label] = (int)(*i); (dtraccess->_getLabel2ModellingMap())[label] = (int)(*i);
} }
else if( strcmp(table_name, "SIMPLE_CAPA_MIM")==0 ) { else if( strcmp(table_name, "SIMPLE_CAPA_MIM")==0 ) {
@ -138,7 +138,7 @@ item: T_ID elems '\n'
} }
list<double>::iterator i = doubleList.begin(); list<double>::iterator i = doubleList.begin();
(dtraccess->_GetLabel2SimpleCapaMimMap())[label] = (*i); (dtraccess->_getLabel2SimpleCapaMimMap())[label] = (*i);
} }

View File

@ -13,9 +13,9 @@ using namespace DEVICE;
int main() { int main() {
try { try {
cout << "simple analogic test" << endl; cout << "simple analogic test" << endl;
CDataBase* db = CDataBase::Create(); CDataBase* db = CDataBase::create();
Library* workLibrary = Library::Create(db->GetRootLibrary(), Name("WorkLibrary")); Library* workLibrary = Library::create(db->getRootLibrary(), Name("WorkLibrary"));
TrMos* trmos = TrMos::Create(workLibrary, Name("MosTr")); TrMos* trmos = TrMos::create(workLibrary, Name("MosTr"));
exit(0); exit(0);
} catch (Hurricane::Warning& w) { } catch (Hurricane::Warning& w) {
cerr << w.What() << endl; cerr << w.What() << endl;