diff --git a/crlcore/src/ccore/CMakeLists.txt b/crlcore/src/ccore/CMakeLists.txt index 1e71fabe..080397cd 100644 --- a/crlcore/src/ccore/CMakeLists.txt +++ b/crlcore/src/ccore/CMakeLists.txt @@ -39,6 +39,7 @@ crlcore/COptions.h crlcore/XmlParser.h crlcore/GdsDriver.h + crlcore/OADriver.h crlcore/CifDriver.h crlcore/SearchPath.h crlcore/Environment.h @@ -71,6 +72,7 @@ COptions.cpp XmlParser.cpp GdsDriver.cpp + OADriver.cpp CifDriver.cpp SearchPath.cpp Environment.cpp diff --git a/crlcore/src/ccore/OADriver.cpp b/crlcore/src/ccore/OADriver.cpp new file mode 100644 index 00000000..fe74bb49 --- /dev/null +++ b/crlcore/src/ccore/OADriver.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 diff --git a/crlcore/src/ccore/crlcore/OADriver.h b/crlcore/src/ccore/crlcore/OADriver.h new file mode 100644 index 00000000..1d03fb9a --- /dev/null +++ b/crlcore/src/ccore/crlcore/OADriver.h @@ -0,0 +1,24 @@ +// -*- C++ -*- + +#ifndef __OA_DRIVER_H__ +#define __OA_DRIVER_H__ + +#include + +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__ + diff --git a/crlcore/src/ccore/openaccess/OpenAccessWrapper.cpp b/crlcore/src/ccore/openaccess/OpenAccessWrapper.cpp index a7b6b81d..cd1f715c 100644 --- a/crlcore/src/ccore/openaccess/OpenAccessWrapper.cpp +++ b/crlcore/src/ccore/openaccess/OpenAccessWrapper.cpp @@ -203,6 +203,7 @@ class OADriver { } // libDefList->save(); + cerr << "ALL SAVED" << endl; } @@ -220,8 +221,6 @@ class OADriver { //cerr << "Creating new Library for Lib name=" // << strNameLib << " to filesystem path=" << strPathLib << endl; oaScalarName scNameLib(ns, strNameLib); - //for the moment absolute path - //strPathLib = "/dsk/l1/oatest/test"; cerr << "Creating new Library for Lib name=" << strNameLib << " to filesystem path=" << strPathLib << endl; 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(); - if (oaLib::exists(strPathLib)) { - throw Error("impossible to drive Cell, there is an existing OpenAccess db"); - } +// if (oaLib::exists(strPathLib)) { +// throw Error("impossible to drive Cell, there is an existing OpenAccess db"); +// } - pathLib = "/dsk/l1/oatest"; OADriver oaDriver(pathLib); oaDesign* design = oaDriver.getOADesignForCell(cell);