Added support for extra resistor rules in Hurricane::Technology.
* New: In BasicLayer::Material, added "info" kind of material for layers that are only informationals (i.e. not real GDS one). Created to store geometric combination of layers, this is a temporary solution. Have to define a clearer semantic for that. * New: In CRL/helpers/AnalogTechno.py, new "Count" type for count numbers that must not go through DbU::Unit converter. They are plain integers, but stored in DbU::Unit (keeping track of that semantic is left to the user).
This commit is contained in:
parent
88235dc3a4
commit
1e4b8b4647
|
@ -21,7 +21,7 @@ import Hurricane
|
||||||
from Hurricane import DbU
|
from Hurricane import DbU
|
||||||
from Hurricane import DataBase
|
from Hurricane import DataBase
|
||||||
from Hurricane import Layer
|
from Hurricane import Layer
|
||||||
from helpers.io import ErrorMessage
|
from helpers.io import ErrorMessage, catch
|
||||||
from helpers import Debug
|
from helpers import Debug
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,9 +32,12 @@ Length = 0x0001
|
||||||
Area = 0x0002
|
Area = 0x0002
|
||||||
Asymmetric = 0x0004
|
Asymmetric = 0x0004
|
||||||
Unit = 0x0008
|
Unit = 0x0008
|
||||||
|
Count = 0x0010
|
||||||
|
|
||||||
|
|
||||||
def valueToDbU ( value, unit, lengthType ):
|
def valueToDbU ( value, unit, lengthType ):
|
||||||
|
if lengthType & Count: return value
|
||||||
|
|
||||||
length = DbU.fromPhysical( value, unit )
|
length = DbU.fromPhysical( value, unit )
|
||||||
if lengthType & Length: return length
|
if lengthType & Length: return length
|
||||||
|
|
||||||
|
@ -105,9 +108,10 @@ def _loadAnalogTechno ( techno, ruleTable ):
|
||||||
, entry[5]
|
, entry[5]
|
||||||
)
|
)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
e = ErrorMessage( e )
|
catch( e )
|
||||||
e.addMessage( 'In %s:<analogTechnologyTable> at index %d.' % (technoFile,entryNo) )
|
print ErrorMessage( 1, [ 'In %s:' % technoFile
|
||||||
print e
|
, '"analogTechnologyTable" at index %d.' % entryNo ] )
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -627,7 +627,8 @@ namespace Hurricane {
|
||||||
PhysicalRules& rules = ilayer->second;
|
PhysicalRules& rules = ilayer->second;
|
||||||
PhysicalRule search ( ruleName, 0, "" );
|
PhysicalRule search ( ruleName, 0, "" );
|
||||||
if (rules.find(&search) != rules.end()) {
|
if (rules.find(&search) != rules.end()) {
|
||||||
throw Error( "Technology::addPhysicalRule(): Attempt to redefine rule \"%s\"." , ruleNameStr.c_str() );
|
throw Error( "Technology::addPhysicalRule(): Attempt to redefine rule \"%s\" for layer \"%s\"."
|
||||||
|
, ruleNameStr.c_str(), layerStr.c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
rules.insert( new PhysicalRule(ruleName,value,reference) );
|
rules.insert( new PhysicalRule(ruleName,value,reference) );
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace Hurricane {
|
||||||
, cut
|
, cut
|
||||||
, metal
|
, metal
|
||||||
, blockage
|
, blockage
|
||||||
|
, info
|
||||||
, other
|
, other
|
||||||
};
|
};
|
||||||
// Constructors.
|
// Constructors.
|
||||||
|
@ -181,9 +182,10 @@ inline std::string getString<const Hurricane::BasicLayer::Material::Code*>
|
||||||
case Hurricane::BasicLayer::Material::cut: return "cut";
|
case Hurricane::BasicLayer::Material::cut: return "cut";
|
||||||
case Hurricane::BasicLayer::Material::metal: return "metal";
|
case Hurricane::BasicLayer::Material::metal: return "metal";
|
||||||
case Hurricane::BasicLayer::Material::blockage: return "blockage";
|
case Hurricane::BasicLayer::Material::blockage: return "blockage";
|
||||||
|
case Hurricane::BasicLayer::Material::info: return "info";
|
||||||
case Hurricane::BasicLayer::Material::other: return "other";
|
case Hurricane::BasicLayer::Material::other: return "other";
|
||||||
}
|
}
|
||||||
return "abnormal";
|
return "undefined";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -195,6 +195,7 @@ extern "C" {
|
||||||
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::cut ,"cut" );
|
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::cut ,"cut" );
|
||||||
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::metal ,"metal" );
|
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::metal ,"metal" );
|
||||||
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::blockage,"blockage");
|
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::blockage,"blockage");
|
||||||
|
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::info ,"info" );
|
||||||
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::other ,"other" );
|
LoadObjectConstant(PyTypeMaterial.tp_dict,BasicLayer::Material::other ,"other" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue