read grid units
This commit is contained in:
parent
279ff2a2aa
commit
b7bd1e19a4
|
@ -55,6 +55,7 @@ const Name Transistor::DrainName("DRAIN");
|
|||
const Name Transistor::SourceName("SOURCE");
|
||||
const Name Transistor::GridName("GRID");
|
||||
const Name Transistor::BulkName("BULK");
|
||||
const Name Transistor::AnonymousName("ANONYMOUS");
|
||||
|
||||
Transistor::Transistor(Library* library, const Name& name, const Polarity& polarity):
|
||||
Cell(library, name),
|
||||
|
@ -62,13 +63,15 @@ Transistor::Transistor(Library* library, const Name& name, const Polarity& polar
|
|||
_source(NULL),
|
||||
_grid(NULL),
|
||||
_bulk(NULL),
|
||||
_anonymous(NULL),
|
||||
_polarity(polarity),
|
||||
_abutmentType(),
|
||||
_l(DbU::Min),
|
||||
_w(DbU::Min),
|
||||
_source20(NULL), _source22(NULL),
|
||||
_drain40(NULL), _drain42(NULL),
|
||||
_grid00(NULL), _grid01(NULL), _grid30(NULL), _grid31(NULL)
|
||||
_grid00(NULL), _grid01(NULL), _grid30(NULL), _grid31(NULL),
|
||||
_anonymous10(NULL), _anonymous11(NULL), _anonymous12(NULL)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -92,26 +95,29 @@ void Transistor::_postCreate() {
|
|||
_grid->setExternal(true);
|
||||
_bulk = Net::create(this, BulkName);
|
||||
_bulk->setExternal(true);
|
||||
_source20 = createPad(technology, _source, "cut0");
|
||||
_source22 = createPad(technology, _source, "cut1");
|
||||
_drain40 = createPad(technology, _drain, "cut0");
|
||||
_drain42 = createPad(technology, _drain, "cut1");
|
||||
_grid00 = createPad(technology, _grid, "poly");
|
||||
_grid01 = createPad(technology, _grid, "poly");
|
||||
_grid30 = createPad(technology, _grid, "cut0");
|
||||
_grid31 = createPad(technology, _grid, "metal1");
|
||||
|
||||
_anonymous = Net::create(this, AnonymousName);
|
||||
_source20 = createPad(technology, _source, "cut0");
|
||||
_source22 = createPad(technology, _source, "cut1");
|
||||
_drain40 = createPad(technology, _drain, "cut0");
|
||||
_drain42 = createPad(technology, _drain, "cut1");
|
||||
_grid00 = createPad(technology, _grid, "poly");
|
||||
_grid01 = createPad(technology, _grid, "poly");
|
||||
_grid30 = createPad(technology, _grid, "cut0");
|
||||
_grid31 = createPad(technology, _grid, "metal1");
|
||||
_anonymous10 = createPad(technology, _anonymous, "active");
|
||||
_anonymous11 = createPad(technology, _anonymous, "nimp");
|
||||
_anonymous12 = createPad(technology, _anonymous, "nimp");
|
||||
}
|
||||
|
||||
void Transistor::createLayout() {
|
||||
ATechnology* techno = AEnv::getATechnology();
|
||||
|
||||
DbU::Unit rwCont = DbU::real(techno->getPhysicalRule("RW_CONT")->getValue());
|
||||
DbU::Unit rdCont = DbU::real(techno->getPhysicalRule("RD_CONT")->getValue());
|
||||
DbU::Unit reGateActiv = DbU::real(techno->getPhysicalRule("RE", getLayer("poly"), getLayer("active"))->getValue());
|
||||
DbU::Unit rePolyCont = DbU::real(techno->getPhysicalRule("RE", getLayer("poly"), getLayer("cut"))->getValue());
|
||||
DbU::Unit rdActiveCont = DbU::real(techno->getPhysicalRule("RD", getLayer("active"), getLayer("cut"))->getValue());
|
||||
DbU::Unit rdActivePoly = DbU::real(techno->getPhysicalRule("RD", getLayer("active"), getLayer("poly"))->getValue());
|
||||
DbU::Unit rwCont = techno->getPhysicalRule("RW_CONT")->getValue();
|
||||
DbU::Unit rdCont = techno->getPhysicalRule("RD_CONT")->getValue();
|
||||
DbU::Unit reGateActiv = techno->getPhysicalRule("RE", getLayer("poly"), getLayer("active"))->getValue();
|
||||
DbU::Unit rePolyCont = techno->getPhysicalRule("RE", getLayer("poly"), getLayer("cut"))->getValue();
|
||||
DbU::Unit rdActiveCont = techno->getPhysicalRule("RD", getLayer("active"), getLayer("cut"))->getValue();
|
||||
DbU::Unit rdActivePoly = techno->getPhysicalRule("RD", getLayer("active"), getLayer("poly"))->getValue();
|
||||
|
||||
UpdateSession::open();
|
||||
|
||||
|
@ -158,5 +164,7 @@ void Transistor::createLayout() {
|
|||
dy01 = y31 - (y00 + dy00);
|
||||
}
|
||||
|
||||
//12
|
||||
|
||||
UpdateSession::close();
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ class Transistor : public Cell {
|
|||
static const Name SourceName;
|
||||
static const Name GridName;
|
||||
static const Name BulkName;
|
||||
static const Name AnonymousName;
|
||||
enum Polarity {N=0, P=1};
|
||||
enum AbutmentType { INTERNAL=0, LEFT=1, RIGHT=2, SINGLE=3};
|
||||
|
||||
|
@ -34,6 +35,7 @@ class Transistor : public Cell {
|
|||
Net* _source;
|
||||
Net* _grid;
|
||||
Net* _bulk;
|
||||
Net* _anonymous;
|
||||
Polarity _polarity;
|
||||
AbutmentType _abutmentType;
|
||||
DbU::Unit _l;
|
||||
|
@ -41,6 +43,7 @@ class Transistor : public Cell {
|
|||
Pad *_source20, *_source22;
|
||||
Pad *_drain40, *_drain42;
|
||||
Pad *_grid00, *_grid01, *_grid30, *_grid31;
|
||||
Pad *_anonymous10, *_anonymous11, *_anonymous12, *_anonymous50;
|
||||
|
||||
Transistor(Library* library, const Name& name, const Polarity& polarity);
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@ string ATechnology::_getTypeName() const {
|
|||
return _TName("ATechnologyProperty");
|
||||
}
|
||||
|
||||
void ATechnology::addPhysicalRule(const Name& name, double value, const string& reference) {
|
||||
void ATechnology::addPhysicalRule(const Name& name, DbU::Unit value, const string& reference) {
|
||||
PhysicalRule searchPR(name, 0, "");
|
||||
PhysicalRules::iterator prit = _noLayerPhysicalRules.find(&searchPR);
|
||||
if (prit != _noLayerPhysicalRules.end()) {
|
||||
|
@ -37,7 +37,7 @@ void ATechnology::addPhysicalRule(const Name& name, double value, const string&
|
|||
_noLayerPhysicalRules.insert(newPhysicalRule);
|
||||
}
|
||||
|
||||
void ATechnology::addPhysicalRule(const Name& name, const Name& layerName, double value, const string& reference) {
|
||||
void ATechnology::addPhysicalRule(const Name& name, const Name& layerName, DbU::Unit value, const string& reference) {
|
||||
Layer* layer = getLayer(layerName);
|
||||
OneLayerPhysicalRules::iterator olprit = _oneLayerPhysicalRules.find(layer);
|
||||
if (olprit == _oneLayerPhysicalRules.end()) {
|
||||
|
@ -59,7 +59,7 @@ void ATechnology::addPhysicalRule(const Name& name, const Name& layerName, doubl
|
|||
}
|
||||
|
||||
void ATechnology::addPhysicalRule(const Name& name, const Name& layer1Name,
|
||||
const Name& layer2Name, double value, const string& reference) {
|
||||
const Name& layer2Name, DbU::Unit value, const string& reference) {
|
||||
}
|
||||
|
||||
ATechnology* ATechnology::create(Technology* technology) {
|
||||
|
|
|
@ -16,7 +16,7 @@ class ATechnology : public PrivateProperty {
|
|||
class PhysicalRule {
|
||||
public:
|
||||
PhysicalRule(const Name& name,
|
||||
double value,
|
||||
DbU::Unit value,
|
||||
const string& reference):
|
||||
_name(name),
|
||||
_value(value),
|
||||
|
@ -26,7 +26,7 @@ class ATechnology : public PrivateProperty {
|
|||
_value(physicalRule._value),
|
||||
_reference(physicalRule._reference) {}
|
||||
const Name _name;
|
||||
const double _value;
|
||||
const DbU::Unit _value;
|
||||
const string _reference;
|
||||
double getValue() const { return _value; }
|
||||
};
|
||||
|
@ -68,10 +68,10 @@ class ATechnology : public PrivateProperty {
|
|||
const PhysicalRule* getPhysicalRule(const Name& name) const;
|
||||
const PhysicalRule* getPhysicalRule(const Name& name, const Layer* layer) const;
|
||||
const PhysicalRule* getPhysicalRule(const Name& name, const Layer* layer1, const Layer* layer2) const;
|
||||
void addPhysicalRule(const Name& name, double value, const string& reference);
|
||||
void addPhysicalRule(const Name& name, const Name& layerName, double value, const string& reference);
|
||||
void addPhysicalRule(const Name& name, DbU::Unit value, const string& reference);
|
||||
void addPhysicalRule(const Name& name, const Name& layerName, DbU::Unit value, const string& reference);
|
||||
void addPhysicalRule(const Name& name, const Name& layer1Name,
|
||||
const Name& layer2Name, double value, const string& reference);
|
||||
const Name& layer2Name, DbU::Unit value, const string& reference);
|
||||
Layer* getLayer(const Name& layerName);
|
||||
void print();
|
||||
|
||||
|
|
|
@ -33,16 +33,17 @@ void readPhysicalRules(xmlNode* node, ATechnology* aTechnology) {
|
|||
if (ruleNameC && valueC && refC) {
|
||||
string ruleName((const char*)ruleNameC);
|
||||
double value = atof((const char*)valueC);
|
||||
DbU::Unit unitValue= DbU::real(value);
|
||||
string reference((const char*)refC);
|
||||
if (layerC) {
|
||||
Name layerName((const char*)layerC);
|
||||
aTechnology->addPhysicalRule(ruleName, layerName, value, reference);
|
||||
aTechnology->addPhysicalRule(ruleName, layerName, unitValue, reference);
|
||||
} else if (layer1C && layer2C) {
|
||||
Name layer1Name((const char*)layer1C);
|
||||
Name layer2Name((const char*)layer2C);
|
||||
aTechnology->addPhysicalRule(ruleName, layer1Name, layer2Name, value, reference);
|
||||
aTechnology->addPhysicalRule(ruleName, layer1Name, layer2Name, unitValue, reference);
|
||||
} else {
|
||||
aTechnology->addPhysicalRule(ruleName, value, reference);
|
||||
aTechnology->addPhysicalRule(ruleName, unitValue, reference);
|
||||
}
|
||||
} else {
|
||||
syntaxError("");
|
||||
|
|
Loading…
Reference in New Issue