From 8418a8c6b2299edcbefc4b3da52e1ded45271601 Mon Sep 17 00:00:00 2001 From: Jean-Manuel Caba Date: Wed, 18 Aug 2010 11:51:24 +0000 Subject: [PATCH] create oaRect when a segment can't be converted to oaPathSeg, i.e: source point is equal to target point in segment --- .../src/ccore/openaccess/OpenAccessDriver.cpp | 25 ++++++++++--------- .../src/ccore/openaccess/testDriver/Makefile | 1 + .../openaccess/testDriver/sxlib2lef/Makefile | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/crlcore/src/ccore/openaccess/OpenAccessDriver.cpp b/crlcore/src/ccore/openaccess/OpenAccessDriver.cpp index 591c42b2..f695cbba 100644 --- a/crlcore/src/ccore/openaccess/OpenAccessDriver.cpp +++ b/crlcore/src/ccore/openaccess/OpenAccessDriver.cpp @@ -1,5 +1,5 @@ // -*-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 // | This file is part of the hurricaneAMS Software. | // | Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved | @@ -655,14 +655,13 @@ namespace { cerr << "contact: " << contact << " is a Via" << endl; }else{ cerr << "contact: " << contact << " is NOT a Via" << endl; + return NULL; } oaString viaDefName = getString(layer->getName()).c_str(); oaStdViaDef* myStdViaDef = static_cast( oaViaDef::find(_oaTech, viaDefName) ); - if(!myStdViaDef) - return NULL; - else - cerr << "creating oaStdVia ..." << endl; + assert(myStdViaDef); + cerr << "creating oaStdVia ..." << endl; oaTransform zeroTrans(oaPoint(0, 0), oacR0); oaStdVia* via = oaStdVia::create(blockNet->getBlock(), myStdViaDef, zeroTrans); @@ -720,8 +719,11 @@ namespace { if(res) return res; } - if(hSegment) - return toOAPathSeg(hSegment,blockNet); + if(hSegment){ + oaPathSeg* res = toOAPathSeg(hSegment,blockNet); + if(res) + return res; + } return toOARect(component,blockNet->getBlock()); } @@ -757,8 +759,7 @@ namespace { Components externalComponents = NetExternalComponents::get(net); for_each_component(component, externalComponents) { oaPinFig* pinFig = toOAPinFig(component,blockNet); - if(!pinFig)//for bug : when segment are point - continue; + assert(pinFig); pinFig->addToPin(pin); end_for; } @@ -782,9 +783,9 @@ namespace { } cerr << " o transformation of segments" << endl; for_each_segment(component, net->getSegments()) { - oaPathSeg* shape = toOAPathSeg(component,blockNet); - if(!shape)//avoid error when the segment is a point - continue; + oaShape* shape = toOAPathSeg(component,blockNet); + if(!shape) + shape = toOARect(static_cast(component),blockNet->getBlock()); shape->addToNet(blockNet); end_for; } diff --git a/crlcore/src/ccore/openaccess/testDriver/Makefile b/crlcore/src/ccore/openaccess/testDriver/Makefile index bb012506..059e1231 100644 --- a/crlcore/src/ccore/openaccess/testDriver/Makefile +++ b/crlcore/src/ccore/openaccess/testDriver/Makefile @@ -14,6 +14,7 @@ compile: run: compile ./$(M)/usr/local/bin/testOAWrapper $(TECHNOFILE) $(TESTDIR) 2>&1 | tee $@.log + cd $(TESTDIR)/OAdrive && oa2lef -lib sxlib -views layout -lef sxlibFromOA.lef debug: compile gdb -args ./$(M)/usr/local/bin/testOAWrapper $(TECHNOFILE) $(TESTDIR) diff --git a/crlcore/src/ccore/openaccess/testDriver/sxlib2lef/Makefile b/crlcore/src/ccore/openaccess/testDriver/sxlib2lef/Makefile index 03f27e8c..07c97029 100644 --- a/crlcore/src/ccore/openaccess/testDriver/sxlib2lef/Makefile +++ b/crlcore/src/ccore/openaccess/testDriver/sxlib2lef/Makefile @@ -1,6 +1,7 @@ all: sxlib.lef lef2oa -lib sxlib -lef sxlib.lef + oa2lef -lib sxlib -lef sxlib_back.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