hurricane cleaning still in progress
This commit is contained in:
parent
7fb2d3222d
commit
6aba9ac985
|
@ -23,17 +23,17 @@
|
|||
|
||||
// --------------------------------------------------------------------
|
||||
// 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.
|
||||
|
||||
#define GET_RULE(s) \
|
||||
dtraccess->GetSingleRdsRuleByLabel(string(s))
|
||||
dtraccess->getSingleRdsRuleByLabel(string(s))
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// 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 .
|
||||
|
||||
/* \prefix must be a chain character.
|
||||
|
@ -44,13 +44,13 @@
|
|||
// To Use This Macro, you must Predefine Pointeur dtraccess.
|
||||
|
||||
#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)"
|
||||
// This Method Macro is For Geting the Layer of a Layer Rule Selected
|
||||
// Macro Method : "get_LAYER_BYNP(prefix, type, suffix)"
|
||||
// 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
|
||||
// Pointeur dtraccess.
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
|||
// To Use This Macro, you must Predefine Pointeur dtraccess.
|
||||
|
||||
#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.
|
||||
|
||||
#define SAVE_RECTANGLE(s, x, y, dx, dy) \
|
||||
_mapString2Box[string(s)] = Box(GetUnit(x), GetUnit(y), GetUnit(x+dx), GetUnit(y+dy)); \
|
||||
xmin = MINLONG(xmin, GetUnit(x)); \
|
||||
ymin = MINLONG(ymin, GetUnit(y));
|
||||
_mapString2Box[string(s)] = Box(getUnit(x), getUnit(y), getUnit(x+dx), getUnit(y+dy)); \
|
||||
xmin = MINLONG(xmin, getUnit(x)); \
|
||||
ymin = MINLONG(ymin, getUnit(y));
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// 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.
|
||||
|
@ -130,7 +130,7 @@
|
|||
for(unsigned i=0; i<nbcolumn; i++) { \
|
||||
\
|
||||
for(unsigned j=0; j<nbcontact; j++) { \
|
||||
Contact::Create(net, layer \
|
||||
Contact::create(net, layer \
|
||||
, tmp_xcenter \
|
||||
, tmp_ycenter \
|
||||
, rw_cont \
|
||||
|
@ -155,10 +155,10 @@
|
|||
*/
|
||||
|
||||
# define BOX_IS_VALID(box) \
|
||||
( (long)(GetValue(box.getXMin()))%2==0 )&& \
|
||||
( (long)(GetValue(box.getXMax()))%2==0 )&& \
|
||||
( (long)(GetValue(box.getYMin()))%2==0 )&& \
|
||||
( (long)(GetValue(box.getYMax()))%2==0 )
|
||||
( (long)(getValue(box.getXMin()))%2==0 )&& \
|
||||
( (long)(getValue(box.getXMax()))%2==0 )&& \
|
||||
( (long)(getValue(box.getYMin()))%2==0 )&& \
|
||||
( (long)(getValue(box.getYMax()))%2==0 )
|
||||
|
||||
|
||||
BEGIN_NAMESPACE_HURRICANE
|
||||
|
|
|
@ -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)
|
||||
// *********************************************************
|
||||
|
@ -48,28 +48,28 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
|
||||
// Check out mask param.
|
||||
// *********************
|
||||
if(_masqueV1Info->GetL() < dtraccess->GetSingleRealRuleByLabel("L_TRANS") ||
|
||||
_masqueV1Info->GetL() > dtraccess->GetSingleRealRuleByLabel("L_TRANS_MAX") ||
|
||||
_masqueV1Info->GetW() < dtraccess->GetSingleRealRuleByLabel("W_TRANS") ||
|
||||
_masqueV1Info->GetW() > dtraccess->GetSingleRealRuleByLabel("W_TRANS_MAX") )
|
||||
if(_masqueV1Info->getL() < dtraccess->getSingleRealRuleByLabel("L_TRANS") ||
|
||||
_masqueV1Info->getL() > dtraccess->getSingleRealRuleByLabel("L_TRANS_MAX") ||
|
||||
_masqueV1Info->getW() < dtraccess->getSingleRealRuleByLabel("W_TRANS") ||
|
||||
_masqueV1Info->getW() > dtraccess->getSingleRealRuleByLabel("W_TRANS_MAX") )
|
||||
|
||||
throw Error("Can't launch function GenV1Trans::Calculate for " + GetString(transistor)
|
||||
+ " the L " + GetString(_masqueV1Info->GetL())
|
||||
+ " or the W " + GetString(_masqueV1Info->GetW())
|
||||
throw Error("Can't launch function GenV1Trans::Calculate for " + getString(transistor)
|
||||
+ " the L " + getString(_masqueV1Info->getL())
|
||||
+ " or the W " + getString(_masqueV1Info->getW())
|
||||
+ " of this transistor is invalid."
|
||||
);
|
||||
|
||||
if(_masqueV1Info->GetNbSourceColumn() < 1 || _masqueV1Info->GetNbSourceColumn() > MAXNBCONTACT ||
|
||||
_masqueV1Info->GetNbDrainColumn() < 1 || _masqueV1Info->GetNbDrainColumn() > MAXNBCONTACT )
|
||||
if(_masqueV1Info->getNbSourceColumn() < 1 || _masqueV1Info->getNbSourceColumn() > MAXNBCONTACT ||
|
||||
_masqueV1Info->getNbDrainColumn() < 1 || _masqueV1Info->getNbDrainColumn() > MAXNBCONTACT )
|
||||
|
||||
throw Error("Can't launch function GenV1Trans::Calculate for " + GetString(transistor)
|
||||
+ " the nbsourcecolumn " + GetString(_masqueV1Info->GetNbSourceColumn())
|
||||
+ " or the nbdraincolumn " + GetString(_masqueV1Info->GetNbDrainColumn())
|
||||
throw Error("Can't launch function GenV1Trans::Calculate for " + getString(transistor)
|
||||
+ " the nbsourcecolumn " + getString(_masqueV1Info->getNbSourceColumn())
|
||||
+ " or the nbdraincolumn " + getString(_masqueV1Info->getNbDrainColumn())
|
||||
+ " of this transistor is invalid."
|
||||
);
|
||||
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << ts << GetString(transistor) + " 's masqueinfo is " + GetString(_masqueV1Info)
|
||||
cout << ts << getString(transistor) + " 's masqueinfo is " + getString(_masqueV1Info)
|
||||
<< endl;
|
||||
END_IF
|
||||
|
||||
|
@ -99,15 +99,15 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
long extension3 = 0;
|
||||
long extension4 = 0;
|
||||
long ymax = 0;
|
||||
string mostype; // Get Mos Type (N/P).
|
||||
string mostype; // get Mos Type (N/P).
|
||||
|
||||
if(transistor->IsNmos())
|
||||
mostype='N';
|
||||
else
|
||||
mostype='P';
|
||||
|
||||
//string mostype; // Get Mos Type (N/P).
|
||||
//mostype=transistor->GetType();
|
||||
//string mostype; // get Mos Type (N/P).
|
||||
//mostype=transistor->getType();
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Begin Calculate.
|
||||
|
@ -124,8 +124,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
x00 = 0;
|
||||
y00 = -( GET_RULE("RE_GATE_ACTI") );
|
||||
|
||||
dx00 = ConvertRealToRdsUnit(_masqueV1Info->GetL());
|
||||
realw = ConvertRealToRdsUnit(_masqueV1Info->GetW());
|
||||
dx00 = ConvertRealToRdsUnit(_masqueV1Info->getL());
|
||||
realw = ConvertRealToRdsUnit(_masqueV1Info->getW());
|
||||
|
||||
dy00 = realw + 2*(-y00);
|
||||
|
||||
|
@ -202,8 +202,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
// **********************
|
||||
y20 = 0 + GET_RULE("RE_ACTI_CONT");
|
||||
dy20 = realw - 2 * GET_RULE("RE_ACTI_CONT");
|
||||
dx20 = (_masqueV1Info->GetNbSourceColumn()) * GET_RULE("RW_CONT") +
|
||||
((_masqueV1Info->GetNbSourceColumn()) - 1) * GET_RULE("RD_CONT");
|
||||
dx20 = (_masqueV1Info->getNbSourceColumn()) * GET_RULE("RW_CONT") +
|
||||
((_masqueV1Info->getNbSourceColumn()) - 1) * GET_RULE("RD_CONT");
|
||||
x20 = 0 - ( dx20 + GET_RULE("RD_CONT_GATE") );
|
||||
|
||||
SAVE_RECTANGLE("20", x20, y20, dx20, dy20)
|
||||
|
@ -213,8 +213,8 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
// **********************
|
||||
y40 = y20;
|
||||
x40 = x00 + dx00 + GET_RULE("RD_CONT_GATE");
|
||||
dx40 = (_masqueV1Info->GetNbDrainColumn()) * GET_RULE("RW_CONT") +
|
||||
((_masqueV1Info->GetNbDrainColumn()) - 1) * GET_RULE("RD_CONT");
|
||||
dx40 = (_masqueV1Info->getNbDrainColumn()) * GET_RULE("RW_CONT") +
|
||||
((_masqueV1Info->getNbDrainColumn()) - 1) * GET_RULE("RD_CONT");
|
||||
dy40 = dy20;
|
||||
|
||||
SAVE_RECTANGLE("40", x40, y40, dx40, dy40)
|
||||
|
@ -302,7 +302,7 @@ void GenV1Trans::Calculate(Transistor* transistor)
|
|||
_mapString2Box[(*i).first] = (*i).second.translate(-xmin, -ymin);
|
||||
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << ts << (*i).first <<" " << GetString((*i).second) << endl;
|
||||
cout << ts << (*i).first <<" " << getString((*i).second) << endl;
|
||||
END_IF
|
||||
|
||||
assert(BOX_IS_VALID((*i).second));
|
||||
|
@ -317,31 +317,31 @@ void GenV1Trans::Generate(Transistor* transistor)
|
|||
{
|
||||
OpenUpdateSession();
|
||||
|
||||
Net* source = transistor->GetNet(Name(transistor->GetSourceName()));
|
||||
Net* drain = transistor->GetNet(Name(transistor->GetDrainName()) );
|
||||
Net* grid = transistor->GetNet(Name(transistor->GetGridName()) );
|
||||
Net* source = transistor->getNet(Name(transistor->getSourceName()));
|
||||
Net* drain = transistor->getNet(Name(transistor->getDrainName()) );
|
||||
Net* grid = transistor->getNet(Name(transistor->getGridName()) );
|
||||
|
||||
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())
|
||||
mostype='N';
|
||||
else
|
||||
mostype='P';
|
||||
|
||||
long rw_cont = GetUnit(GET_RULE("RW_CONT"));
|
||||
long rd_cont = GetUnit(GET_RULE("RD_CONT"));
|
||||
long rw_cont = getUnit(GET_RULE("RW_CONT"));
|
||||
long rd_cont = getUnit(GET_RULE("RD_CONT"));
|
||||
unsigned nbcontact = 0;
|
||||
long tmp_xcenter = 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_30 = GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_30");
|
||||
|
@ -354,19 +354,19 @@ void GenV1Trans::Generate(Transistor* transistor)
|
|||
// Cenerate Components For Net Source.
|
||||
// ***********************************
|
||||
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
|
||||
|
||||
for(size_t i=0; i<sizeof(segsforsource)/sizeof(string); i++) {
|
||||
|
||||
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]);
|
||||
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;
|
||||
}
|
||||
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]).getYCenter()
|
||||
, GET_BOX(segsforsource[i]).getWidth()
|
||||
|
@ -376,19 +376,19 @@ END_IF
|
|||
}
|
||||
|
||||
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
|
||||
|
||||
|
||||
// Generate Components For Net Grid.
|
||||
// *********************************
|
||||
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
|
||||
for(size_t i=0; i<sizeof(segsforgrid)/sizeof(string); i++) {
|
||||
if(segsforgrid[i]=="30"){
|
||||
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]).getYCenter()
|
||||
, GET_BOX(segsforgrid[i]).getWidth()
|
||||
|
@ -408,7 +408,7 @@ END_IF
|
|||
}
|
||||
else {
|
||||
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]).getYCenter()
|
||||
, GET_BOX(segsforgrid[i]).getWidth()
|
||||
|
@ -420,25 +420,25 @@ END_IF
|
|||
}
|
||||
|
||||
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
|
||||
|
||||
|
||||
// Generate Components For Net Drain.
|
||||
// **********************************
|
||||
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
|
||||
for(size_t i=0; i<sizeof(segsfordrain)/sizeof(string); i++) {
|
||||
|
||||
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]);
|
||||
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;
|
||||
}
|
||||
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]).getYCenter()
|
||||
, GET_BOX(segsfordrain[i]).getWidth()
|
||||
|
@ -448,20 +448,20 @@ END_IF
|
|||
}
|
||||
|
||||
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
|
||||
|
||||
// Generate Components For Anonyms Nets.
|
||||
// *************************************
|
||||
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
|
||||
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++) {
|
||||
if(transistor->IsNmos() && segsforanonym[i]=="50")
|
||||
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]).getYCenter()
|
||||
, GET_BOX(segsforanonym[i]).getWidth()
|
||||
|
@ -470,7 +470,7 @@ END_IF
|
|||
}
|
||||
|
||||
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 Generation.
|
||||
|
@ -480,50 +480,50 @@ END_IF
|
|||
|
||||
// Set Transistor::_mapNet2Box.
|
||||
// ****************************
|
||||
(*(transistor->_GetMapNet2Box()))[grid] = _mapString2Box[string("30")];
|
||||
(*(transistor->_GetMapNet2Box()))[source] = _mapString2Box[string("20")];
|
||||
(*(transistor->_GetMapNet2Box()))[drain] = _mapString2Box[string("40")];
|
||||
(*(transistor->_getMapNet2Box()))[grid] = _mapString2Box[string("30")];
|
||||
(*(transistor->_getMapNet2Box()))[source] = _mapString2Box[string("20")];
|
||||
(*(transistor->_getMapNet2Box()))[drain] = _mapString2Box[string("40")];
|
||||
|
||||
cout<< GetString(_mapString2Box[string("30")]) <<endl;
|
||||
cout<< GetString(_mapString2Box[string("20")]) <<endl;
|
||||
cout<< GetString(_mapString2Box[string("40")]) <<endl;
|
||||
cout<< getString(_mapString2Box[string("30")]) <<endl;
|
||||
cout<< getString(_mapString2Box[string("20")]) <<endl;
|
||||
cout<< getString(_mapString2Box[string("40")]) <<endl;
|
||||
|
||||
// Set Abutment Box.
|
||||
// *****************
|
||||
switch(transistor->GetAbutmentType().GetCode()) {
|
||||
switch(transistor->getAbutmentType().getCode()) {
|
||||
|
||||
case Transistor::Type::INTERNAL :
|
||||
transistor->SetAbutmentBox( Box(GET_BOX(string("20")).getXCenter()
|
||||
, transistor->GetBoundingBox().getYMin()
|
||||
, transistor->getBoundingBox().getYMin()
|
||||
, GET_BOX(string("40")).getXCenter()
|
||||
, transistor->GetBoundingBox().getYMax()
|
||||
, transistor->getBoundingBox().getYMax()
|
||||
)
|
||||
);
|
||||
break;
|
||||
|
||||
case Transistor::Type::LEFT:
|
||||
transistor->SetAbutmentBox( Box(GET_BOX(string("11")).getXMin()
|
||||
, transistor->GetBoundingBox().getYMin()
|
||||
, transistor->getBoundingBox().getYMin()
|
||||
, GET_BOX(string("40")).getXCenter()
|
||||
, transistor->GetBoundingBox().getYMax()
|
||||
, transistor->getBoundingBox().getYMax()
|
||||
)
|
||||
);
|
||||
break ;
|
||||
|
||||
case Transistor::Type::RIGHT:
|
||||
transistor->SetAbutmentBox( Box(GET_BOX(string("20")).getXCenter()
|
||||
, transistor->GetBoundingBox().getYMin()
|
||||
, transistor->getBoundingBox().getYMin()
|
||||
, GET_BOX(string("11")).getXMax()
|
||||
, transistor->GetBoundingBox().getYMax()
|
||||
, transistor->getBoundingBox().getYMax()
|
||||
)
|
||||
);
|
||||
break ;
|
||||
|
||||
case Transistor::Type::SINGLE:
|
||||
transistor->SetAbutmentBox( Box(GET_BOX(string("11")).getXMin()
|
||||
, transistor->GetBoundingBox().getYMin()
|
||||
, transistor->getBoundingBox().getYMin()
|
||||
, GET_BOX(string("11")).getXMax()
|
||||
, transistor->GetBoundingBox().getYMax()
|
||||
, transistor->getBoundingBox().getYMax()
|
||||
)
|
||||
);
|
||||
break ;
|
||||
|
|
|
@ -19,7 +19,6 @@ BEGIN_NAMESPACE_HURRICANE
|
|||
// ****************************************************************************************************
|
||||
|
||||
MetaTransistor::MetaTransistor(Library* library, const Name& name, char type)
|
||||
// **************************************************************************
|
||||
: Inherit(library, name),
|
||||
_type(type),
|
||||
_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->_PostCreate();
|
||||
metatransistor->_postCreate();
|
||||
|
||||
return metatransistor;
|
||||
}
|
||||
|
||||
|
||||
void MetaTransistor::_PreDelete()
|
||||
// ******************************
|
||||
{
|
||||
void MetaTransistor::_preDestroy() {
|
||||
// do something
|
||||
// ************
|
||||
|
||||
Inherit::_PreDelete();
|
||||
Inherit::_preDestroy();
|
||||
}
|
||||
|
||||
|
||||
void MetaTransistor::_PostCreate()
|
||||
// *******************************
|
||||
{
|
||||
Inherit::_PostCreate();
|
||||
void MetaTransistor::_postCreate() {
|
||||
Inherit::_postCreate();
|
||||
|
||||
(Net::Create(this, Name("DRAIN")))->SetExternal(true);
|
||||
(Net::Create(this, Name("SOURCE")))->SetExternal(true);
|
||||
(Net::Create(this, Name("GRID")))->SetExternal(true);
|
||||
(Net::Create(this, Name("BULK")))->SetExternal(true);
|
||||
(Net::create(this, Name("DRAIN")))->SetExternal(true);
|
||||
(Net::create(this, Name("SOURCE")))->SetExternal(true);
|
||||
(Net::create(this, Name("GRID")))->SetExternal(true);
|
||||
(Net::create(this, Name("BULK")))->SetExternal(true);
|
||||
}
|
||||
|
||||
|
||||
void MetaTransistor::CreateConnection()
|
||||
void MetaTransistor::createConnection()
|
||||
// ***********************************
|
||||
{
|
||||
for_each_instance(instance, this->GetInstances())
|
||||
Cell * mastercell = instance->GetMasterCell();
|
||||
for_each_instance(instance, this->getInstances())
|
||||
Cell * mastercell = instance->getMasterCell();
|
||||
|
||||
// Assurance of unique instanciation
|
||||
// *********************************
|
||||
if(mastercell->_GetSlaveInstanceSet()._GetSize()!=1) {
|
||||
string err_msg = "Can't create connection : " + GetString(mastercell) + " hasn't only one slave instance";
|
||||
if(mastercell->_getSlaveInstanceSet()._getSize()!=1) {
|
||||
string err_msg = "Can't create connection : " + getString(mastercell) + " hasn't only one slave instance";
|
||||
assert(err_msg.c_str());
|
||||
}
|
||||
|
||||
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("GRID")))->SetNet(GetNet(Name("GRID")));
|
||||
instance->GetPlug(mastercell->GetNet(Name("BULK")))->SetNet(GetNet(Name("BULK")));
|
||||
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("GRID")))->SetNet(getNet(Name("GRID")));
|
||||
instance->getPlug(mastercell->getNet(Name("BULK")))->SetNet(getNet(Name("BULK")));
|
||||
end_for
|
||||
}
|
||||
|
||||
|
||||
void MetaTransistor::CreateLayout()
|
||||
void MetaTransistor::createLayout()
|
||||
// ********************************
|
||||
{
|
||||
// OpenUpdateSession();
|
||||
|
||||
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);
|
||||
|
@ -98,24 +91,24 @@ void MetaTransistor::CreateLayout()
|
|||
Transistor * left_ref = NULL;
|
||||
Transistor * right_ref = NULL;
|
||||
|
||||
for_each_instance(instance, this->GetInstances())
|
||||
Cell * mastercell = instance->GetMasterCell();
|
||||
for_each_instance(instance, this->getInstances())
|
||||
Cell * mastercell = instance->getMasterCell();
|
||||
|
||||
// Assurance of unique instanciation
|
||||
// *********************************
|
||||
if(mastercell->_GetSlaveInstanceSet()._GetSize()!=1) {
|
||||
string err_msg = "Can't generate layout : " + GetString(mastercell) + " hasn't only one slave instance";
|
||||
if(mastercell->_getSlaveInstanceSet()._getSize()!=1) {
|
||||
string err_msg = "Can't generate layout : " + getString(mastercell) + " hasn't only one slave instance";
|
||||
assert(err_msg.c_str());
|
||||
}
|
||||
|
||||
Transistor * trans = dynamic_cast<Transistor*>(mastercell);
|
||||
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(!internal_ref) {
|
||||
trans->CreateLayout();
|
||||
trans->createLayout();
|
||||
internal_ref = trans;
|
||||
}
|
||||
else {
|
||||
|
@ -124,7 +117,7 @@ void MetaTransistor::CreateLayout()
|
|||
}
|
||||
else if(trans->IsLeft()) {
|
||||
if(!left_ref) {
|
||||
trans->CreateLayout();
|
||||
trans->createLayout();
|
||||
left_ref=trans;
|
||||
}
|
||||
else
|
||||
|
@ -132,14 +125,14 @@ void MetaTransistor::CreateLayout()
|
|||
}
|
||||
else if(trans->IsRight()) {
|
||||
if(!right_ref) {
|
||||
trans->CreateLayout();
|
||||
trans->createLayout();
|
||||
right_ref=trans;
|
||||
}
|
||||
else
|
||||
trans->DuplicateLayout(right_ref);
|
||||
}
|
||||
else
|
||||
trans->CreateLayout();
|
||||
trans->createLayout();
|
||||
end_for
|
||||
|
||||
|
||||
|
@ -153,29 +146,29 @@ void MetaTransistor::Flush()
|
|||
// *************************
|
||||
{
|
||||
OpenUpdateSession();
|
||||
for_each_instance(instance, this->GetInstances())
|
||||
Cell * mastercell = instance->GetMasterCell();
|
||||
instance->Delete();
|
||||
mastercell->Delete();
|
||||
for_each_instance(instance, this->getInstances())
|
||||
Cell * mastercell = instance->getMasterCell();
|
||||
instance->destroy();
|
||||
mastercell->destroy();
|
||||
end_for
|
||||
CloseUpdateSession();
|
||||
}
|
||||
|
||||
|
||||
|
||||
string MetaTransistor::_GetString() const
|
||||
string MetaTransistor::_getString() const
|
||||
// ***************************************
|
||||
{
|
||||
string s= Inherit::_GetString();
|
||||
s.insert(s.length()-1, " " + GetString(GetType()) );
|
||||
s.insert(s.length()-1, " " + GetString(GetM()) );
|
||||
string s= Inherit::_getString();
|
||||
s.insert(s.length()-1, " " + getString(getType()) );
|
||||
s.insert(s.length()-1, " " + getString(getM()) );
|
||||
return s;
|
||||
}
|
||||
|
||||
Record* MetaTransistor::_GetRecord() const
|
||||
Record* MetaTransistor::_getRecord() const
|
||||
// ***************************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,16 +60,16 @@ class MetaTransistor: public Cell {
|
|||
protected : MetaTransistor(Library* library, const Name& name, char type);
|
||||
# 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__)
|
||||
protected : virtual void _PostCreate();
|
||||
protected : virtual void _postCreate();
|
||||
|
||||
|
||||
// Destructors
|
||||
// ***********
|
||||
protected : ~MetaTransistor() {};
|
||||
protected : virtual void _PreDelete();
|
||||
protected : virtual void _preDestroy();
|
||||
# endif
|
||||
|
||||
// Operations
|
||||
|
@ -77,17 +77,17 @@ class MetaTransistor: public Cell {
|
|||
|
||||
// Create the connection between all instances.
|
||||
// ********************************************
|
||||
public : void CreateConnection();
|
||||
public : void createConnection();
|
||||
|
||||
// Create the layout of all motifs in this metatransistor.
|
||||
// *******************************************************
|
||||
public : void CreateLayout();
|
||||
public : void createLayout();
|
||||
|
||||
|
||||
# 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.
|
||||
// ***********************************************************
|
||||
|
@ -97,10 +97,10 @@ class MetaTransistor: public Cell {
|
|||
|
||||
// Accessors
|
||||
// *********
|
||||
public : const Micro& GetLe() const { return _le; };
|
||||
public : const Micro& GetWe() const { return _we; };
|
||||
public : const char GetType() const { return _type; };
|
||||
public : const unsigned GetM() const { return _m; };
|
||||
public : const Micro& getLe() const { return _le; };
|
||||
public : const Micro& getWe() const { return _we; };
|
||||
public : const char getType() const { return _type; };
|
||||
public : const unsigned getM() const { return _m; };
|
||||
|
||||
|
||||
// Updators
|
||||
|
@ -116,9 +116,9 @@ class MetaTransistor: public Cell {
|
|||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
// Others
|
||||
// ******
|
||||
public: virtual string _GetTypeName() const {return _TName("MetaTransistor");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("MetaTransistor");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
# endif
|
||||
|
||||
};
|
||||
|
|
|
@ -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 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 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;
|
||||
|
@ -158,7 +158,7 @@ static void CalculateRdsUnit() {
|
|||
}
|
||||
|
||||
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
|
||||
|
@ -172,8 +172,8 @@ static void CalculateRdsUnit() {
|
|||
|
||||
string pattern;
|
||||
|
||||
if( (pattern = GetPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) { // Get the value behind
|
||||
throw Error("Can't get rds_physical_grid : GetPattern(string&, char*) return NULL");
|
||||
if( (pattern = getPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) { // get the value behind
|
||||
throw Error("Can't get rds_physical_grid : getPattern(string&, char*) return NULL");
|
||||
}
|
||||
|
||||
if(!Scan(pattern, rds_physical_grid)){ // Convert from string to double
|
||||
|
@ -186,8 +186,8 @@ static void CalculateRdsUnit() {
|
|||
|
||||
string pattern;
|
||||
|
||||
if( (pattern = GetPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) {
|
||||
throw Error("Can't get rds_lambda : GetPattern(string&, char*) return NULL");
|
||||
if( (pattern = getPattern(tmp, "[[:digit:]\\.]+")).size()==0 ) {
|
||||
throw Error("Can't get rds_lambda : getPattern(string&, char*) return NULL");
|
||||
}
|
||||
|
||||
if(!Scan(pattern, rds_lambda)){
|
||||
|
@ -230,7 +230,7 @@ BEGIN_NAMESPACE_HURRICANE
|
|||
// Utilitarians
|
||||
// ****************************************************************************************************
|
||||
|
||||
const long& GetRdsUnit()
|
||||
const long& getRdsUnit()
|
||||
// *********************
|
||||
{
|
||||
if ( RDS_UNIT == -1)
|
||||
|
@ -239,13 +239,13 @@ const long& GetRdsUnit()
|
|||
return RDS_UNIT;
|
||||
}
|
||||
|
||||
const long& GetRdsPhysicalGrid()
|
||||
const long& getRdsPhysicalGrid()
|
||||
// *****************************
|
||||
{
|
||||
return RDS_PHYSICAL_GRID;
|
||||
}
|
||||
|
||||
const long& GetRdsLambda()
|
||||
const long& getRdsLambda()
|
||||
// ***********************
|
||||
{
|
||||
if ( RDS_LAMBDA == -1)
|
||||
|
|
|
@ -20,11 +20,11 @@ namespace Hurricane {
|
|||
// 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&)".
|
||||
|
@ -40,7 +40,7 @@ extern const long& GetRdsLambda();
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ bool Transistor::MaskVersion::operator==(const MaskVersion& version) const
|
|||
}
|
||||
|
||||
|
||||
string Transistor::MaskVersion::_GetString() const
|
||||
string Transistor::MaskVersion::_getString() const
|
||||
// *************************************************
|
||||
{
|
||||
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->Add(GetSlot("Code", _code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", _code));
|
||||
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) {
|
||||
|
@ -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->Add(GetSlot("Code", _code));
|
||||
Record* record = new Record(getString(this));
|
||||
record->Add(getSlot("Code", _code));
|
||||
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)
|
||||
// ************************************************************************************
|
||||
{
|
||||
_l = masqueinfo.GetL();
|
||||
_w = masqueinfo.GetW();
|
||||
_type= masqueinfo.GetType();
|
||||
_nbDrainColumn = masqueinfo.GetNbDrainColumn();
|
||||
_nbSourceColumn = masqueinfo.GetNbSourceColumn();
|
||||
_l = masqueinfo.getL();
|
||||
_w = masqueinfo.getW();
|
||||
_type= masqueinfo.getType();
|
||||
_nbDrainColumn = masqueinfo.getNbDrainColumn();
|
||||
_nbSourceColumn = masqueinfo.getNbSourceColumn();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
void Transistor::MaskInfo::_PostCreate()
|
||||
// ***************************************
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Transistor::MaskInfo::_PreDelete()
|
||||
// **************************************
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Transistor::MaskInfo::Delete()
|
||||
// **********************************
|
||||
{
|
||||
_PreDelete();
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
bool Transistor::MaskInfo::operator==(const MaskInfo& masqueinfo)
|
||||
// ******************************************************************
|
||||
{
|
||||
if(_l == masqueinfo.GetL() &&
|
||||
_w == masqueinfo.GetW() &&
|
||||
_type== masqueinfo.GetType() &&
|
||||
_nbDrainColumn == masqueinfo.GetNbDrainColumn() &&
|
||||
_nbSourceColumn == masqueinfo.GetNbSourceColumn()
|
||||
if(_l == masqueinfo.getL() &&
|
||||
_w == masqueinfo.getW() &&
|
||||
_type== masqueinfo.getType() &&
|
||||
_nbDrainColumn == masqueinfo.getNbDrainColumn() &&
|
||||
_nbSourceColumn == masqueinfo.getNbSourceColumn()
|
||||
)
|
||||
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() + " "
|
||||
+ GetString(_l) + " "
|
||||
+ GetString(_w) + " "
|
||||
+ _type._GetString() + " "
|
||||
+ GetString(_nbSourceColumn) + " "
|
||||
+ GetString(_nbDrainColumn)
|
||||
string s = "<" + _getTypeName() + " "
|
||||
+ getString(_l) + " "
|
||||
+ getString(_w) + " "
|
||||
+ _type._getString() + " "
|
||||
+ getString(_nbSourceColumn) + " "
|
||||
+ getString(_nbDrainColumn)
|
||||
+ ">";
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* Transistor::MaskInfo::_GetRecord() const
|
||||
Record* Transistor::MaskInfo::_getRecord() const
|
||||
// ***********************************************
|
||||
{
|
||||
Record * record = new Record(_GetString());
|
||||
Record * record = new Record(_getString());
|
||||
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)
|
||||
// **************************************************************************************
|
||||
{
|
||||
|
@ -238,21 +203,6 @@ Transistor::MaskInfo& Transistor::MaskV1Info::operator=(const MaskInfo& masquein
|
|||
return *this;
|
||||
}
|
||||
|
||||
|
||||
void Transistor::MaskV1Info::_PostCreate()
|
||||
// *****************************************
|
||||
{
|
||||
Inherit::_PostCreate();
|
||||
}
|
||||
|
||||
|
||||
void Transistor::MaskV1Info::_PreDelete()
|
||||
// ****************************************
|
||||
{
|
||||
Inherit::_PreDelete();
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Record* Transistor::MaskV1Info::_GetRecord() const
|
||||
Record* Transistor::MaskV1Info::_getRecord() const
|
||||
// *************************************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
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->_PostCreate();
|
||||
transistor->_postCreate();
|
||||
|
||||
return transistor;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Transistor::_PreDelete()
|
||||
void Transistor::_preDestroy()
|
||||
// ******************************
|
||||
{
|
||||
// Delete aggregated objets.
|
||||
// *************************
|
||||
if(_masqueInfo)
|
||||
_masqueInfo->Delete();
|
||||
delete _masqueInfo;
|
||||
|
||||
if(_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("SOURCE")))->SetExternal(true);
|
||||
(Net::Create(this, Name("GRID")))->SetExternal(true);
|
||||
(Net::Create(this, Name("BULK")))->SetExternal(true);
|
||||
(Net::create(this, Name("DRAIN")))->SetExternal(true);
|
||||
(Net::create(this, Name("SOURCE")))->SetExternal(true);
|
||||
(Net::create(this, Name("GRID")))->SetExternal(true);
|
||||
(Net::create(this, Name("BULK")))->SetExternal(true);
|
||||
|
||||
// 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();
|
||||
s.insert(s.length()-1, " " + GetString(_type));
|
||||
s.insert(s.length()-1, " " + GetAbutmentType()._GetString());
|
||||
string s = Inherit::_getString();
|
||||
s.insert(s.length()-1, " " + getString(_type));
|
||||
s.insert(s.length()-1, " " + getAbutmentType()._getString());
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
Record* Transistor::_GetRecord() const
|
||||
Record* Transistor::_getRecord() const
|
||||
// ************************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
Transistor::MaskVersion Transistor::_GetMaskInfoVersion(MaskInfo* masqueinfo)
|
||||
Transistor::MaskVersion Transistor::_getMaskInfoVersion(MaskInfo* 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))
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Transistor::MaskInfo* Transistor::_CreateMaskInfo(const MaskVersion& version)
|
||||
Transistor::MaskInfo* Transistor::_createMaskInfo(const MaskVersion& version)
|
||||
// *******************************************************************************
|
||||
{
|
||||
switch((const MaskVersion::Code&)version) {
|
||||
case MaskVersion::VERSION1 :
|
||||
return MaskV1Info::Create(0.0, 0.0);
|
||||
return new MaskV1Info(0.0, 0.0);
|
||||
|
||||
default :
|
||||
throw Error ("Error : In Transistor::_CreateMaskInfoBy, unknown param version");
|
||||
throw Error ("Error : In Transistor::_createMaskInfoBy, unknown param version");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
@ -382,12 +332,12 @@ void Transistor::SetMaskInfo(MaskInfo* masqueinfo)
|
|||
// ***************************************************
|
||||
{
|
||||
if(!masqueinfo)
|
||||
throw Error("Error : In Transistor::CreateLayout : masqueinfo is NULL");
|
||||
throw Error("Error : In Transistor::createLayout : masqueinfo is NULL");
|
||||
|
||||
// Set new Param.
|
||||
// ***************
|
||||
MaskVersion newversion = _GetMaskInfoVersion(masqueinfo);
|
||||
MaskVersion oldversion = _GetMaskInfoVersion(_masqueInfo);
|
||||
MaskVersion newversion = _getMaskInfoVersion(masqueinfo);
|
||||
MaskVersion oldversion = _getMaskInfoVersion(_masqueInfo);
|
||||
|
||||
if(newversion == oldversion) { // If they are the same version.
|
||||
if((*_masqueInfo)==(*masqueinfo)) // If they are identical.
|
||||
|
@ -396,17 +346,17 @@ void Transistor::SetMaskInfo(MaskInfo* masqueinfo)
|
|||
(*_masqueInfo)=(*masqueinfo);
|
||||
}
|
||||
else { // If change the version.
|
||||
_masqueInfo->Delete();
|
||||
_masqueInfo = _CreateMaskInfo(newversion);
|
||||
delete _masqueInfo;
|
||||
_masqueInfo = _createMaskInfo(newversion);
|
||||
(*_masqueInfo) == (*masqueinfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Transistor::CreateLayout()
|
||||
void Transistor::createLayout()
|
||||
// ****************************
|
||||
{
|
||||
MaskVersion version = _GetMaskInfoVersion(_masqueInfo);
|
||||
MaskVersion version = _getMaskInfoVersion(_masqueInfo);
|
||||
MaskV1Info* masquev1info = NULL;
|
||||
|
||||
// Select algorithme with technology and masque version.
|
||||
|
@ -448,39 +398,39 @@ void Transistor::DuplicateLayout(Transistor* transistor)
|
|||
Contact * con = NULL;
|
||||
Segment * seg = NULL;
|
||||
|
||||
for_each_net(net, transistor->GetNets())
|
||||
if( !( tmp=GetNet(net->GetName()) ) ) { //
|
||||
tmp = Net::Create(this, net->GetName());
|
||||
for_each_net(net, transistor->getNets())
|
||||
if( !( tmp=getNet(net->getName()) ) ) { //
|
||||
tmp = Net::create(this, net->getName());
|
||||
tmp->SetExternal(net->IsExternal());
|
||||
}
|
||||
|
||||
for_each_component(component, net->GetComponents())
|
||||
for_each_component(component, net->getComponents())
|
||||
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)) ) {
|
||||
Vertical::Create(tmp, component->GetLayer(), seg->GetSourceX(), seg->GetWidth(), seg->GetSourceY(),
|
||||
seg->GetTargetY());
|
||||
Vertical::create(tmp, component->getLayer(), seg->getSourceX(), seg->getWidth(), seg->getSourceY(),
|
||||
seg->getTargetY());
|
||||
}
|
||||
else if( (seg=dynamic_cast<Horizontal*>(component)) ){
|
||||
Horizontal::Create(tmp, component->GetLayer(), seg->GetSourceY(), seg->GetWidth(), seg->GetSourceX(),
|
||||
seg->GetTargetX());
|
||||
Horizontal::create(tmp, component->getLayer(), seg->getSourceY(), seg->getWidth(), seg->getSourceX(),
|
||||
seg->getTargetX());
|
||||
}
|
||||
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" ) ;
|
||||
end_for
|
||||
end_for
|
||||
|
||||
SetAbutmentBox(transistor->GetAbutmentBox());
|
||||
SetAbutmentBox(transistor->getAbutmentBox());
|
||||
|
||||
_mapNet2Box.clear();
|
||||
|
||||
map<Net*, Box>::iterator i = transistor->_GetMapNet2Box()->begin(),
|
||||
j = transistor->_GetMapNet2Box()->end();
|
||||
map<Net*, Box>::iterator i = transistor->_getMapNet2Box()->begin(),
|
||||
j = transistor->_getMapNet2Box()->end();
|
||||
|
||||
while(i!=j) {
|
||||
_mapNet2Box[GetNet((*i).first->GetName())]=(*i).second;
|
||||
_mapNet2Box[getNet((*i).first->getName())]=(*i).second;
|
||||
i++;
|
||||
}
|
||||
|
||||
|
@ -497,9 +447,9 @@ END_NAMESPACE_HURRICANE
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
string GetString(const H::Transistor::MaskInfo& masqueinfo)
|
||||
string getString(const H::Transistor::MaskInfo& masqueinfo)
|
||||
// **********************************************************
|
||||
{
|
||||
return masqueinfo._GetString();
|
||||
return masqueinfo._getString();
|
||||
}
|
||||
|
||||
|
|
|
@ -45,11 +45,11 @@ class Transistor : public Cell {
|
|||
public : bool operator==(const MaskVersion&) const;
|
||||
|
||||
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 _GetString() const;
|
||||
public : Record* _GetRecord() const;
|
||||
public : string _getTypeName() const { return _TName("Transistor::MaskVersion"); };
|
||||
public : string _getString() const;
|
||||
public : Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -68,11 +68,11 @@ class Transistor : public Cell {
|
|||
|
||||
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 _GetString() const;
|
||||
public : Record* _GetRecord() const;
|
||||
public : string _getTypeName() const { return _TName("Transistor::Type"); };
|
||||
public : string _getString() const;
|
||||
public : Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -98,21 +98,18 @@ class Transistor : public Cell {
|
|||
|
||||
private : MaskInfo(const MaskInfo& );
|
||||
|
||||
protected : virtual void _PostCreate();
|
||||
|
||||
// Destructors
|
||||
// ***********
|
||||
protected: virtual ~MaskInfo() {};
|
||||
protected: virtual void _PreDelete();
|
||||
public : virtual void Delete();
|
||||
public: virtual ~MaskInfo() {};
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
public : const double& GetL() const { return _l; };
|
||||
public : const double& GetW() const { return _w; };
|
||||
public : const unsigned & GetNbDrainColumn() const { return _nbDrainColumn; };
|
||||
public : const unsigned & GetNbSourceColumn() const { return _nbSourceColumn; };
|
||||
public : const Type& GetType() const { return _type; };
|
||||
public : const double& getL() const { return _l; };
|
||||
public : const double& getW() const { return _w; };
|
||||
public : const unsigned & getNbDrainColumn() const { return _nbDrainColumn; };
|
||||
public : const unsigned & getNbSourceColumn() const { return _nbSourceColumn; };
|
||||
public : const Type& getType() const { return _type; };
|
||||
|
||||
// Update
|
||||
// ******
|
||||
|
@ -132,9 +129,9 @@ class Transistor : public Cell {
|
|||
|
||||
// Others
|
||||
// ******
|
||||
public : virtual string _GetTypeName() const =0;
|
||||
public : virtual string _GetString() const;
|
||||
public : virtual Record* _GetRecord() const;
|
||||
public : virtual string _getTypeName() const =0;
|
||||
public : virtual string _getString() const;
|
||||
public : virtual Record* _getRecord() const;
|
||||
|
||||
};
|
||||
|
||||
|
@ -155,18 +152,12 @@ class Transistor : public Cell {
|
|||
, const unsigned& nbDrainColumn = 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&);
|
||||
|
||||
protected : void _PostCreate();
|
||||
|
||||
// Destructor
|
||||
// ***********
|
||||
public : virtual ~MaskV1Info() {};
|
||||
protected: void _PreDelete();
|
||||
|
||||
// Operators
|
||||
// *********
|
||||
|
@ -174,9 +165,9 @@ class Transistor : public Cell {
|
|||
|
||||
// Others
|
||||
// *********
|
||||
public : virtual string _GetTypeName() const { return _TName("Transistor::MaskV1Info"); };
|
||||
public : virtual string _GetString() const;
|
||||
public : virtual Record* _GetRecord() const;
|
||||
public : virtual string _getTypeName() const { return _TName("Transistor::MaskV1Info"); };
|
||||
public : virtual string _getString() const;
|
||||
public : virtual Record* _getRecord() const;
|
||||
};
|
||||
|
||||
|
||||
|
@ -199,43 +190,43 @@ class Transistor : public Cell {
|
|||
protected : Transistor(Library* library, const Name& name, char type);
|
||||
# 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__)
|
||||
protected : virtual void _PostCreate();
|
||||
protected : virtual void _postCreate();
|
||||
|
||||
|
||||
// Destructors
|
||||
// ***********
|
||||
protected : ~Transistor() {};
|
||||
protected : virtual void _PreDelete();
|
||||
protected : virtual void _preDestroy();
|
||||
# endif
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
public : char GetType() const { return _type; };
|
||||
public : MaskVersion GetMaskVersion() const { return _GetMaskInfoVersion(_masqueInfo); };
|
||||
public : const MaskInfo* GetMaskInfo() const { return _masqueInfo; };
|
||||
public : const double& GetL() const { return _masqueInfo->GetL(); };
|
||||
public : const double& GetW() const { return _masqueInfo->GetW(); };
|
||||
public : const unsigned& GetNbDrainColumn() const { return _masqueInfo->GetNbDrainColumn(); };
|
||||
public : const unsigned& GetNbSourceColumn() const { return _masqueInfo->GetNbSourceColumn(); };
|
||||
public : const char* GetDrainName() const { return "DRAIN"; };
|
||||
public : const char* GetSourceName() const { return "SOURCE"; };
|
||||
public : const char* GetGridName() const { return "GRID"; };
|
||||
public : Net* GetDrain() const { return GetNet(GetDrainName()); };
|
||||
public : Net* GetSource() const { return GetNet(GetSourceName()); };
|
||||
public : Net* GetGrid() const { return GetNet(GetGridName()); };
|
||||
public : const Type& GetAbutmentType() const { return _masqueInfo->GetType(); };
|
||||
public : char getType() const { return _type; };
|
||||
public : MaskVersion getMaskVersion() const { return _getMaskInfoVersion(_masqueInfo); };
|
||||
public : const MaskInfo* getMaskInfo() const { return _masqueInfo; };
|
||||
public : const double& getL() const { return _masqueInfo->getL(); };
|
||||
public : const double& getW() const { return _masqueInfo->getW(); };
|
||||
public : const unsigned& getNbDrainColumn() const { return _masqueInfo->getNbDrainColumn(); };
|
||||
public : const unsigned& getNbSourceColumn() const { return _masqueInfo->getNbSourceColumn(); };
|
||||
public : const char* getDrainName() const { return "DRAIN"; };
|
||||
public : const char* getSourceName() const { return "SOURCE"; };
|
||||
public : const char* getGridName() const { return "GRID"; };
|
||||
public : Net* getDrain() const { return getNet(getDrainName()); };
|
||||
public : Net* getSource() const { return getNet(getSourceName()); };
|
||||
public : Net* getGrid() const { return getNet(getGridName()); };
|
||||
public : const Type& getAbutmentType() const { return _masqueInfo->getType(); };
|
||||
|
||||
// Predicats
|
||||
// *********
|
||||
public : bool IsNmos() const { return _type==TRANSN; };
|
||||
public : bool IsPmos() const { return _type==TRANSP; };
|
||||
public : bool IsInternal() const { return GetAbutmentType().GetCode()==Type::INTERNAL; };
|
||||
public : bool IsLeft() const { return GetAbutmentType().GetCode()==Type::LEFT; };
|
||||
public : bool IsRight() const { return GetAbutmentType().GetCode()==Type::RIGHT; };
|
||||
public : bool IsSingle() const { return GetAbutmentType().GetCode()==Type::SINGLE; };
|
||||
public : bool IsInternal() const { return getAbutmentType().getCode()==Type::INTERNAL; };
|
||||
public : bool IsLeft() const { return getAbutmentType().getCode()==Type::LEFT; };
|
||||
public : bool IsRight() const { return getAbutmentType().getCode()==Type::RIGHT; };
|
||||
public : bool IsSingle() const { return getAbutmentType().getCode()==Type::SINGLE; };
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -247,20 +238,20 @@ class Transistor : public Cell {
|
|||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
// Others
|
||||
// ******
|
||||
public : virtual string _GetTypeName() const {return _TName("Transistor");};
|
||||
public : virtual string _GetString() const;
|
||||
public : virtual Record* _GetRecord() const;
|
||||
public : const GenTrans* _GetGenTrans() const {return _genTrans; };
|
||||
public : static MaskVersion _GetMaskInfoVersion(MaskInfo*) ;
|
||||
public : static MaskInfo* _CreateMaskInfo(const MaskVersion&) ;
|
||||
public : map<Net*, Box>* _GetMapNet2Box() { return &_mapNet2Box; };
|
||||
public : virtual string _getTypeName() const {return _TName("Transistor");};
|
||||
public : virtual string _getString() const;
|
||||
public : virtual Record* _getRecord() const;
|
||||
public : const GenTrans* _getGenTrans() const {return _genTrans; };
|
||||
public : static MaskVersion _getMaskInfoVersion(MaskInfo*) ;
|
||||
public : static MaskInfo* _createMaskInfo(const MaskVersion&) ;
|
||||
public : map<Net*, Box>* _getMapNet2Box() { return &_mapNet2Box; };
|
||||
|
||||
# endif
|
||||
|
||||
// Operators
|
||||
// *********
|
||||
public : void SetMaskInfo(MaskInfo*);
|
||||
public : void CreateLayout();
|
||||
public : void createLayout();
|
||||
public : void DuplicateLayout(Transistor* transistor) ;
|
||||
|
||||
|
||||
|
@ -290,8 +281,8 @@ template<>
|
|||
inline Record* ProxyRecord <Transistor::MaskVersion::Code>
|
||||
( const Transistor::MaskVersion::Code* object )
|
||||
{
|
||||
Record* record = new Record(GetString(object));
|
||||
record->Add(GetSlot("Code", (unsigned int*)object));
|
||||
Record* record = new Record(getString(object));
|
||||
record->Add(getSlot("Code", (unsigned int*)object));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -321,8 +312,8 @@ template<>
|
|||
inline Record* ProxyRecord <Transistor::Type::Code>
|
||||
( const Transistor::Type::Code* object )
|
||||
{
|
||||
Record* record = new Record(GetString(object));
|
||||
record->Add(GetSlot("Code", (unsigned int*)object));
|
||||
Record* record = new Record(getString(object));
|
||||
record->Add(getSlot("Code", (unsigned int*)object));
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -338,7 +329,7 @@ template<>
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
string GetString(const H::Transistor::MaskInfo&);
|
||||
string getString(const H::Transistor::MaskInfo&);
|
||||
|
||||
|
||||
#endif // HURRICANE_TRANSISTOR
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
INCLUDE_DIRECTORIES(${HURRICANE_INCLUDE_DIR} ${CHAMSIN_SOURCE_DIR}/src/dtr
|
||||
${CHAMSIN_SOURCE_DIR}/src/analogic)
|
||||
INCLUDE_DIRECTORIES(${HURRICANE_INCLUDE_DIR}
|
||||
${CHAMSIN_SOURCE_DIR}/src/dtr ${CHAMSIN_SOURCE_DIR}/src/analogic)
|
||||
|
||||
ADD_LIBRARY(device SHARED Device.cpp TrMos.cpp TrMos_PlaceRoute.cpp)
|
||||
|
||||
|
|
|
@ -28,15 +28,15 @@ static Instance * refins = NULL;
|
|||
static set<Cell*> cellSet;
|
||||
|
||||
|
||||
static void GetAllCells(Cell* cell)
|
||||
static void getAllCells(Cell* cell)
|
||||
// ********************************
|
||||
{
|
||||
cellSet.insert(cell);
|
||||
|
||||
if(!(cell->IsLeaf())){
|
||||
for_each_instance(instance, cell->GetInstances())
|
||||
Cell * mastercell = instance->GetMasterCell();
|
||||
GetAllCells(mastercell);
|
||||
for_each_instance(instance, cell->getInstances())
|
||||
Cell * mastercell = instance->getMasterCell();
|
||||
getAllCells(mastercell);
|
||||
end_for
|
||||
}
|
||||
}
|
||||
|
@ -57,34 +57,16 @@ Device::Device(Library* library, const Name& name)
|
|||
}
|
||||
|
||||
|
||||
void Device::Delete()
|
||||
// **************************
|
||||
{
|
||||
_PreDelete();
|
||||
delete this;
|
||||
}
|
||||
void Device::_postCreate() {
|
||||
Inherit::_postCreate();
|
||||
|
||||
|
||||
void Device::_PreDelete()
|
||||
// ******************************
|
||||
{
|
||||
// do something
|
||||
// ************
|
||||
//CDataBase* database = getCDataBase();
|
||||
//CCatal* ccatal = database->getCCatal();
|
||||
|
||||
Inherit::_PreDelete();
|
||||
}
|
||||
|
||||
|
||||
void Device::_PostCreate() {
|
||||
Inherit::_PostCreate();
|
||||
|
||||
//CDataBase* database = GetCDataBase();
|
||||
//CCatal* ccatal = database->GetCCatal();
|
||||
|
||||
//CCatal::State* state = ccatal->GetState(GetName(), true);
|
||||
//CCatal::State* state = ccatal->getState(getName(), true);
|
||||
//state->SetFlags(CCatal::State::LOGICAL|CCatal::State::PHYSICAL|CCatal::State::IN_MEMORY|CCatal::State::GDS, true);
|
||||
//state->SetCell(this);
|
||||
//state->SetLibrary(GetLibrary());
|
||||
//state->SetLibrary(getLibrary());
|
||||
|
||||
// Create GenericDtrAccess and DtrAccess
|
||||
// *************************************
|
||||
|
@ -96,9 +78,9 @@ void Device::SaveLogicalView()
|
|||
// ***************************
|
||||
{
|
||||
cellSet.clear();
|
||||
GetAllCells(this);
|
||||
getAllCells(this);
|
||||
|
||||
//CDataBase * db = GetCDataBase();
|
||||
//CDataBase * db = getCDataBase();
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
Record* Device::_GetRecord() const
|
||||
Record* Device::_getRecord() const
|
||||
// *********************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
return record;
|
||||
}
|
||||
|
||||
|
@ -133,11 +115,11 @@ void Device::_Place(Instance* ins, const Transformation::Orientation& orientatio
|
|||
}
|
||||
|
||||
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);
|
||||
Box orientedmastercellbox = transformation.getBox(ins->GetMasterCell()->GetAbutmentBox());
|
||||
Box orientedmastercellbox = transformation.getBox(ins->getMasterCell()->getAbutmentBox());
|
||||
|
||||
Point translation( point.getX() - orientedmastercellbox.getXMin()
|
||||
, point.getY() - orientedmastercellbox.getYMin() );
|
||||
|
@ -172,18 +154,18 @@ void Device::_PlaceRight(Instance* ins, const Transformation::Orientation& orien
|
|||
}
|
||||
|
||||
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) {
|
||||
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);
|
||||
Box orientedmastercellbox = transformation.getBox(ins->GetMasterCell()->GetAbutmentBox());
|
||||
Box orientedmastercellbox = transformation.getBox(ins->getMasterCell()->getAbutmentBox());
|
||||
|
||||
Point translation( refinsbox.getXMax() - orientedmastercellbox.getXMin() + offset.getX()
|
||||
, refinsbox.getYMin() - orientedmastercellbox.getYMin() + offset.getY() );
|
||||
|
|
|
@ -49,14 +49,9 @@ class Device : public Cell {
|
|||
// Constructors
|
||||
// ************
|
||||
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
|
||||
|
||||
// Operations
|
||||
|
@ -79,9 +74,9 @@ class Device : public Cell {
|
|||
|
||||
// Others
|
||||
// ******
|
||||
public: virtual string _GetTypeName() const {return _TName("Device"); };
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("Device"); };
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
public : virtual void _Flush() = 0;
|
||||
|
||||
// Description of Layout
|
||||
|
|
|
@ -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->_PostCreate();
|
||||
trmos->_postCreate();
|
||||
return trmos;
|
||||
}
|
||||
|
||||
|
||||
void TrMos::Delete()
|
||||
// *****************
|
||||
{
|
||||
_PreDelete();
|
||||
delete this;
|
||||
}
|
||||
|
||||
|
||||
void TrMos::_PreDelete()
|
||||
// ******************************
|
||||
{
|
||||
// do something
|
||||
// ************
|
||||
|
||||
Inherit::_PreDelete();
|
||||
}
|
||||
|
||||
|
||||
void TrMos::_PostCreate() {
|
||||
Inherit::_PostCreate();
|
||||
void TrMos::_postCreate() {
|
||||
Inherit::_postCreate();
|
||||
|
||||
// do something.
|
||||
// Initialize pin order list and other attributes.
|
||||
|
@ -81,7 +62,7 @@ void TrMos::_PostCreate() {
|
|||
_lowPinOrder.push_back(S);
|
||||
_lowPinOrder.push_back(B);
|
||||
|
||||
double minWidth = (DtrAccess::Instance())->GetSingleRealRuleByLabel(string("RW_ALU1"));
|
||||
double minWidth = (DtrAccess::Instance())->getSingleRealRuleByLabel(string("RW_ALU1"));
|
||||
|
||||
_widthOfSourceWire = minWidth;
|
||||
_widthOfDrainWire = minWidth;
|
||||
|
@ -89,21 +70,21 @@ void TrMos::_PostCreate() {
|
|||
}
|
||||
|
||||
|
||||
Transistors TrMos::GetTransistors() const {
|
||||
return GetCollection(_transistorList);
|
||||
Transistors TrMos::getTransistors() const {
|
||||
return getCollection(_transistorList);
|
||||
}
|
||||
|
||||
|
||||
void TrMos::Create(const char type, const bool isbsconnected)
|
||||
void TrMos::create(const char type, const bool isbsconnected)
|
||||
// **********************************************************
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -111,7 +92,7 @@ void TrMos::Create(const char type, const bool isbsconnected)
|
|||
|
||||
// MetaTransistor is in the same library than Trmos
|
||||
// ************************************************
|
||||
Library * library = GetLibrary();
|
||||
Library * library = getLibrary();
|
||||
|
||||
// Create signals
|
||||
// **************
|
||||
|
@ -120,12 +101,12 @@ void TrMos::Create(const char type, const bool isbsconnected)
|
|||
Net * grid = NULL;
|
||||
Net * bulk = NULL;
|
||||
|
||||
(drain = Net::Create(this, Name("drain")))->SetExternal(true);
|
||||
(source = Net::Create(this, Name("source")))->SetExternal(true);
|
||||
(grid = Net::Create(this, Name("grid")))->SetExternal(true);
|
||||
(drain = Net::create(this, Name("drain")))->SetExternal(true);
|
||||
(source = Net::create(this, Name("source")))->SetExternal(true);
|
||||
(grid = Net::create(this, Name("grid")))->SetExternal(true);
|
||||
|
||||
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
|
||||
// ****************************************************
|
||||
|
||||
_tr1 = MetaTransistor::Create(library, Name( GetString(GetName())+"_Mos1" ), _type);
|
||||
Instance * instance = Instance::Create(this,
|
||||
Name("Ins_" + GetString(_tr1->GetName())),
|
||||
_tr1 = MetaTransistor::create(library, Name( getString(getName())+"_Mos1" ), _type);
|
||||
Instance * instance = Instance::create(this,
|
||||
Name("Ins_" + getString(_tr1->getName())),
|
||||
_tr1);
|
||||
|
||||
instance->GetPlug(_tr1->GetNet(Name("DRAIN")))->SetNet(drain);
|
||||
instance->GetPlug(_tr1->GetNet(Name("SOURCE")))->SetNet(source);
|
||||
instance->GetPlug(_tr1->GetNet(Name("GRID")))->SetNet(grid);
|
||||
instance->getPlug(_tr1->getNet(Name("DRAIN")))->SetNet(drain);
|
||||
instance->getPlug(_tr1->getNet(Name("SOURCE")))->SetNet(source);
|
||||
instance->getPlug(_tr1->getNet(Name("GRID")))->SetNet(grid);
|
||||
|
||||
if(!isbsconnected)
|
||||
instance->GetPlug(_tr1->GetNet(Name("BULK")))->SetNet(bulk);
|
||||
instance->getPlug(_tr1->getNet(Name("BULK")))->SetNet(bulk);
|
||||
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 ) {
|
||||
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.");
|
||||
}
|
||||
|
||||
// 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");
|
||||
// }
|
||||
|
||||
// Check out param of realization.
|
||||
// *******************************
|
||||
if( m <= 0 )
|
||||
throw Error("Can't generate for " + GetString(this) + " : m "
|
||||
+ GetString(m) + " is invalid.");
|
||||
throw Error("Can't generate for " + getString(this) + " : m "
|
||||
+ getString(m) + " is invalid.");
|
||||
|
||||
if(nbsourcecolumn<1)
|
||||
throw Error("Can't generate for " + GetString(this)
|
||||
+ " : nbsourcecolumn " + GetString(nbsourcecolumn) + " is invalid.");
|
||||
throw Error("Can't generate for " + getString(this)
|
||||
+ " : nbsourcecolumn " + getString(nbsourcecolumn) + " is invalid.");
|
||||
|
||||
if(nbdraincolumn<1)
|
||||
throw Error("Can't generate for" + GetString(this) + " : nbdraincolumn "
|
||||
+ GetString(nbdraincolumn) + " is invalid.");
|
||||
throw Error("Can't generate for" + getString(this) + " : nbdraincolumn "
|
||||
+ getString(nbdraincolumn) + " is invalid.");
|
||||
|
||||
|
||||
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
|
||||
// *****************************************
|
||||
Library * library = GetLibrary();
|
||||
Library * library = getLibrary();
|
||||
|
||||
cout << ts << "################################################################" << endl <<
|
||||
ts << "#### BEGIN AUTOGENERATON FOR " + _GetTypeName() + " " + GetString(GetName()) + " #####" << endl <<
|
||||
ts << "#### BEGIN AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" << endl <<
|
||||
ts << "################################################################" << endl << endl;
|
||||
|
||||
// OpenUpdateSession();
|
||||
|
@ -201,7 +182,7 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
/* (1) */
|
||||
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << "*** Stage 1 : CreateLayout of " + GetString(this) + " Begin ***" <<endl;
|
||||
cout << "*** Stage 1 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
|
||||
END_IF
|
||||
|
||||
// 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);
|
||||
|
||||
for(unsigned i=0; i<m; i++){
|
||||
Transistor* finger = Transistor::Create(library,
|
||||
GetString(_tr1->GetName()) + "_Finger_" + GetString(i),
|
||||
Transistor* finger = Transistor::create(library,
|
||||
getString(_tr1->getName()) + "_Finger_" + getString(i),
|
||||
_type);
|
||||
|
||||
_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
|
||||
|
||||
cout << "*** Stage 1 : CreateLayout of " + GetString(this) + " finish ***" <<endl;
|
||||
cout << ts << GetString(_tr1) + " 's M is " + GetString(_tr1->GetM()) + ".\n"
|
||||
<< ts << GetString(_m) + " Transistors are created.\n" <<endl;
|
||||
cout << "*** Stage 1 : CreateLayout of " + getString(this) + " finish ***" <<endl;
|
||||
cout << ts << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n"
|
||||
<< ts << getString(_m) + " Transistors are created.\n" <<endl;
|
||||
|
||||
END_IF
|
||||
|
||||
/* (2) */
|
||||
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << "*** Stage 2 : CreateLayout of " + GetString(this) + " Begin ***" <<endl;
|
||||
cout << "*** Stage 2 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
|
||||
END_IF
|
||||
|
||||
// Create connexion for each MetaTransistor.
|
||||
// *****************************************
|
||||
_tr1->CreateConnection();
|
||||
_tr1->createConnection();
|
||||
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << "*** Stage 2 : CreateLayout of " + GetString(this) + " finish ***" <<endl;
|
||||
cout << " The connection in " + GetString(_tr1) + " is created.\n"
|
||||
cout << "*** Stage 2 : CreateLayout of " + getString(this) + " finish ***" <<endl;
|
||||
cout << " The connection in " + getString(_tr1) + " is created.\n"
|
||||
<<endl;
|
||||
END_IF
|
||||
|
||||
|
@ -252,16 +233,16 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
|
||||
/* (3) */
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << "*** Stage 3 : CreateLayout of " + GetString(this) + " Begin ***" <<endl;
|
||||
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
|
||||
END_IF
|
||||
|
||||
// Set dessin Parameter of generation for each finger.
|
||||
// ***************************************************
|
||||
double l_finger = _tr1->GetLe() ;
|
||||
double w_finger = (_tr1->GetWe()) / (double)(_tr1->GetM()) ;
|
||||
double l_finger = _tr1->getLe() ;
|
||||
double w_finger = (_tr1->getWe()) / (double)(_tr1->getM()) ;
|
||||
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->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
|
||||
cout << "*** Stage 3 : CreateLayout of " + GetString(this) + " finish ***" <<endl;
|
||||
cout << ts << "Real l_finger is " + GetString(l_finger) + "." << endl
|
||||
<< ts << "Real w_finger is " + GetString(w_finger) + "." << endl
|
||||
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " finish ***" <<endl;
|
||||
cout << ts << "Real l_finger is " + getString(l_finger) + "." << endl
|
||||
<< ts << "Real w_finger is " + getString(w_finger) + "." << endl
|
||||
<<endl;
|
||||
END_IF
|
||||
|
||||
/* (4) */
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << "*** Stage 4 : CreateLayout of " + GetString(this) + " Begin ***" <<endl;
|
||||
cout << ts << "Call GenerateLayout for " + GetString(_tr1)
|
||||
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
|
||||
cout << ts << "Call GenerateLayout for " + getString(_tr1)
|
||||
+ " who will launch the generator of its fingers" << ".\n"
|
||||
<<endl;
|
||||
END_IF
|
||||
|
@ -327,15 +308,15 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
//
|
||||
// IF_DEBUG_HUR_ANALOG
|
||||
// cout << 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
|
||||
// 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
|
||||
// <<endl;
|
||||
// END_IF
|
||||
//
|
||||
_tr1->CreateLayout();
|
||||
_tr1->createLayout();
|
||||
|
||||
IF_DEBUG_HUR_ANALOG
|
||||
cout << "*** Stage 4 : CreateLayout of " + GetString(this) + " finish ***"<<endl
|
||||
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " finish ***"<<endl
|
||||
<< endl;
|
||||
END_IF
|
||||
|
||||
|
@ -348,13 +329,13 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
|
|||
|
||||
cout << " Place And Route " <<endl;
|
||||
|
||||
for_each_instance(instance, GetInstances())
|
||||
//instance->SetTransformation(instance->GetTransformation());
|
||||
for_each_instance(instance, getInstances())
|
||||
//instance->SetTransformation(instance->getTransformation());
|
||||
instance->Unmaterialize();
|
||||
instance->Materialize();
|
||||
|
||||
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_for
|
||||
|
@ -362,18 +343,18 @@ END_IF
|
|||
// CloseUpdateSession();
|
||||
|
||||
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
|
||||
|
||||
Materialize();
|
||||
|
||||
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
|
||||
|
||||
cout << ts << endl
|
||||
<< ts << "################################################################" <<endl
|
||||
<< ts << "#### END AUTOGENERATON FOR " + _GetTypeName() + " " + GetString(GetName()) + " #####" <<endl
|
||||
<< ts << "#### END AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" <<endl
|
||||
<< ts << "################################################################" <<endl
|
||||
<< endl;
|
||||
}
|
||||
|
@ -418,7 +399,7 @@ void TrMos::_Flush()
|
|||
// ****************
|
||||
{
|
||||
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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
Record* TrMos::_GetRecord() const
|
||||
Record* TrMos::_getRecord() const
|
||||
// *********************************
|
||||
{
|
||||
Record* record = Inherit::_GetRecord();
|
||||
Record* record = Inherit::_getRecord();
|
||||
return record;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,19 +85,13 @@ class TrMos : public Device {
|
|||
// Constructors
|
||||
// ************
|
||||
protected : TrMos(Library* library, const Name& name);
|
||||
protected : virtual void _PostCreate();
|
||||
protected : virtual void _postCreate();
|
||||
#endif
|
||||
|
||||
public : static TrMos* Create(Library* library, const Name & name);
|
||||
public : static TrMos* create(Library* library, const Name & name);
|
||||
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
// Destructors
|
||||
// ***********
|
||||
protected : ~TrMos() {};
|
||||
public : virtual void Delete();
|
||||
protected : virtual void _PreDelete();
|
||||
|
||||
|
||||
// Operations
|
||||
// **********
|
||||
|
@ -106,18 +100,18 @@ class TrMos : public Device {
|
|||
#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,
|
||||
const unsigned nbsourcecolumn, const unsigned nbdraincolumn);
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
public : char GetType() const { return _type; };
|
||||
public : unsigned GetM() const { return _m; };
|
||||
public : const double GetWidthOfSourceWire() const { return _widthOfSourceWire; };
|
||||
public : const double GetWidthOfDrainWire() const { return _widthOfDrainWire; };
|
||||
public : MetaTransistor* GetTr1() const { return _tr1; };
|
||||
public : Transistors GetTransistors() const ;
|
||||
public : char getType() const { return _type; };
|
||||
public : unsigned getM() const { return _m; };
|
||||
public : const double getWidthOfSourceWire() const { return _widthOfSourceWire; };
|
||||
public : const double getWidthOfDrainWire() const { return _widthOfDrainWire; };
|
||||
public : MetaTransistor* getTr1() const { return _tr1; };
|
||||
public : Transistors getTransistors() const ;
|
||||
|
||||
// Updators
|
||||
// ********
|
||||
|
@ -139,15 +133,15 @@ class TrMos : public Device {
|
|||
|
||||
// Others
|
||||
// ******
|
||||
public: virtual string _GetTypeName() const {return _TName("TrMos"); };
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("TrMos"); };
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: vector<PinName>& GetLowPinOrder() { return _lowPinOrder; };
|
||||
public: vector<PinName>& GetHighPinOrder() { return _highPinOrder; };
|
||||
public: vector<PinName>& getLowPinOrder() { return _lowPinOrder; };
|
||||
public: vector<PinName>& getHighPinOrder() { return _highPinOrder; };
|
||||
|
||||
public: map<Net*, Pin*>& GetMapNetToPinBoxInLeftSide() { return _mapNetToPinBoxInLeftSide; };
|
||||
public: map<Net*, Pin*>& GetMapNetToPinBoxInRightSide() { return _mapNetToPinBoxInRightSide; };
|
||||
public: map<Net*, Pin*>& getMapNetToPinBoxInLeftSide() { return _mapNetToPinBoxInLeftSide; };
|
||||
public: map<Net*, Pin*>& getMapNetToPinBoxInRightSide() { return _mapNetToPinBoxInRightSide; };
|
||||
|
||||
public : virtual void _Flush();
|
||||
protected : void _PlaceAndRoute();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
@ -48,19 +48,19 @@ void TrMos::_PlaceAndRoute()
|
|||
if(_type == 'P') type = 'N';
|
||||
else type = 'P';
|
||||
|
||||
long minImpWidth = dtraccess->GetSingleRdsRuleByLabel("RW_", GetString(type), "IMP");
|
||||
long minContWidth = dtraccess->GetSingleRdsRuleByLabel(string("RW_CONT"));
|
||||
long minAlu1Width = dtraccess->GetSingleRdsRuleByLabel(string("RW_ALU1"));
|
||||
long minVia1Width = dtraccess->GetSingleRdsRuleByLabel(string("RW_VIA1"));
|
||||
long minImpWidth = dtraccess->getSingleRdsRuleByLabel("RW_", getString(type), "IMP");
|
||||
long minContWidth = dtraccess->getSingleRdsRuleByLabel(string("RW_CONT"));
|
||||
long minAlu1Width = dtraccess->getSingleRdsRuleByLabel(string("RW_ALU1"));
|
||||
long minVia1Width = dtraccess->getSingleRdsRuleByLabel(string("RW_VIA1"));
|
||||
|
||||
long rdImp = dtraccess->GetSingleRdsRuleByLabel(string("RD_NIMP"));
|
||||
long rdActive = dtraccess->GetSingleRdsRuleByLabel(string("RD_ACTI"));
|
||||
long rdAlu2 = dtraccess->GetSingleRdsRuleByLabel(string("RD_ALU1"));
|
||||
long rdImp = dtraccess->getSingleRdsRuleByLabel(string("RD_NIMP"));
|
||||
long rdActive = dtraccess->getSingleRdsRuleByLabel(string("RD_ACTI"));
|
||||
long rdAlu2 = dtraccess->getSingleRdsRuleByLabel(string("RD_ALU1"));
|
||||
|
||||
long reImpActi = dtraccess->GetSingleRdsRuleByLabel("RE_", GetString(type), "IMP_CONT");
|
||||
long reActiContact = dtraccess->GetSingleRdsRuleByLabel("RE_ACTI_CONT");
|
||||
long reAlu1Contact = dtraccess->GetSingleRdsRuleByLabel("RE_ALU1_CONT");
|
||||
long reAlu1Via1 = dtraccess->GetSingleRdsRuleByLabel("RE_ALU1_VIA1");
|
||||
long reImpActi = dtraccess->getSingleRdsRuleByLabel("RE_", getString(type), "IMP_CONT");
|
||||
long reActiContact = dtraccess->getSingleRdsRuleByLabel("RE_ACTI_CONT");
|
||||
long reAlu1Contact = dtraccess->getSingleRdsRuleByLabel("RE_ALU1_CONT");
|
||||
long reAlu1Via1 = dtraccess->getSingleRdsRuleByLabel("RE_ALU1_VIA1");
|
||||
|
||||
long minActiWidth = 2*reActiContact + minContWidth;
|
||||
|
||||
|
@ -85,19 +85,19 @@ void TrMos::_PlaceAndRoute()
|
|||
Instance * leftins = NULL;
|
||||
Instance * rightins = NULL;
|
||||
|
||||
OccurrenceLocator locator = GetLeafInstanceOccurrences().GetLocator();
|
||||
Instance * instance = dynamic_cast<Instance*>(locator.GetElement().GetEntity());;
|
||||
fingerHeight = instance->GetCell()->GetBoundingBox().getHeight();
|
||||
horizontalMargin = GetUnit(RETURN_EVEN((long)(GetValue(fingerHeight))/4));
|
||||
verticalLowMargin = GetUnit(RETURN_EVEN((long)(GetValue(fingerHeight))/2));
|
||||
verticalHighMargin = GetUnit(RETURN_EVEN((long)(GetValue(fingerHeight))/2));
|
||||
OccurrenceLocator locator = getLeafInstanceOccurrences().getLocator();
|
||||
Instance * instance = dynamic_cast<Instance*>(locator.getElement().getEntity());;
|
||||
fingerHeight = instance->getCell()->getBoundingBox().getHeight();
|
||||
horizontalMargin = getUnit(RETURN_EVEN((long)(getValue(fingerHeight))/4));
|
||||
verticalLowMargin = 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)) );
|
||||
|
||||
verticalHighMargin = MAX_INTEGER(verticalHighMargin, horizontalMargin + GetUnit(2*rdAlu2 + 2*widthOfDrainWire) );
|
||||
horizontalMargin = MAX_INTEGER(horizontalMargin, GetUnit(RETURN_EVEN(rdImp + widthOfImp/2)) );
|
||||
verticalHighMargin = MAX_INTEGER(verticalHighMargin, horizontalMargin + getUnit(2*rdAlu2 + 2*widthOfDrainWire) );
|
||||
horizontalMargin = MAX_INTEGER(horizontalMargin, getUnit(RETURN_EVEN(rdImp + widthOfImp/2)) );
|
||||
|
||||
OpenUpdateSession();
|
||||
|
||||
|
@ -108,11 +108,11 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
}
|
||||
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())
|
||||
instance = dynamic_cast<Instance*>(occurrence.GetEntity());
|
||||
Transistor * trans = dynamic_cast<Transistor*>(instance->GetMasterCell());
|
||||
for_each_occurrence(occurrence, getLeafInstanceOccurrences())
|
||||
instance = dynamic_cast<Instance*>(occurrence.getEntity());
|
||||
Transistor * trans = dynamic_cast<Transistor*>(instance->getMasterCell());
|
||||
|
||||
if ( _sourceIsFirst ) {
|
||||
if(trans->IsLeft() && !leftins)
|
||||
|
@ -152,9 +152,9 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
// 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 )
|
||||
continue;
|
||||
|
@ -170,7 +170,7 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
// Place the last finger.
|
||||
// **********************
|
||||
Transistor * trans = dynamic_cast<Transistor*>(rightins->GetMasterCell());
|
||||
Transistor * trans = dynamic_cast<Transistor*>(rightins->getMasterCell());
|
||||
|
||||
if( trans->IsRight())
|
||||
_PlaceRight( rightins, Transformation::Orientation::ID);
|
||||
|
@ -185,7 +185,7 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
// Set AbutmentBox.
|
||||
// ****************
|
||||
for_each_instance(instance, GetInstances())
|
||||
for_each_instance(instance, getInstances())
|
||||
instance->Unmaterialize();
|
||||
instance->Materialize();
|
||||
end_for
|
||||
|
@ -193,11 +193,11 @@ void TrMos::_PlaceAndRoute()
|
|||
OpenUpdateSession();
|
||||
|
||||
|
||||
cout <<"Bounding box of TrMos is "<<GetString(GetBoundingBox())<<endl;
|
||||
cout <<"Bounding box of TrMos is "<<getString(getBoundingBox())<<endl;
|
||||
|
||||
SetAbutmentBox(Box(0, 0,
|
||||
GetBoundingBox().getWidth() + 2*horizontalMargin,
|
||||
GetBoundingBox().getHeight() + verticalLowMargin + verticalHighMargin
|
||||
getBoundingBox().getWidth() + 2*horizontalMargin,
|
||||
getBoundingBox().getHeight() + verticalLowMargin + verticalHighMargin
|
||||
)
|
||||
);
|
||||
|
||||
|
@ -206,9 +206,9 @@ void TrMos::_PlaceAndRoute()
|
|||
// Routing .
|
||||
// **************************************************************
|
||||
|
||||
Unit expectedInterval = GetUnit(RETURN_EVEN((long)(GetValue(horizontalMargin))/2));
|
||||
Unit expectedInterval = getUnit(RETURN_EVEN((long)(getValue(horizontalMargin))/2));
|
||||
Unit interval = 0;
|
||||
Unit initialPosition = verticalLowMargin + fingerHeight + GetUnit(rdAlu2 + widthOfDrainWire/2);
|
||||
Unit initialPosition = verticalLowMargin + fingerHeight + getUnit(rdAlu2 + widthOfDrainWire/2);
|
||||
|
||||
map<string, Unit> netName2PositionOfConnectorMap;
|
||||
list<Box> routingZoneList;
|
||||
|
@ -217,28 +217,28 @@ void TrMos::_PlaceAndRoute()
|
|||
Unit sourceRoutingZoneWidth;
|
||||
Unit drainRoutingZoneWidth;
|
||||
|
||||
DataBase * db = GetDataBase();
|
||||
if(!db) throw Error("Can't launch Trmos::PlaceAndRoute for " + GetString(this) + " : can't find DataBase");
|
||||
DataBase * db = getDataBase();
|
||||
if(!db) throw Error("Can't launch Trmos::PlaceAndRoute for " + getString(this) + " : can't find DataBase");
|
||||
|
||||
Layer * layerAlu1 = db->GetTechnology()->GetLayer(Name("ALU1"));
|
||||
Layer * layerAlu2 = db->GetTechnology()->GetLayer(Name("ALU2"));
|
||||
Layer * layerAlu1 = db->getTechnology()->getLayer(Name("ALU1"));
|
||||
Layer * layerAlu2 = db->getTechnology()->getLayer(Name("ALU2"));
|
||||
|
||||
Layer * layerVia1 = db->GetTechnology()->GetLayer(Name("VIA1"));
|
||||
Layer * layerActive = db->GetTechnology()->GetLayer(Name("ACTIVE"));
|
||||
Layer * layerVia1 = db->getTechnology()->getLayer(Name("VIA1"));
|
||||
Layer * layerActive = db->getTechnology()->getLayer(Name("ACTIVE"));
|
||||
|
||||
Layer * layerVia01 = db->GetTechnology()->GetLayer(Name("via01"));
|
||||
Layer * layerVia12 = db->GetTechnology()->GetLayer(Name("via12"));
|
||||
Layer * layerVia01 = db->getTechnology()->getLayer(Name("via01"));
|
||||
Layer * layerVia12 = db->getTechnology()->getLayer(Name("via12"));
|
||||
|
||||
Layer * layerPoly = db->GetTechnology()->GetLayer(Name("POLY"));
|
||||
Layer * layerNwell = db->GetTechnology()->GetLayer(Name("NWELL"));
|
||||
Layer * layerCont = db->GetTechnology()->GetLayer(Name("CONT"));
|
||||
Layer * layerPoly = db->getTechnology()->getLayer(Name("POLY"));
|
||||
Layer * layerNwell = db->getTechnology()->getLayer(Name("NWELL"));
|
||||
Layer * layerCont = db->getTechnology()->getLayer(Name("CONT"));
|
||||
|
||||
Layer * layerImp = NULL;
|
||||
|
||||
if(_type == 'P')
|
||||
layerImp = db->GetTechnology()->GetLayer(Name("NIMP"));
|
||||
layerImp = db->getTechnology()->getLayer(Name("NIMP"));
|
||||
else
|
||||
layerImp = db->GetTechnology()->GetLayer(Name("PIMP"));
|
||||
layerImp = db->getTechnology()->getLayer(Name("PIMP"));
|
||||
|
||||
Pin * pin = NULL; // For get the adresse of Created Pins.
|
||||
|
||||
|
@ -259,7 +259,7 @@ void TrMos::_PlaceAndRoute()
|
|||
if(*i == G)
|
||||
netName2PositionOfConnectorMap[string("grid")] = initialPosition;
|
||||
|
||||
interval = MAX_INTEGER(expectedInterval, GetUnit(widthOfDrainWire + rdAlu2));
|
||||
interval = MAX_INTEGER(expectedInterval, getUnit(widthOfDrainWire + rdAlu2));
|
||||
|
||||
// initialPosition += horizontalMargin/2;
|
||||
initialPosition += interval;
|
||||
|
@ -270,8 +270,8 @@ void TrMos::_PlaceAndRoute()
|
|||
n = _lowPinOrder.end();
|
||||
|
||||
//initialPosition = verticalMargin - horizontalMargin/2;
|
||||
//initialPosition = verticalLowMargin - MAX_INTEGER(expectedInterval, GetUnit(rdImp + widthOfImp/2));
|
||||
initialPosition = verticalLowMargin - GetUnit(rdImp + widthOfImp/2);
|
||||
//initialPosition = verticalLowMargin - MAX_INTEGER(expectedInterval, getUnit(rdImp + widthOfImp/2));
|
||||
initialPosition = verticalLowMargin - getUnit(rdImp + widthOfImp/2);
|
||||
|
||||
while(m!=n) {
|
||||
if(*m == S)
|
||||
|
@ -279,7 +279,7 @@ void TrMos::_PlaceAndRoute()
|
|||
if(*m == B)
|
||||
netName2PositionOfConnectorMap[string("bulk")] = initialPosition;
|
||||
|
||||
interval = MAX_INTEGER(expectedInterval, GetUnit(rdAlu2 + widthOfSourceWire));
|
||||
interval = MAX_INTEGER(expectedInterval, getUnit(rdAlu2 + widthOfSourceWire));
|
||||
|
||||
initialPosition -= interval;
|
||||
m++;
|
||||
|
@ -292,38 +292,38 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
// 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;
|
||||
|
||||
// Get Routing Zone.
|
||||
// get Routing Zone.
|
||||
// *****************
|
||||
HyperNet hyperNet(Occurrence(net, Path()));
|
||||
for_each_occurrence(occurrence, hyperNet.GetNetOccurrences()) // For all net occurrences.
|
||||
Net * net = dynamic_cast<Net*>(occurrence.GetEntity());
|
||||
for_each_occurrence(occurrence, hyperNet.getNetOccurrences()) // For all net occurrences.
|
||||
Net * net = dynamic_cast<Net*>(occurrence.getEntity());
|
||||
Box routingZone;
|
||||
|
||||
if(net->GetCell()->IsLeaf()) {
|
||||
Transistor * trans = dynamic_cast<Transistor*>(net->GetCell());
|
||||
if(net->getCell()->IsLeaf()) {
|
||||
Transistor * trans = dynamic_cast<Transistor*>(net->getCell());
|
||||
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");
|
||||
|
||||
cout << GetString(occurrence) << endl;
|
||||
cout << GetString(occurrence.GetPath().GetTransformation()) <<endl;
|
||||
cout << GetString((*(trans->_GetMapNet2Box()))[net]) << endl;
|
||||
cout << getString(occurrence) << endl;
|
||||
cout << getString(occurrence.getPath().getTransformation()) <<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);
|
||||
|
||||
if(GetString(net->GetName())=="SOURCE") {
|
||||
if(getString(net->getName())=="SOURCE") {
|
||||
sourcePositionList.push_back(routingZone.getXCenter());
|
||||
sourceRoutingZoneWidth = routingZone.getWidth();
|
||||
}
|
||||
else if (GetString(net->GetName())=="DRAIN") {
|
||||
else if (getString(net->getName())=="DRAIN") {
|
||||
drainPositionList.push_back(routingZone.getXCenter());
|
||||
drainRoutingZoneWidth = routingZone.getWidth();
|
||||
}
|
||||
|
@ -332,26 +332,26 @@ void TrMos::_PlaceAndRoute()
|
|||
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(),
|
||||
it_end_listbox = routingZoneList.end();
|
||||
|
||||
while(it_begin_listbox != it_end_listbox)
|
||||
{
|
||||
cout<< GetString(*it_begin_listbox) <<endl;
|
||||
cout<< getString(*it_begin_listbox) <<endl;
|
||||
it_begin_listbox++;
|
||||
}
|
||||
|
||||
cout <<"End Print Routing Zone for "<<GetString(net)<<endl;
|
||||
cout <<"End Print Routing Zone for "<<getString(net)<<endl;
|
||||
|
||||
// Create routing line.
|
||||
// ********************
|
||||
list<Box>::iterator routingzonelist_begin_it = routingZoneList.begin(),
|
||||
routingzonelist_end_it = routingZoneList.end();
|
||||
|
||||
connectorPosition = netName2PositionOfConnectorMap[GetString(net->GetName())];
|
||||
cout << "Connector Position is " << netName2PositionOfConnectorMap[GetString(net)] << endl;
|
||||
connectorPosition = netName2PositionOfConnectorMap[getString(net->getName())];
|
||||
cout << "Connector Position is " << netName2PositionOfConnectorMap[getString(net)] << endl;
|
||||
|
||||
while(routingzonelist_begin_it!=routingzonelist_end_it) {
|
||||
|
||||
|
@ -360,22 +360,22 @@ void TrMos::_PlaceAndRoute()
|
|||
// Create vertical line and Contact.
|
||||
// ********************************
|
||||
if(connectorPosition > routingZoneBox.getYMin()) {
|
||||
Vertical::Create(net, layerAlu1, routingZoneBox.getXCenter()
|
||||
, routingZoneBox.getWidth() + GetUnit(2*reAlu1Contact)
|
||||
, routingZoneBox.getYMin() - GetUnit(reAlu1Contact)
|
||||
Vertical::create(net, layerAlu1, routingZoneBox.getXCenter()
|
||||
, routingZoneBox.getWidth() + getUnit(2*reAlu1Contact)
|
||||
, routingZoneBox.getYMin() - getUnit(reAlu1Contact)
|
||||
, connectorPosition);
|
||||
}
|
||||
else {
|
||||
Vertical::Create(net, layerAlu1, routingZoneBox.getXCenter()
|
||||
, routingZoneBox.getWidth() + GetUnit(2*reAlu1Contact)
|
||||
Vertical::create(net, layerAlu1, routingZoneBox.getXCenter()
|
||||
, routingZoneBox.getWidth() + getUnit(2*reAlu1Contact)
|
||||
, connectorPosition
|
||||
, routingZoneBox.getYMax() + GetUnit(reAlu1Contact) ) ;
|
||||
, routingZoneBox.getYMax() + getUnit(reAlu1Contact) ) ;
|
||||
}
|
||||
|
||||
Contact::Create(net, layerVia12, routingZoneBox.getXCenter()
|
||||
Contact::create(net, layerVia12, routingZoneBox.getXCenter()
|
||||
, connectorPosition
|
||||
, GetUnit(minVia1Width)
|
||||
, GetUnit(minVia1Width)
|
||||
, getUnit(minVia1Width)
|
||||
, getUnit(minVia1Width)
|
||||
);
|
||||
|
||||
routingzonelist_begin_it ++ ;
|
||||
|
@ -385,44 +385,44 @@ void TrMos::_PlaceAndRoute()
|
|||
// ***********************
|
||||
long widthOfWire = 0;
|
||||
|
||||
if(GetString(net->GetName())=="source")
|
||||
if(getString(net->getName())=="source")
|
||||
widthOfWire = widthOfSourceWire;
|
||||
else if(GetString(net->GetName())=="drain")
|
||||
else if(getString(net->getName())=="drain")
|
||||
widthOfWire = widthOfDrainWire;
|
||||
else
|
||||
widthOfWire = widthOfDrainWire;
|
||||
|
||||
|
||||
Horizontal::Create(net, layerAlu2, connectorPosition
|
||||
, GetUnit(widthOfWire)
|
||||
Horizontal::create(net, layerAlu2, connectorPosition
|
||||
, getUnit(widthOfWire)
|
||||
, 0
|
||||
, GetAbutmentBox().getXMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
);
|
||||
|
||||
// Create Two Pins.
|
||||
// ****************
|
||||
pin = Pin::Create(net
|
||||
, Name(GetString(net->GetName())+"_west")
|
||||
pin = Pin::create(net
|
||||
, Name(getString(net->getName())+"_west")
|
||||
, Pin::AccessDirection(Pin::AccessDirection::WEST)
|
||||
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
|
||||
, layerAlu2
|
||||
, GetAbutmentBox().getXMin()
|
||||
, getAbutmentBox().getXMin()
|
||||
, connectorPosition
|
||||
, GetUnit(widthOfWire)
|
||||
, GetUnit(widthOfWire)
|
||||
, getUnit(widthOfWire)
|
||||
, getUnit(widthOfWire)
|
||||
);
|
||||
|
||||
_mapNetToPinBoxInLeftSide[net] = pin;
|
||||
|
||||
pin = Pin::Create(net
|
||||
, Name(GetString(net->GetName())+"_east")
|
||||
pin = Pin::create(net
|
||||
, Name(getString(net->getName())+"_east")
|
||||
, Pin::AccessDirection(Pin::AccessDirection::EAST)
|
||||
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
|
||||
, layerAlu2
|
||||
, GetAbutmentBox().getXMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
, connectorPosition
|
||||
, GetUnit(widthOfWire)
|
||||
, GetUnit(widthOfWire)
|
||||
, getUnit(widthOfWire)
|
||||
, getUnit(widthOfWire)
|
||||
);
|
||||
|
||||
_mapNetToPinBoxInRightSide[net] = pin;
|
||||
|
@ -437,10 +437,10 @@ void TrMos::_PlaceAndRoute()
|
|||
// ***************
|
||||
connectorPosition = netName2PositionOfConnectorMap[string("bulk")];
|
||||
|
||||
Net * netBulk = GetNet(Name("bulk"));
|
||||
Net * netBulk = getNet(Name("bulk"));
|
||||
|
||||
if(!netBulk) // bulk and source are connected.
|
||||
netBulk = GetNet(Name("source"));
|
||||
netBulk = getNet(Name("source"));
|
||||
|
||||
// Calculate the width of Contact Alu1.
|
||||
// ************************************
|
||||
|
@ -449,56 +449,56 @@ void TrMos::_PlaceAndRoute()
|
|||
Unit bulkPosition = netName2PositionOfConnectorMap[string("bulk")];
|
||||
Unit sourcePosition = netName2PositionOfConnectorMap[string("source")];
|
||||
|
||||
Horizontal::Create( netBulk
|
||||
Horizontal::create( netBulk
|
||||
, layerImp
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfImp)
|
||||
, 0 - GetUnit(reImpActi)
|
||||
, GetAbutmentBox().getXMax() + GetUnit(reImpActi)
|
||||
, getUnit(widthOfImp)
|
||||
, 0 - getUnit(reImpActi)
|
||||
, getAbutmentBox().getXMax() + getUnit(reImpActi)
|
||||
);
|
||||
|
||||
Horizontal::Create( netBulk
|
||||
Horizontal::create( netBulk
|
||||
, layerActive
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfActive)
|
||||
, getUnit(widthOfActive)
|
||||
, 0
|
||||
, GetAbutmentBox().getXMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
);
|
||||
|
||||
Horizontal::Create( netBulk
|
||||
Horizontal::create( netBulk
|
||||
, layerAlu2
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfSourceWire)
|
||||
, getUnit(widthOfSourceWire)
|
||||
, 0
|
||||
, GetAbutmentBox().getXMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
);
|
||||
|
||||
// Create Two Pins For Net bulk.
|
||||
// *****************************
|
||||
if(!_isBsConnected) {
|
||||
|
||||
pin = Pin::Create(netBulk
|
||||
, Name(GetString(netBulk->GetName())+"_west")
|
||||
pin = Pin::create(netBulk
|
||||
, Name(getString(netBulk->getName())+"_west")
|
||||
, Pin::AccessDirection(Pin::AccessDirection::WEST)
|
||||
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
|
||||
, layerAlu2
|
||||
, GetAbutmentBox().getXMin()
|
||||
, getAbutmentBox().getXMin()
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfSourceWire)
|
||||
, GetUnit(widthOfSourceWire)
|
||||
, getUnit(widthOfSourceWire)
|
||||
, getUnit(widthOfSourceWire)
|
||||
);
|
||||
|
||||
_mapNetToPinBoxInLeftSide[netBulk] = pin;
|
||||
|
||||
pin = Pin::Create(netBulk
|
||||
, Name(GetString(netBulk->GetName())+"_east")
|
||||
pin = Pin::create(netBulk
|
||||
, Name(getString(netBulk->getName())+"_east")
|
||||
, Pin::AccessDirection(Pin::AccessDirection::EAST)
|
||||
, Pin::PlacementStatus(Pin::PlacementStatus::PLACED)
|
||||
, layerAlu2
|
||||
, GetAbutmentBox().getXMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfSourceWire)
|
||||
, GetUnit(widthOfSourceWire)
|
||||
, getUnit(widthOfSourceWire)
|
||||
, getUnit(widthOfSourceWire)
|
||||
);
|
||||
|
||||
_mapNetToPinBoxInRightSide[netBulk] = pin;
|
||||
|
@ -516,29 +516,29 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
cout << " ######### Create Contact ###########" <<endl;
|
||||
|
||||
Contact::Create(netBulk, layerVia01, *i
|
||||
Contact::create(netBulk, layerVia01, *i
|
||||
, bulkPosition
|
||||
, GetUnit(minContWidth)
|
||||
, GetUnit(minContWidth)
|
||||
, getUnit(minContWidth)
|
||||
, getUnit(minContWidth)
|
||||
);
|
||||
|
||||
Contact::Create(netBulk, layerAlu1, *i
|
||||
Contact::create(netBulk, layerAlu1, *i
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfAlu1)
|
||||
, GetUnit(widthOfAlu1)
|
||||
, getUnit(widthOfAlu1)
|
||||
, getUnit(widthOfAlu1)
|
||||
);
|
||||
|
||||
Contact::Create(netBulk, layerVia12, *i
|
||||
Contact::create(netBulk, layerVia12, *i
|
||||
, bulkPosition
|
||||
, GetUnit(minVia1Width)
|
||||
, GetUnit(minVia1Width)
|
||||
, getUnit(minVia1Width)
|
||||
, getUnit(minVia1Width)
|
||||
);
|
||||
|
||||
if( _isBsConnected ) { // If bulk and Source are connected.
|
||||
|
||||
cout << " B S is connected in " << *i << endl;
|
||||
|
||||
Vertical::Create(netBulk, layerAlu1, *i
|
||||
Vertical::create(netBulk, layerAlu1, *i
|
||||
, sourceRoutingZoneWidth
|
||||
, bulkPosition
|
||||
, sourcePosition);
|
||||
|
@ -565,22 +565,22 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
cout << " ######### Create Contact ###########" <<endl;
|
||||
|
||||
Contact::Create(netBulk, layerVia01, *i
|
||||
Contact::create(netBulk, layerVia01, *i
|
||||
, bulkPosition
|
||||
, GetUnit(minContWidth)
|
||||
, GetUnit(minContWidth)
|
||||
, getUnit(minContWidth)
|
||||
, getUnit(minContWidth)
|
||||
);
|
||||
|
||||
Contact::Create(netBulk, layerAlu1, *i
|
||||
Contact::create(netBulk, layerAlu1, *i
|
||||
, bulkPosition
|
||||
, GetUnit(widthOfAlu1)
|
||||
, GetUnit(widthOfAlu1)
|
||||
, getUnit(widthOfAlu1)
|
||||
, getUnit(widthOfAlu1)
|
||||
);
|
||||
|
||||
Contact::Create(netBulk, layerVia12, *i
|
||||
Contact::create(netBulk, layerVia12, *i
|
||||
, bulkPosition
|
||||
, GetUnit(minVia1Width)
|
||||
, GetUnit(minVia1Width)
|
||||
, getUnit(minVia1Width)
|
||||
, getUnit(minVia1Width)
|
||||
);
|
||||
|
||||
i++;
|
||||
|
@ -593,77 +593,77 @@ void TrMos::_PlaceAndRoute()
|
|||
if( _hasRing ) {
|
||||
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.
|
||||
// ***************************
|
||||
Horizontal::Create( netRing
|
||||
Horizontal::create( netRing
|
||||
, layerImp
|
||||
, GetAbutmentBox().getYMax()
|
||||
, GetUnit(widthOfImp)
|
||||
, GetAbutmentBox().getXMin() - GetUnit(widthOfImp/2)
|
||||
, GetAbutmentBox().getXMax() + GetUnit(widthOfImp/2)
|
||||
, getAbutmentBox().getYMax()
|
||||
, getUnit(widthOfImp)
|
||||
, getAbutmentBox().getXMin() - getUnit(widthOfImp/2)
|
||||
, getAbutmentBox().getXMax() + getUnit(widthOfImp/2)
|
||||
);
|
||||
|
||||
Horizontal::Create( netRing
|
||||
Horizontal::create( netRing
|
||||
, layerImp
|
||||
, GetAbutmentBox().getYMin()
|
||||
, GetUnit(widthOfImp)
|
||||
, GetAbutmentBox().getXMin() - GetUnit(widthOfImp/2)
|
||||
, GetAbutmentBox().getXMax() + GetUnit(widthOfImp/2)
|
||||
, getAbutmentBox().getYMin()
|
||||
, getUnit(widthOfImp)
|
||||
, getAbutmentBox().getXMin() - getUnit(widthOfImp/2)
|
||||
, getAbutmentBox().getXMax() + getUnit(widthOfImp/2)
|
||||
);
|
||||
|
||||
Vertical::Create(netRing
|
||||
Vertical::create(netRing
|
||||
, layerImp
|
||||
, GetAbutmentBox().getXMin()
|
||||
, GetUnit(widthOfImp)
|
||||
, GetAbutmentBox().getYMin()
|
||||
, GetAbutmentBox().getYMax()
|
||||
, getAbutmentBox().getXMin()
|
||||
, getUnit(widthOfImp)
|
||||
, getAbutmentBox().getYMin()
|
||||
, getAbutmentBox().getYMax()
|
||||
);
|
||||
|
||||
Vertical::Create(netRing
|
||||
Vertical::create(netRing
|
||||
, layerImp
|
||||
, GetAbutmentBox().getXMax()
|
||||
, GetUnit(widthOfImp)
|
||||
, GetAbutmentBox().getYMin()
|
||||
, GetAbutmentBox().getYMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
, getUnit(widthOfImp)
|
||||
, getAbutmentBox().getYMin()
|
||||
, getAbutmentBox().getYMax()
|
||||
);
|
||||
|
||||
|
||||
// Create rectangle in Active.
|
||||
// ***************************
|
||||
Horizontal::Create( netRing
|
||||
Horizontal::create( netRing
|
||||
, layerActive
|
||||
, GetAbutmentBox().getYMax()
|
||||
, GetUnit(minActiWidth)
|
||||
, GetAbutmentBox().getXMin() - GetUnit(minActiWidth/2)
|
||||
, GetAbutmentBox().getXMax() + GetUnit(minActiWidth/2)
|
||||
, getAbutmentBox().getYMax()
|
||||
, getUnit(minActiWidth)
|
||||
, getAbutmentBox().getXMin() - getUnit(minActiWidth/2)
|
||||
, getAbutmentBox().getXMax() + getUnit(minActiWidth/2)
|
||||
);
|
||||
|
||||
Horizontal::Create( netRing
|
||||
Horizontal::create( netRing
|
||||
, layerActive
|
||||
, GetAbutmentBox().getYMin()
|
||||
, GetUnit(minActiWidth)
|
||||
, GetAbutmentBox().getXMin() - GetUnit(minActiWidth/2)
|
||||
, GetAbutmentBox().getXMax() + GetUnit(minActiWidth/2)
|
||||
, getAbutmentBox().getYMin()
|
||||
, getUnit(minActiWidth)
|
||||
, getAbutmentBox().getXMin() - getUnit(minActiWidth/2)
|
||||
, getAbutmentBox().getXMax() + getUnit(minActiWidth/2)
|
||||
);
|
||||
|
||||
|
||||
Vertical::Create(netRing
|
||||
Vertical::create(netRing
|
||||
, layerActive
|
||||
, GetAbutmentBox().getXMin()
|
||||
, GetUnit(minActiWidth)
|
||||
, GetAbutmentBox().getYMin()
|
||||
, GetAbutmentBox().getYMax()
|
||||
, getAbutmentBox().getXMin()
|
||||
, getUnit(minActiWidth)
|
||||
, getAbutmentBox().getYMin()
|
||||
, getAbutmentBox().getYMax()
|
||||
);
|
||||
|
||||
Vertical::Create(netRing
|
||||
Vertical::create(netRing
|
||||
, layerActive
|
||||
, GetAbutmentBox().getXMax()
|
||||
, GetUnit(minActiWidth)
|
||||
, GetAbutmentBox().getYMin()
|
||||
, GetAbutmentBox().getYMax()
|
||||
, getAbutmentBox().getXMax()
|
||||
, getUnit(minActiWidth)
|
||||
, getAbutmentBox().getYMin()
|
||||
, getAbutmentBox().getYMax()
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -671,12 +671,12 @@ void TrMos::_PlaceAndRoute()
|
|||
// Create Caission NWELL if this is a PMOS.
|
||||
// ****************************************
|
||||
if(_type == 'P') {
|
||||
Net * netCaisson = Net::Create(this, Name("CAISSON"));
|
||||
Contact::Create(netCaisson, layerNwell
|
||||
, GetAbutmentBox().getXCenter()
|
||||
, GetAbutmentBox().getYCenter()
|
||||
, GetAbutmentBox().getWidth()
|
||||
, GetAbutmentBox().getHeight()
|
||||
Net * netCaisson = Net::create(this, Name("CAISSON"));
|
||||
Contact::create(netCaisson, layerNwell
|
||||
, getAbutmentBox().getXCenter()
|
||||
, getAbutmentBox().getYCenter()
|
||||
, getAbutmentBox().getWidth()
|
||||
, getAbutmentBox().getHeight()
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@ ADD_CUSTOM_TARGET(DTRParser echo "Creating DTRParser")
|
|||
SET(source_dir ${CHAMSIN_SOURCE_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(
|
||||
SOURCE ${source_dir}/ParserDtrScan.ll
|
||||
|
|
|
@ -34,16 +34,16 @@ DtrAccess::DtrAccess()
|
|||
}
|
||||
|
||||
|
||||
DtrAccess * DtrAccess::Create() {
|
||||
DtrAccess * DtrAccess::create() {
|
||||
DtrAccess * dtraccess = new DtrAccess();
|
||||
|
||||
dtraccess->_PostCreate();
|
||||
dtraccess->_postCreate();
|
||||
|
||||
return dtraccess;
|
||||
}
|
||||
|
||||
|
||||
void DtrAccess::_PostCreate() {
|
||||
void DtrAccess::_postCreate() {
|
||||
const char* dtrFileName = getenv("DTR_FILE");
|
||||
if(!dtrFileName) {
|
||||
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) {
|
||||
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) {
|
||||
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();
|
||||
|
||||
while(m!=n) {
|
||||
Layer * layer = tech->GetLayer(Name(*m));
|
||||
Layer * layer = tech->getLayer(Name(*m));
|
||||
if(!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 "
|
||||
// + GetString(*m) + " in technology file when parser DtrFile");
|
||||
// + getString(*m) + " in technology file when parser DtrFile");
|
||||
}
|
||||
|
||||
_label2layerMap[(*it_layermap).first].push_back(layer);
|
||||
|
@ -114,19 +114,19 @@ DtrAccess * DtrAccess::Instance() {
|
|||
|
||||
if(!singleton_name) { // if MACRO IS INVALID
|
||||
if(!_instance) {
|
||||
_instance = DtrAccess::Create();
|
||||
_instance = DtrAccess::create();
|
||||
}
|
||||
} else {
|
||||
if(!_instance){
|
||||
if( !(_instance=LookUp(string(singleton_name))) ) // if singleton hasn't been registered
|
||||
_instance = DtrAccess::Create();
|
||||
_instance = DtrAccess::create();
|
||||
}
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
|
||||
|
||||
void DtrAccess::_PreDelete()
|
||||
void DtrAccess::_preDestroy()
|
||||
// ***********************
|
||||
{
|
||||
// Do something
|
||||
|
@ -134,39 +134,39 @@ void DtrAccess::_PreDelete()
|
|||
}
|
||||
|
||||
|
||||
void DtrAccess::Delete()
|
||||
void DtrAccess::destroy()
|
||||
// ********************
|
||||
{
|
||||
_PreDelete();
|
||||
_preDestroy();
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
@ -174,11 +174,11 @@ GenericCollection<string> DtrAccess::GetLayerNamesByLabel(const string& label) c
|
|||
if(i==_label2layerNameMap.end())
|
||||
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);
|
||||
|
@ -186,11 +186,11 @@ GenericCollection<Layer*> DtrAccess::GetLayersByLabel(const string& label) const
|
|||
if(i==_label2layerMap.end())
|
||||
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);
|
||||
|
@ -198,29 +198,29 @@ GenericCollection<double> DtrAccess::GetElectricalsByLabel(const string& label)
|
|||
if(i==_label2electricalMap.end())
|
||||
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);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
double DtrAccess::GetSimpleCapaMimByLabel(const string& label) const
|
||||
double DtrAccess::getSimpleCapaMimByLabel(const string& label) const
|
||||
// ****************************************************************
|
||||
{
|
||||
map<string, double>::const_iterator i = _label2simplecapamimMap.find(label);
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ void DtrAccess::Register(const string& singletonname, DtrAccess* dtraccess)
|
|||
}
|
||||
|
||||
|
||||
string DtrAccess::_GetString() const
|
||||
string DtrAccess::_getString() const
|
||||
// **********************************
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -292,10 +292,10 @@ END_NAMESPACE_HURRICANE
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
string GetString(const H::DtrAccess& access)
|
||||
string getString(const H::DtrAccess& access)
|
||||
// **********************************************
|
||||
{
|
||||
return access._GetString();
|
||||
return access._getString();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -44,8 +44,8 @@ class DtrAccess {
|
|||
private : DtrAccess(const DtrAccess&);
|
||||
private : DtrAccess& operator=(const DtrAccess&);
|
||||
|
||||
protected : static DtrAccess * Create();
|
||||
protected : virtual void _PostCreate();
|
||||
protected : static DtrAccess * create();
|
||||
protected : virtual void _postCreate();
|
||||
# endif
|
||||
|
||||
public : static DtrAccess* Instance();
|
||||
|
@ -54,11 +54,11 @@ class DtrAccess {
|
|||
// ***********
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
protected : virtual ~DtrAccess() {};
|
||||
protected : virtual void _PreDelete();
|
||||
protected : virtual void _preDestroy();
|
||||
# endif
|
||||
|
||||
|
||||
public : virtual void Delete();
|
||||
public : virtual void destroy();
|
||||
|
||||
|
||||
// Accessors
|
||||
|
@ -66,67 +66,67 @@ class DtrAccess {
|
|||
|
||||
// If can't find data , throw Hurricane::Error
|
||||
// *******************************************
|
||||
public : GenericCollection<double> GetRuleByLabel(const string&) const;
|
||||
public : GenericCollection<long> GetRdsRuleByLabel(const string&) const;
|
||||
public : GenericCollection<string> GetLayerNamesByLabel(const string&) const;
|
||||
public : Layers GetLayersByLabel(const string&) const;
|
||||
public : GenericCollection<double> GetElectricalsByLabel(const string& ) const;
|
||||
public : int GetModellingByLabel(const string&) const;
|
||||
public : double GetSimpleCapaMimByLabel(const string&) const;
|
||||
public : GenericCollection<double> getRuleByLabel(const string&) const;
|
||||
public : GenericCollection<long> getRdsRuleByLabel(const string&) const;
|
||||
public : GenericCollection<string> getLayerNamesByLabel(const string&) const;
|
||||
public : Layers getLayersByLabel(const string&) const;
|
||||
public : GenericCollection<double> getElectricalsByLabel(const string& ) const;
|
||||
public : int getModellingByLabel(const string&) const;
|
||||
public : double getSimpleCapaMimByLabel(const string&) const;
|
||||
|
||||
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
public : double GetSingleRealRuleByLabel(const string& s) const
|
||||
public : double getSingleRealRuleByLabel(const string& s) const
|
||||
// *************************************************
|
||||
{
|
||||
GenericLocator<double> locator = GetRuleByLabel(s).GetLocator();
|
||||
return locator.GetElement();
|
||||
GenericLocator<double> locator = getRuleByLabel(s).getLocator();
|
||||
return locator.getElement();
|
||||
}
|
||||
|
||||
public : long GetSingleRdsRuleByLabel(const string& s) const
|
||||
public : long getSingleRdsRuleByLabel(const string& s) const
|
||||
// ************************************************
|
||||
{
|
||||
GenericLocator<long> locator = GetRdsRuleByLabel(s).GetLocator();
|
||||
return locator.GetElement();
|
||||
GenericLocator<long> locator = getRdsRuleByLabel(s).getLocator();
|
||||
return locator.getElement();
|
||||
}
|
||||
|
||||
public : string GetSingleLayerNameByLabel(const string& s) const
|
||||
public : string getSingleLayerNameByLabel(const string& s) const
|
||||
// ****************************************************
|
||||
{
|
||||
GenericLocator<string> locator = GetLayerNamesByLabel(s).GetLocator();
|
||||
return locator.GetElement();
|
||||
GenericLocator<string> locator = getLayerNamesByLabel(s).getLocator();
|
||||
return locator.getElement();
|
||||
}
|
||||
|
||||
public : Layer* GetSingleLayerByLabel(const string& s) const
|
||||
public : Layer* getSingleLayerByLabel(const string& s) const
|
||||
// ************************************************
|
||||
{
|
||||
LayerLocator locator = GetLayersByLabel(s).GetLocator();
|
||||
return locator.GetElement();
|
||||
LayerLocator locator = getLayersByLabel(s).getLocator();
|
||||
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
|
||||
|
@ -153,16 +153,16 @@ class DtrAccess {
|
|||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
// Others
|
||||
// ******
|
||||
public: virtual string _GetTypeName() const {return _TName("DtrAccess");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual Record* _GetRecord() const;
|
||||
public: virtual string _getTypeName() const {return _TName("DtrAccess");};
|
||||
public: virtual string _getString() const;
|
||||
public: virtual Record* _getRecord() const;
|
||||
|
||||
public: map<string, list<double> >& _GetLabel2RuleMap() { return _label2ruleMap; };
|
||||
public: map<string, list<string> >& _GetLabel2LayerNameMap() { return _label2layerNameMap; };
|
||||
public: map<string, list<double> >& _GetLabel2ElectricalMap()
|
||||
public: map<string, list<double> >& _getLabel2RuleMap() { return _label2ruleMap; };
|
||||
public: map<string, list<string> >& _getLabel2LayerNameMap() { return _label2layerNameMap; };
|
||||
public: map<string, list<double> >& _getLabel2ElectricalMap()
|
||||
{ return _label2electricalMap; };
|
||||
public: map<string, int>& _GetLabel2ModellingMap() { return _label2modellingMap; };
|
||||
public: map<string, double>& _GetLabel2SimpleCapaMimMap()
|
||||
public: map<string, int>& _getLabel2ModellingMap() { return _label2modellingMap; };
|
||||
public: map<string, double>& _getLabel2SimpleCapaMimMap()
|
||||
{ return _label2simplecapamimMap; };
|
||||
# endif
|
||||
|
||||
|
@ -178,7 +178,7 @@ class DtrAccess {
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
string GetString(const H::DtrAccess&);
|
||||
string getString(const H::DtrAccess&);
|
||||
|
||||
|
||||
#endif // HURRICANE_DTRACCESS
|
||||
|
|
|
@ -31,11 +31,11 @@ void GenericDtrAccess::Instance(DtrAccess* dtraccess)
|
|||
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");
|
||||
|
@ -51,10 +51,10 @@ END_NAMESPACE_HURRICANE
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
string GetString(const H::GenericDtrAccess& access)
|
||||
string getString(const H::GenericDtrAccess& access)
|
||||
// ************************************************
|
||||
{
|
||||
return access._GetString();
|
||||
return access._getString();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ class GenericDtrAccess {
|
|||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
// Others
|
||||
// ******
|
||||
public: virtual string _GetTypeName() const {return _TName("GenericDtrAccess");};
|
||||
public: virtual string _GetString() const;
|
||||
public: virtual string _getTypeName() const {return _TName("GenericDtrAccess");};
|
||||
public: virtual string _getString() const;
|
||||
# endif
|
||||
|
||||
};
|
||||
|
@ -71,7 +71,7 @@ class GenericDtrAccess {
|
|||
// Generic functions
|
||||
// ****************************************************************************************************
|
||||
|
||||
string GetString(const H::GenericDtrAccess&);
|
||||
string getString(const H::GenericDtrAccess&);
|
||||
|
||||
|
||||
#endif // HURRICANE_GENERICDTRACCESS
|
||||
|
|
|
@ -92,7 +92,7 @@ item: T_ID elems '\n'
|
|||
, j = doubleList.end();
|
||||
|
||||
while(i!=j) {
|
||||
(dtraccess->_GetLabel2RuleMap())[label].push_back(*i);
|
||||
(dtraccess->_getLabel2RuleMap())[label].push_back(*i);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ item: T_ID elems '\n'
|
|||
, j = stringList.end();
|
||||
|
||||
while(i!=j) {
|
||||
(dtraccess->_GetLabel2LayerNameMap())[label].push_back(*i);;
|
||||
(dtraccess->_getLabel2LayerNameMap())[label].push_back(*i);;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ item: T_ID elems '\n'
|
|||
, j = doubleList.end();
|
||||
|
||||
while(i!=j) {
|
||||
(dtraccess->_GetLabel2ElectricalMap())[label].push_back(*i);
|
||||
(dtraccess->_getLabel2ElectricalMap())[label].push_back(*i);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ item: T_ID elems '\n'
|
|||
|
||||
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 ) {
|
||||
|
@ -138,7 +138,7 @@ item: T_ID elems '\n'
|
|||
}
|
||||
|
||||
list<double>::iterator i = doubleList.begin();
|
||||
(dtraccess->_GetLabel2SimpleCapaMimMap())[label] = (*i);
|
||||
(dtraccess->_getLabel2SimpleCapaMimMap())[label] = (*i);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ using namespace DEVICE;
|
|||
int main() {
|
||||
try {
|
||||
cout << "simple analogic test" << endl;
|
||||
CDataBase* db = CDataBase::Create();
|
||||
Library* workLibrary = Library::Create(db->GetRootLibrary(), Name("WorkLibrary"));
|
||||
TrMos* trmos = TrMos::Create(workLibrary, Name("MosTr"));
|
||||
CDataBase* db = CDataBase::create();
|
||||
Library* workLibrary = Library::create(db->getRootLibrary(), Name("WorkLibrary"));
|
||||
TrMos* trmos = TrMos::create(workLibrary, Name("MosTr"));
|
||||
exit(0);
|
||||
} catch (Hurricane::Warning& w) {
|
||||
cerr << w.What() << endl;
|
||||
|
|
Loading…
Reference in New Issue