Technology with three types of rules : no layer, one layer, two layers
Transistor layout
This commit is contained in:
parent
59e8d945d6
commit
279ff2a2aa
|
@ -129,7 +129,7 @@ void Transistor::createLayout() {
|
||||||
if (toto > _l) {
|
if (toto > _l) {
|
||||||
dx30 = rwCont;
|
dx30 = rwCont;
|
||||||
dy30 = dx30;
|
dy30 = dx30;
|
||||||
y30 = _w + DbU::max(rdActiveCont, rdActivePoly + rePolyCont);
|
y30 = _w + max(rdActiveCont, rdActivePoly + rePolyCont);
|
||||||
} else {
|
} else {
|
||||||
dx30 = dx00 - 2*rePolyCont;
|
dx30 = dx00 - 2*rePolyCont;
|
||||||
dy30 = rwCont;
|
dy30 = rwCont;
|
||||||
|
|
|
@ -90,7 +90,7 @@ void ATechnology::print() {
|
||||||
for (OneLayerPhysicalRules::iterator olprit = _oneLayerPhysicalRules.begin();
|
for (OneLayerPhysicalRules::iterator olprit = _oneLayerPhysicalRules.begin();
|
||||||
olprit != _oneLayerPhysicalRules.end();
|
olprit != _oneLayerPhysicalRules.end();
|
||||||
olprit++) {
|
olprit++) {
|
||||||
Layer* layer = olprit->first;
|
const Layer* layer = olprit->first;
|
||||||
cout << " o layer " << layer << endl;
|
cout << " o layer " << layer << endl;
|
||||||
printPhysicalRules(olprit->second);
|
printPhysicalRules(olprit->second);
|
||||||
cout << endl;
|
cout << endl;
|
||||||
|
@ -99,8 +99,8 @@ void ATechnology::print() {
|
||||||
for (TwoLayersPhysicalRules::iterator tlprit = _twoLayersPhysicalRules.begin();
|
for (TwoLayersPhysicalRules::iterator tlprit = _twoLayersPhysicalRules.begin();
|
||||||
tlprit != _twoLayersPhysicalRules.end();
|
tlprit != _twoLayersPhysicalRules.end();
|
||||||
tlprit++) {
|
tlprit++) {
|
||||||
Layer* layer1 = tlprit->first.first;
|
const Layer* layer1 = tlprit->first.first;
|
||||||
Layer* layer2 = tlprit->first.second;
|
const Layer* layer2 = tlprit->first.second;
|
||||||
cout << " o layer1 " << layer1 << endl;
|
cout << " o layer1 " << layer1 << endl;
|
||||||
cout << " o layer2 " << layer2 << endl;
|
cout << " o layer2 " << layer2 << endl;
|
||||||
printPhysicalRules(tlprit->second);
|
printPhysicalRules(tlprit->second);
|
||||||
|
@ -118,11 +118,11 @@ const ATechnology::PhysicalRule* ATechnology::getPhysicalRule(const Name& name)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ATechnology::PhysicalRule* ATechnology::getPhysicalRule(const Name& name, const Layer* layer) const {
|
const ATechnology::PhysicalRule* ATechnology::getPhysicalRule(const Name& name, const Layer* layer) const {
|
||||||
OneLayerPhysicalRules::iterator olprit = _oneLayerPhysicalRules.find(layer);
|
OneLayerPhysicalRules::const_iterator olprit = _oneLayerPhysicalRules.find(layer);
|
||||||
if (olprit == _oneLayerPhysicalRules.end()) {
|
if (olprit == _oneLayerPhysicalRules.end()) {
|
||||||
throw Error("Cannot find Physical Rules for layer " + getString(layer->getName()));
|
throw Error("Cannot find Physical Rules for layer " + getString(layer->getName()));
|
||||||
}
|
}
|
||||||
PhysicalRules& physicalRules = olprit->second;
|
const PhysicalRules& physicalRules = olprit->second;
|
||||||
PhysicalRule searchPR(name, 0, "");
|
PhysicalRule searchPR(name, 0, "");
|
||||||
PhysicalRules::iterator prit = physicalRules.find(&searchPR);
|
PhysicalRules::iterator prit = physicalRules.find(&searchPR);
|
||||||
if (prit == physicalRules.end()) {
|
if (prit == physicalRules.end()) {
|
||||||
|
@ -135,11 +135,15 @@ const ATechnology::PhysicalRule* ATechnology::getPhysicalRule(
|
||||||
const Name& name,
|
const Name& name,
|
||||||
const Layer* layer1,
|
const Layer* layer1,
|
||||||
const Layer* layer2) const {
|
const Layer* layer2) const {
|
||||||
TwoLayerPhysicalRules::iterator tlprit = _twoLayerPhysicalRules.find(layer);
|
LayerPair searchLayerPair(layer1, layer2);
|
||||||
if (olprit == _oneLayerPhysicalRules.end()) {
|
TwoLayersPhysicalRules::const_iterator tlprit = _twoLayersPhysicalRules.find(searchLayerPair);
|
||||||
throw Error("Cannot find Physical Rules for layer " + getString(layer->getName()));
|
if (tlprit == _twoLayersPhysicalRules.end()) {
|
||||||
|
throw Error("Cannot find Physical Rules for layers " +
|
||||||
|
getString(layer1->getName()) +
|
||||||
|
" and " +
|
||||||
|
getString(layer2->getName()));
|
||||||
}
|
}
|
||||||
PhysicalRules& physicalRules = olprit->second;
|
const PhysicalRules& physicalRules = tlprit->second;
|
||||||
PhysicalRule searchPR(name, 0, "");
|
PhysicalRule searchPR(name, 0, "");
|
||||||
PhysicalRules::iterator prit = physicalRules.find(&searchPR);
|
PhysicalRules::iterator prit = physicalRules.find(&searchPR);
|
||||||
if (prit == physicalRules.end()) {
|
if (prit == physicalRules.end()) {
|
||||||
|
|
|
@ -38,21 +38,21 @@ class ATechnology : public PrivateProperty {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef pair<Layer*, Layer*> LayerPair;
|
typedef pair<const Layer*, const Layer*> LayerPair;
|
||||||
|
|
||||||
struct LayerPairCompare:
|
struct LayerPairCompare:
|
||||||
public std::binary_function<const LayerPair&, const LayerPair&, bool> {
|
public std::binary_function<const LayerPair&, const LayerPair&, bool> {
|
||||||
bool operator()(const LayerPair& lp1, const LayerPair& lp2) const {
|
bool operator()(const LayerPair& lp1, const LayerPair& lp2) const {
|
||||||
if (lp1->first < lp2->first) {
|
if (lp1.first < lp2.first) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (lp1->first > lp2->first) {
|
if (lp1.first > lp2.first) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (lp1->second < lp2->second) {
|
if (lp1.second < lp2.second) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (lp1->second > lp2->second) {
|
if (lp1.second > lp2.second) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -60,7 +60,7 @@ class ATechnology : public PrivateProperty {
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef set<ATechnology::PhysicalRule*, PhysicalRuleNameCompare> PhysicalRules;
|
typedef set<ATechnology::PhysicalRule*, PhysicalRuleNameCompare> PhysicalRules;
|
||||||
typedef map<Layer*, PhysicalRules> OneLayerPhysicalRules;
|
typedef map<const Layer*, PhysicalRules> OneLayerPhysicalRules;
|
||||||
typedef map<LayerPair, PhysicalRules, LayerPairCompare> TwoLayersPhysicalRules;
|
typedef map<LayerPair, PhysicalRules, LayerPairCompare> TwoLayersPhysicalRules;
|
||||||
|
|
||||||
static ATechnology* create(Hurricane::Technology* technology);
|
static ATechnology* create(Hurricane::Technology* technology);
|
||||||
|
|
Loading…
Reference in New Issue