correcting getOATechFromTecnolology ...

This commit is contained in:
Jean-Manuel Caba 2010-07-15 17:31:33 +00:00
parent 4538d4fbca
commit 39ba5a56a8
2 changed files with 41 additions and 23 deletions

View File

@ -1,5 +1,5 @@
// -*-compile-command:"cd ../../../../.. && make"-*- // -*-compile-command:"cd ../../../../.. && make"-*-
// Time-stamp: "2010-07-15 17:35:58" - OpenAccessWrapper.cpp // Time-stamp: "2010-07-15 19:28:28" - OpenAccessWrapper.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 |
@ -342,7 +342,6 @@ namespace {
ldl = NULL; ldl = NULL;
cerr << "Overwrited cds.lib file" << endl; cerr << "Overwrited cds.lib file" << endl;
*/ */
return lib; return lib;
} }
@ -350,6 +349,7 @@ namespace {
convert oaLayer from a Layer ... convert oaLayer from a Layer ...
*/ */
oaLayer* getOALayerFromLayer(Layer* layer,oaTech* theOATech) { oaLayer* getOALayerFromLayer(Layer* layer,oaTech* theOATech) {
cerr << "getOALayerFromLayer" << endl;
assert(layer); assert(layer);
oaString layerName = getString(layer->getName()).c_str(); oaString layerName = getString(layer->getName()).c_str();
oaPhysicalLayer* aOALayer = NULL; oaPhysicalLayer* aOALayer = NULL;
@ -363,25 +363,35 @@ namespace {
_layer2OAPhysicalLayer[layer] = aOALayer; _layer2OAPhysicalLayer[layer] = aOALayer;
//TODO: add oaConstraint and oaConstraintGroup defined by technology //TODO: add oaConstraint and oaConstraintGroup defined by technology
/* cerr << " o get value for constraint" << endl;
DbU::Unit minSize = layer->getMinimalSize(); DbU::Unit minSize = layer->getMinimalSize();
DbU::Unit minSpace = layer->getMinimalSpacing();
DbU::Unit pitch = layer->getPitch();
cerr << " o create constraint for min size" << endl;
oaLayerConstraint* cMinSize = oaLayerConstraint::create(aOALayer->getNumber(), oaLayerConstraint* cMinSize = oaLayerConstraint::create(aOALayer->getNumber(),
oaLayerConstraintDef::get(oacMinSize), oaLayerConstraintDef::get(oacMinSize),
oaIntValue::create(aOALayer,minSize)); oaIntValue::create(theOATech->getLib(),minSize));
DbU::Unit minSpace = layer->getMinimalSpacing(); assert(cMinSize);
cerr << " o create constraint for min space" << endl;
oaLayerConstraint* cMinSpace = oaLayerConstraint::create(aOALayer->getNumber(), oaLayerConstraint* cMinSpace = oaLayerConstraint::create(aOALayer->getNumber(),
oaLayerConstraintDef::get(oacMinSpacing), oaLayerConstraintDef::get(oacMinSpacing),
oaIntValue::create(aOALayer,minSpace)); oaIntValue::create(theOATech->getLib(),minSpace));
DbU::Unit pitch = layer->getPitch(); assert(cMinSpace);
cerr << " o create constraint for pitchH" << endl;
oaLayerConstraint* cPitchH = oaLayerConstraint::create(aOALayer->getNumber(), oaLayerConstraint* cPitchH = oaLayerConstraint::create(aOALayer->getNumber(),
oaLayerConstraintDef::get(oacHorizontalRouteGridPitch), oaLayerConstraintDef::get(oacHorizontalRouteGridPitch),
oaIntValue::create(aOALayer,pitch)); oaIntValue::create(theOATech->getLib(),pitch));
assert(cPitchH);
cerr << " o create constraint for pitchV" << endl;
oaLayerConstraint* cPitchV = oaLayerConstraint::create(aOALayer->getNumber(), oaLayerConstraint* cPitchV = oaLayerConstraint::create(aOALayer->getNumber(),
oaLayerConstraintDef::get(oacVerticalRouteGridPitch), oaLayerConstraintDef::get(oacVerticalRouteGridPitch),
oaIntValue::create(aOALayer,pitch)); oaIntValue::create(theOATech->getLib(),pitch));
assert(cPitchV);
*/
if(bLayer){ if(bLayer){
unsigned gdsIInumber = bLayer->getExtractNumber(); unsigned gdsIInumber = bLayer->getExtractNumber();
} }
return aOALayer; return aOALayer;
} }
@ -389,6 +399,7 @@ namespace {
print the oaLayera in a oaTech ... print the oaLayera in a oaTech ...
*/ */
void printOALayers(oaTech* theOATech){ void printOALayers(oaTech* theOATech){
cerr << "printOALayers" << endl;
assert(theOATech); assert(theOATech);
oaIter<oaLayer> lIter(theOATech->getLayers()); oaIter<oaLayer> lIter(theOATech->getLayers());
while(oaLayer* l = lIter.getNext()){ while(oaLayer* l = lIter.getNext()){
@ -424,8 +435,10 @@ namespace {
cerr << "oaTech::find" << endl; cerr << "oaTech::find" << endl;
oaTech* theOATech = oaTech::find(techOAlib); oaTech* theOATech = oaTech::find(techOAlib);
if(!theOATech){ if(!theOATech){
if (oaTech::exists(techOAlib)){
cerr << "oaTech::open" << endl; cerr << "oaTech::open" << endl;
theOATech = oaTech::open(techOAlib,'a'); theOATech = oaTech::open(techOAlib,'a');
}
if(!theOATech){ if(!theOATech){
cerr << "oaTech::create" << endl; cerr << "oaTech::create" << endl;
theOATech = oaTech::create(techOAlib); theOATech = oaTech::create(techOAlib);
@ -437,7 +450,6 @@ namespace {
_oaTech = theOATech; _oaTech = theOATech;
return theOATech; return theOATech;
} }
assert(techOAlib); assert(techOAlib);
theOATech->setDefaultManufacturingGrid(10); theOATech->setDefaultManufacturingGrid(10);
theOATech->setDBUPerUU(oaViewType::get(oacMaskLayout), 1000); theOATech->setDBUPerUU(oaViewType::get(oacMaskLayout), 1000);
@ -447,7 +459,6 @@ namespace {
//strLayerDev ( "device" ); //strLayerDev ( "device" );
//strLayerText( "text" ); //strLayerText( "text" );
//strLayerPin ( "pin" ); //strLayerPin ( "pin" );
//strLayerCut1( "cut1" );
//strLayerWire( "wire" ); //strLayerWire( "wire" );
//create physical layer //create physical layer
@ -584,6 +595,9 @@ namespace {
create oaRect for slice ... create oaRect for slice ...
*/ */
oaRect* getOARectFromSlice(Slice* slice,oaBlock* topBlock){ oaRect* getOARectFromSlice(Slice* slice,oaBlock* topBlock){
cerr << "getOARectFromSlice" << endl;
assert(slice);
assert(topBlock);
for_each_component(component, slice->getComponents()) { for_each_component(component, slice->getComponents()) {
oaRect* rect = getOARectFromComponent(component,topBlock); oaRect* rect = getOARectFromComponent(component,topBlock);
end_for; end_for;
@ -912,6 +926,7 @@ namespace {
oaDesign* netlistView = createNetlist(cell); oaDesign* netlistView = createNetlist(cell);
assert(netlistView); assert(netlistView);
/*
oaDesign* symbolicView = addSymbol(cell,netlistView); oaDesign* symbolicView = addSymbol(cell,netlistView);
assert(symbolicView); assert(symbolicView);
@ -920,8 +935,8 @@ namespace {
oaDesign* layoutView = addLayout(cell,schematicView); oaDesign* layoutView = addLayout(cell,schematicView);
assert(layoutView); assert(layoutView);
*/
return layoutView; return netlistView;
} }
}; };
#endif #endif

View File

@ -9,5 +9,8 @@ run:
debug: debug:
cd x86_64/usr/local/bin && gdb -args ./testOAWrapper /asim/chams/etc/chams/config.freePDK45.xml cd x86_64/usr/local/bin && gdb -args ./testOAWrapper /asim/chams/etc/chams/config.freePDK45.xml
ddd:
cd x86_64/usr/local/bin && ddd -args ./testOAWrapper /asim/chams/etc/chams/config.freePDK45.xml
clean: clean:
rm -rf x86_64 rm -rf x86_64