correcting layout view ...
This commit is contained in:
parent
a9a9bc2a20
commit
5e00d1092f
|
@ -1,5 +1,5 @@
|
||||||
// -*-compile-command:"cd ../../../../.. && make"-*-
|
// -*-compile-command:"cd ../../../../.. && make"-*-
|
||||||
// Time-stamp: "2010-08-06 01:22:51" - OpenAccessDriver.cpp
|
// Time-stamp: "2010-08-06 14:49: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 |
|
||||||
|
@ -460,6 +460,12 @@ namespace {
|
||||||
rect->addToPin(pin);
|
rect->addToPin(pin);
|
||||||
end_for;
|
end_for;
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
for_each_component(component, net->getComponents()) {
|
||||||
|
oaRect* rect = getOARectFromComponent(component,topBlock);
|
||||||
|
rect->addToNet(blockNet);
|
||||||
|
end_for;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cerr << " o transformation of plugs" << endl;
|
cerr << " o transformation of plugs" << endl;
|
||||||
for_each_plug(plug, net->getPlugs()) {
|
for_each_plug(plug, net->getPlugs()) {
|
||||||
|
@ -484,11 +490,12 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Create initial oaDesign from the cell and save it as a netlist view
|
Add netlist view to previous view ...
|
||||||
*/
|
*/
|
||||||
oaDesign* createOAasNetlist(const Cell* cell) {
|
oaDesign* addNetlist(const Cell* cell,oaDesign* previous) {
|
||||||
cerr << "createNetlist " << cell << endl;
|
cerr << "createNetlist " << cell << endl;
|
||||||
assert(cell);
|
assert(cell);
|
||||||
|
assert(previous);
|
||||||
Cell2OADesignMap::iterator it = _cell2OADesign4Netlist.find(cell);
|
Cell2OADesignMap::iterator it = _cell2OADesign4Netlist.find(cell);
|
||||||
if (it != _cell2OADesign4Netlist.end()) {
|
if (it != _cell2OADesign4Netlist.end()) {
|
||||||
return it->second;
|
return it->second;
|
||||||
|
@ -508,25 +515,16 @@ namespace {
|
||||||
oaDesign* designCellView = oaDesign::open(scNameLib, scNameDesign, scNameView, oaViewType::get(oacNetlist), 'a');
|
oaDesign* designCellView = oaDesign::open(scNameLib, scNameDesign, scNameView, oaViewType::get(oacNetlist), 'a');
|
||||||
_cell2OADesign4Netlist[cell] = designCellView;
|
_cell2OADesign4Netlist[cell] = designCellView;
|
||||||
|
|
||||||
// 3) create oaBlock singleton where we will do all the work
|
// get module or embed previous module
|
||||||
oaBlock* topBlock = designCellView->getTopBlock();
|
oaModule* topMod = NULL;
|
||||||
if(!topBlock){
|
topMod = designCellView->getTopModule();
|
||||||
cerr << "oaBlock::create for netlist view" << endl;
|
if(!topMod){
|
||||||
topBlock = oaBlock::create(designCellView);
|
topMod = oaModule::embed(designCellView, previous);
|
||||||
|
designCellView->setTopModule(topMod);
|
||||||
}
|
}
|
||||||
|
oaBlock *topBlock = designCellView->getTopBlock();
|
||||||
assert(topBlock);
|
assert(topBlock);
|
||||||
|
|
||||||
// 4) convert each OA object
|
|
||||||
cerr << "transformation of instances" << endl;
|
|
||||||
for_each_instance(instance, cell->getInstances()){
|
|
||||||
getOAInstForInstance(instance,topBlock);
|
|
||||||
end_for;
|
|
||||||
}
|
|
||||||
cerr << "transformation of nets" << endl;
|
|
||||||
for_each_net(net, cell->getNets()){
|
|
||||||
getOANetFromNet(net,topBlock);
|
|
||||||
end_for;
|
|
||||||
}
|
|
||||||
return designCellView;
|
return designCellView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +563,6 @@ namespace {
|
||||||
oaBlock *topBlock = designCellView->getTopBlock();
|
oaBlock *topBlock = designCellView->getTopBlock();
|
||||||
assert(topBlock);
|
assert(topBlock);
|
||||||
|
|
||||||
|
|
||||||
return designCellView;
|
return designCellView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -609,12 +606,11 @@ namespace {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add layout view to previous view ...
|
Create initial oaDesign from the cell and save it as a layout (abstract) view
|
||||||
*/
|
*/
|
||||||
oaDesign* addLayout(const Cell* cell,oaDesign* previous) {
|
oaDesign* createLayout(const Cell* cell) {
|
||||||
cerr << "addLayout" << cell << endl;
|
cerr << "addLayout" << cell << endl;
|
||||||
assert(cell);
|
assert(cell);
|
||||||
assert(previous);
|
|
||||||
Cell2OADesignMap::iterator it = _cell2OADesign4Layout.find(cell);
|
Cell2OADesignMap::iterator it = _cell2OADesign4Layout.find(cell);
|
||||||
if (it != _cell2OADesign4Layout.end()) {
|
if (it != _cell2OADesign4Layout.end()) {
|
||||||
return it->second;
|
return it->second;
|
||||||
|
@ -624,7 +620,7 @@ namespace {
|
||||||
oaLib* lib = getOALibForLibrary(cell->getLibrary());
|
oaLib* lib = getOALibForLibrary(cell->getLibrary());
|
||||||
assert(lib);
|
assert(lib);
|
||||||
oaScalarName scNameDesign(ns, getString(cell->getName()).c_str());
|
oaScalarName scNameDesign(ns, getString(cell->getName()).c_str());
|
||||||
oaScalarName scNameView(ns, "layout");
|
oaScalarName scNameView(ns, "abstract");
|
||||||
oaScalarName scNameLib;
|
oaScalarName scNameLib;
|
||||||
lib->getName(scNameLib);
|
lib->getName(scNameLib);
|
||||||
|
|
||||||
|
@ -634,24 +630,45 @@ namespace {
|
||||||
oaDesign* designCellView = oaDesign::open(scNameLib, scNameDesign, scNameView, vType, 'a');
|
oaDesign* designCellView = oaDesign::open(scNameLib, scNameDesign, scNameView, vType, 'a');
|
||||||
_cell2OADesign4Layout[cell] = designCellView;
|
_cell2OADesign4Layout[cell] = designCellView;
|
||||||
|
|
||||||
// get module or embed previous module
|
// create oaBlock singleton where we will do all the work
|
||||||
oaModule* topMod = NULL;
|
oaBlock* topBlock = designCellView->getTopBlock();
|
||||||
topMod = designCellView->getTopModule();
|
if(!topBlock){
|
||||||
if(!topMod){
|
cerr << "oaBlock::create for netlist view" << endl;
|
||||||
topMod = oaModule::embed(designCellView, previous);
|
topBlock = oaBlock::create(designCellView);
|
||||||
designCellView->setTopModule(topMod);
|
|
||||||
}
|
}
|
||||||
oaBlock *topBlock = designCellView->getTopBlock();
|
|
||||||
assert(topBlock);
|
assert(topBlock);
|
||||||
|
|
||||||
|
//get and update boundingBox
|
||||||
|
Box bBox = cell->getBoundingBox();
|
||||||
|
// Box bBox = cell->getAbutmentBox();
|
||||||
|
// assert(!bBox.isEmpty());
|
||||||
|
if(!bBox.isEmpty()){
|
||||||
|
oaBox boundingBox = oaFuncs::getOABoxFromBox(bBox);
|
||||||
|
topBlock->getBBox(boundingBox);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4) convert each OA object
|
||||||
|
cerr << "transformation of instances" << endl;
|
||||||
|
for_each_instance(instance, cell->getInstances()){
|
||||||
|
getOAInstForInstance(instance,topBlock);
|
||||||
|
end_for;
|
||||||
|
}
|
||||||
|
cerr << "transformation of nets" << endl;
|
||||||
|
for_each_net(net, cell->getNets()){
|
||||||
|
getOANetFromNet(net,topBlock);
|
||||||
|
end_for;
|
||||||
|
}
|
||||||
|
|
||||||
|
cerr << "transformation of components" << endl;
|
||||||
|
for_each_component(component, cell->getComponents()) {
|
||||||
|
oaRect* rect = getOARectFromComponent(component,topBlock);
|
||||||
|
end_for;
|
||||||
|
}
|
||||||
cerr << "transformation of slices" << endl;
|
cerr << "transformation of slices" << endl;
|
||||||
for_each_slice(slice, cell->getSlices()){
|
for_each_slice(slice, cell->getSlices()){
|
||||||
getOARectFromSlice(slice,topBlock);
|
getOARectFromSlice(slice,topBlock);
|
||||||
end_for;
|
end_for;
|
||||||
}
|
}
|
||||||
//get and update boundingBox
|
|
||||||
oaBox boundingBox;
|
|
||||||
topBlock->getBBox(boundingBox);
|
|
||||||
|
|
||||||
return designCellView;
|
return designCellView;
|
||||||
}
|
}
|
||||||
|
@ -668,28 +685,30 @@ namespace {
|
||||||
_oaTech = getOATechForTechnology(_technology,cell->getLibrary());
|
_oaTech = getOATechForTechnology(_technology,cell->getLibrary());
|
||||||
|
|
||||||
// 2) create OA structure ...
|
// 2) create OA structure ...
|
||||||
oaDesign* netlistView = createOAasNetlist(cell);
|
|
||||||
|
|
||||||
|
oaDesign* layoutView = createLayout(cell);
|
||||||
|
assert(layoutView);
|
||||||
|
|
||||||
|
oaCell* c1 = oaFuncs::getOACellFromOADesign(layoutView);
|
||||||
|
assert(c1);
|
||||||
|
|
||||||
|
oaDesign* netlistView = addNetlist(cell,layoutView);
|
||||||
assert(netlistView);
|
assert(netlistView);
|
||||||
|
|
||||||
oaCell* c1 = oaFuncs::getOACellFromOADesign(netlistView);
|
oaCell* c2 = oaFuncs::getOACellFromOADesign(netlistView);
|
||||||
assert(c1);
|
assert(c2);
|
||||||
|
|
||||||
oaDesign* symbolicView = addSymbol(cell,netlistView);
|
oaDesign* symbolicView = addSymbol(cell,netlistView);
|
||||||
assert(symbolicView);
|
assert(symbolicView);
|
||||||
|
|
||||||
oaCell* c2 = oaFuncs::getOACellFromOADesign(symbolicView);
|
oaCell* c3 = oaFuncs::getOACellFromOADesign(symbolicView);
|
||||||
assert(c2);
|
assert(c3);
|
||||||
|
|
||||||
oaDesign* schematicView = addSchematic(cell,symbolicView);
|
oaDesign* schematicView = addSchematic(cell,symbolicView);
|
||||||
assert(schematicView);
|
assert(schematicView);
|
||||||
|
|
||||||
oaCell* c3 = oaFuncs::getOACellFromOADesign(schematicView);
|
oaCell* c4 = oaFuncs::getOACellFromOADesign(schematicView);
|
||||||
assert(c3);
|
|
||||||
|
|
||||||
oaDesign* layoutView = addLayout(cell,schematicView);
|
|
||||||
assert(layoutView);
|
|
||||||
|
|
||||||
oaCell* c4 = oaFuncs::getOACellFromOADesign(layoutView);
|
|
||||||
assert(c4);
|
assert(c4);
|
||||||
|
|
||||||
//3) we check it's the same oaCell for all designs
|
//3) we check it's the same oaCell for all designs
|
||||||
|
@ -709,6 +728,8 @@ namespace CRL {
|
||||||
void OpenAccess::oaDriver(const string& path, Cell* cell) {
|
void OpenAccess::oaDriver(const string& path, Cell* cell) {
|
||||||
oaCell* convertedCell = NULL;
|
oaCell* convertedCell = NULL;
|
||||||
#ifdef HAVE_OPENACCESS
|
#ifdef HAVE_OPENACCESS
|
||||||
|
assert(cell);
|
||||||
|
cell->materialize();
|
||||||
//for the moment a driver for hurricaneAMS
|
//for the moment a driver for hurricaneAMS
|
||||||
//save the Cell only and all used Cell
|
//save the Cell only and all used Cell
|
||||||
cerr << "Saving " << cell << " in " << path << endl;
|
cerr << "Saving " << cell << " in " << path << endl;
|
||||||
|
|
Loading…
Reference in New Issue