add similar interface as Gds driver for OA driver
This commit is contained in:
parent
45c864dcf5
commit
fe342a9849
|
@ -39,6 +39,7 @@
|
||||||
crlcore/COptions.h
|
crlcore/COptions.h
|
||||||
crlcore/XmlParser.h
|
crlcore/XmlParser.h
|
||||||
crlcore/GdsDriver.h
|
crlcore/GdsDriver.h
|
||||||
|
crlcore/OADriver.h
|
||||||
crlcore/CifDriver.h
|
crlcore/CifDriver.h
|
||||||
crlcore/SearchPath.h
|
crlcore/SearchPath.h
|
||||||
crlcore/Environment.h
|
crlcore/Environment.h
|
||||||
|
@ -71,6 +72,7 @@
|
||||||
COptions.cpp
|
COptions.cpp
|
||||||
XmlParser.cpp
|
XmlParser.cpp
|
||||||
GdsDriver.cpp
|
GdsDriver.cpp
|
||||||
|
OADriver.cpp
|
||||||
CifDriver.cpp
|
CifDriver.cpp
|
||||||
SearchPath.cpp
|
SearchPath.cpp
|
||||||
Environment.cpp
|
Environment.cpp
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
// -*- C++ -*-
|
||||||
|
|
||||||
|
#include "hurricane/Cell.h"
|
||||||
|
using namespace Hurricane;
|
||||||
|
|
||||||
|
#include "crlcore/OADriver.h"
|
||||||
|
#include "openaccess/OpenAccessWrapper.h"
|
||||||
|
|
||||||
|
namespace CRL {
|
||||||
|
OADriver::OADriver(Cell* cell) : _cell(cell) {}
|
||||||
|
|
||||||
|
void OADriver::save(const string& filePath) {
|
||||||
|
unsigned int saveState;
|
||||||
|
CRL::OpenAccessWrapper::oaDriver(filePath, _cell, saveState);
|
||||||
|
}
|
||||||
|
}// namespace CRL
|
|
@ -0,0 +1,24 @@
|
||||||
|
// -*- C++ -*-
|
||||||
|
|
||||||
|
#ifndef __OA_DRIVER_H__
|
||||||
|
#define __OA_DRIVER_H__
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace Hurricane {
|
||||||
|
class Cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace CRL {
|
||||||
|
class OADriver {
|
||||||
|
public:
|
||||||
|
OADriver(Hurricane::Cell*);
|
||||||
|
void save(const std::string& path);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Hurricane::Cell* _cell;
|
||||||
|
};
|
||||||
|
} // End of CRL namespace.
|
||||||
|
|
||||||
|
#endif//__OA_DRIVER_H__
|
||||||
|
|
|
@ -203,6 +203,7 @@ class OADriver {
|
||||||
}
|
}
|
||||||
|
|
||||||
// libDefList->save();
|
// libDefList->save();
|
||||||
|
cerr << "ALL SAVED" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -220,8 +221,6 @@ class OADriver {
|
||||||
//cerr << "Creating new Library for Lib name="
|
//cerr << "Creating new Library for Lib name="
|
||||||
// << strNameLib << " to filesystem path=" << strPathLib << endl;
|
// << strNameLib << " to filesystem path=" << strPathLib << endl;
|
||||||
oaScalarName scNameLib(ns, strNameLib);
|
oaScalarName scNameLib(ns, strNameLib);
|
||||||
//for the moment absolute path
|
|
||||||
//strPathLib = "/dsk/l1/oatest/test";
|
|
||||||
cerr << "Creating new Library for Lib name="
|
cerr << "Creating new Library for Lib name="
|
||||||
<< strNameLib << " to filesystem path=" << strPathLib << endl;
|
<< strNameLib << " to filesystem path=" << strPathLib << endl;
|
||||||
oaLib* lib = oaLib::create(scNameLib, strPathLib.c_str(), oacSharedLibMode, "oaDMFileSys");
|
oaLib* lib = oaLib::create(scNameLib, strPathLib.c_str(), oacSharedLibMode, "oaDMFileSys");
|
||||||
|
@ -379,11 +378,10 @@ void OpenAccessWrapper::oaDriver(const string& path, Cell* cell, unsigned int& s
|
||||||
|
|
||||||
const char* strPathLib = pathLib.c_str();
|
const char* strPathLib = pathLib.c_str();
|
||||||
|
|
||||||
if (oaLib::exists(strPathLib)) {
|
// if (oaLib::exists(strPathLib)) {
|
||||||
throw Error("impossible to drive Cell, there is an existing OpenAccess db");
|
// throw Error("impossible to drive Cell, there is an existing OpenAccess db");
|
||||||
}
|
// }
|
||||||
|
|
||||||
pathLib = "/dsk/l1/oatest";
|
|
||||||
OADriver oaDriver(pathLib);
|
OADriver oaDriver(pathLib);
|
||||||
oaDesign* design = oaDriver.getOADesignForCell(cell);
|
oaDesign* design = oaDriver.getOADesignForCell(cell);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue