create oaRect when a segment can't be converted to oaPathSeg, i.e: source point is equal to target point in segment

This commit is contained in:
Jean-Manuel Caba 2010-08-18 11:51:24 +00:00
parent 5d871b1353
commit 8418a8c6b2
3 changed files with 15 additions and 12 deletions

View File

@ -1,5 +1,5 @@
// -*-compile-command:"cd ../../../../.. && make"-*- // -*-compile-command:"cd ../../../../.. && make"-*-
// Time-stamp: "2010-08-18 11:21:49" - OpenAccessDriver.cpp // Time-stamp: "2010-08-18 12:19:15" - OpenAccessDriver.cpp
// x-----------------------------------------------------------------x // x-----------------------------------------------------------------x
// | This file is part of the hurricaneAMS Software. | // | This file is part of the hurricaneAMS Software. |
// | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved | // | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved |
@ -655,14 +655,13 @@ namespace {
cerr << "contact: " << contact << " is a Via" << endl; cerr << "contact: " << contact << " is a Via" << endl;
}else{ }else{
cerr << "contact: " << contact << " is NOT a Via" << endl; cerr << "contact: " << contact << " is NOT a Via" << endl;
return NULL;
} }
oaString viaDefName = getString(layer->getName()).c_str(); oaString viaDefName = getString(layer->getName()).c_str();
oaStdViaDef* myStdViaDef = static_cast<oaStdViaDef*>( oaStdViaDef* myStdViaDef = static_cast<oaStdViaDef*>(
oaViaDef::find(_oaTech, viaDefName) ); oaViaDef::find(_oaTech, viaDefName) );
if(!myStdViaDef) assert(myStdViaDef);
return NULL; cerr << "creating oaStdVia ..." << endl;
else
cerr << "creating oaStdVia ..." << endl;
oaTransform zeroTrans(oaPoint(0, 0), oacR0); oaTransform zeroTrans(oaPoint(0, 0), oacR0);
oaStdVia* via = oaStdVia::create(blockNet->getBlock(), myStdViaDef, zeroTrans); oaStdVia* via = oaStdVia::create(blockNet->getBlock(), myStdViaDef, zeroTrans);
@ -720,8 +719,11 @@ namespace {
if(res) if(res)
return res; return res;
} }
if(hSegment) if(hSegment){
return toOAPathSeg(hSegment,blockNet); oaPathSeg* res = toOAPathSeg(hSegment,blockNet);
if(res)
return res;
}
return toOARect(component,blockNet->getBlock()); return toOARect(component,blockNet->getBlock());
} }
@ -757,8 +759,7 @@ namespace {
Components externalComponents = NetExternalComponents::get(net); Components externalComponents = NetExternalComponents::get(net);
for_each_component(component, externalComponents) { for_each_component(component, externalComponents) {
oaPinFig* pinFig = toOAPinFig(component,blockNet); oaPinFig* pinFig = toOAPinFig(component,blockNet);
if(!pinFig)//for bug : when segment are point assert(pinFig);
continue;
pinFig->addToPin(pin); pinFig->addToPin(pin);
end_for; end_for;
} }
@ -782,9 +783,9 @@ namespace {
} }
cerr << " o transformation of segments" << endl; cerr << " o transformation of segments" << endl;
for_each_segment(component, net->getSegments()) { for_each_segment(component, net->getSegments()) {
oaPathSeg* shape = toOAPathSeg(component,blockNet); oaShape* shape = toOAPathSeg(component,blockNet);
if(!shape)//avoid error when the segment is a point if(!shape)
continue; shape = toOARect(static_cast<Component*>(component),blockNet->getBlock());
shape->addToNet(blockNet); shape->addToNet(blockNet);
end_for; end_for;
} }

View File

@ -14,6 +14,7 @@ compile:
run: compile run: compile
./$(M)/usr/local/bin/testOAWrapper $(TECHNOFILE) $(TESTDIR) 2>&1 | tee $@.log ./$(M)/usr/local/bin/testOAWrapper $(TECHNOFILE) $(TESTDIR) 2>&1 | tee $@.log
cd $(TESTDIR)/OAdrive && oa2lef -lib sxlib -views layout -lef sxlibFromOA.lef
debug: compile debug: compile
gdb -args ./$(M)/usr/local/bin/testOAWrapper $(TECHNOFILE) $(TESTDIR) gdb -args ./$(M)/usr/local/bin/testOAWrapper $(TECHNOFILE) $(TESTDIR)

View File

@ -1,6 +1,7 @@
all: sxlib.lef all: sxlib.lef
lef2oa -lib sxlib -lef sxlib.lef lef2oa -lib sxlib -lef sxlib.lef
oa2lef -lib sxlib -lef sxlib_back.lef
sxlib.lef: sxlib.lef:
grep -v "END LIBRARY" cmos.lef.bak > sxlib.lef ; for i in $$(cat cells) ; do sxlib2lef $$i ; cat $$i.lef >> sxlib.lef ; done grep -v "END LIBRARY" cmos.lef.bak > sxlib.lef ; for i in $$(cat cells) ; do sxlib2lef $$i ; cat $$i.lef >> sxlib.lef ; done