Coder Social home page Coder Social logo

the-openroad-project / opendb Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 43.0 10.26 MB

Database and Tool Framework for EDA

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.03% Tcl 0.35% C++ 88.60% C 1.17% Shell 0.07% CMake 0.24% Python 1.00% SWIG 1.36% Objective-C 1.07% Yacc 6.13%
database eda

opendb's People

Contributors

abdelrahmanhosny avatar ahmadelrouby avatar ahmed-agiza avatar colin-holehouse avatar dimitrisfotakis avatar eder-matheus avatar jjcherry56 avatar maliberty avatar mathursanjiv avatar osamahammad21 avatar pradi001 avatar tspyrou avatar vidyachhabria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opendb's Issues

Missing include to <string>

The lefout.h was recently modified and now fails to compile on our systems. It would appear the issue is a missing #include <string> in at the header of the file

std::unordered_map<std::string, short>& propertiesMap);

Please let me know if you need more information.

Thanks,
Peter

Read spacing table from OpenDB

Hi I'm tring to read the spacing table of a layer in LEF. The table is a 2d table with indices of width and length.

I can use the getV55SpacingTable() to read the entries of the table. But how do I read the index array of width and length?

I can only use the getMaxWideDRCRange() and getMinWideDRCRange() to get the max and min of width and length, but how about the values in the middle?

CMake tests tcl issue

I've needed to comment out this test addition because it uses an issue on non-standard installs with TCL. But since this is a test, shouldn't this directory only be included when compiling for debugging?

add_subdirectory(tests/cpp)

Thanks,
Peter

How do I remove design elements from a design using TCL?

There are some use cases where it is necessary to be able to delete objects from the database. For example, the PDN module inserts a power grid for the design, but this will clash with any existing nets defined in the incoming database.

There is a -delete function on many of the objects, however, this seems to delete the TCL object and doesnt affect the underlying database.

I am not blocked by this issue, as I can massage my incoming testcases - removing offending objects in my input DEF before loading into a database, so I would consider it "low" priority.

compile faild with Alpine linux (GCC 9)

Scanning dependencies of target opendb
[ 48%] Building CXX object src/db/CMakeFiles/opendb.dir/dbBTerm.cpp.o
In file included from /usr/include/limits.h:8,
from /root/temp/opendb/include/opendb/odb.h:37,
from /root/temp/opendb/include/opendb/ZException.h:35,
from /root/temp/opendb/src/db/dbAttrTable.h:35,
from /root/temp/opendb/src/db/dbCore.h:47,
from /root/temp/opendb/src/db/dbBTerm.h:37,
from /root/temp/opendb/src/db/dbBTerm.cpp:33:
/root/temp/opendb/src/db/dbAttrTable.h:51:21: error: expected unqualified-id before numeric constant
51 | static const uint PAGE_SIZE;
| ^~~~~~~~~
/root/temp/opendb/src/db/dbAttrTable.h:162:28: error: expected unqualified-id before numeric constant
162 | const uint dbAttrTable::PAGE_SIZE = 32;
| ^~~~~~~~~
/root/temp/opendb/src/db/dbAttrTable.h: In function 'odb::dbOStream& odb::operator<<(odb::dbOStream&, const odb::dbAttrTable&)':
/root/temp/opendb/src/db/dbAttrTable.h:254:39: error: expected unqualified-id before numeric constant
254 | for (j = 0; j < dbAttrTable::PAGE_SIZE; ++j)

cmake information:

[root@cec0efcfcea7 build]$ cmake .. -Wno-dev
-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Tclsh: /usr/bin/tclsh (found version "8.6")
-- Found TCL: /usr/lib/libtcl8.6.so
-- Found TCLTK: /usr/lib/libtcl8.6.so
-- Found TK: /usr/lib/libtk8.6.so
-- Found Boost: /usr/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0")
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- leflib_home: /root/temp/opendb/src/lef
-- Found BISON: /usr/bin/bison (found version "3.6.2")
-- Found ZLIB: /lib/libz.so (found version "1.2.11")
-- Found Boost: /usr/lib/cmake/Boost-1.72.0/BoostConfig.cmake (found version "1.72.0") found components: unit_test_framework
-- Found SWIG: /usr/bin/swig (found suitable version "4.0.1", minimum required is "3.0")
-- Found Python3: /usr/lib/libpython3.8.so (found version "3.8") found components: Development
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: /root/temp/opendb/build

Building for Red Hat

I have "Red Hat Enterprise Linux Server release 6.9" - in order to make the build process work I need to add the line

add_link_options(-lrt)

into the CMakeLists.txt file. Tested this out on UCSD machines, and the build is still successful with that setting. Please can this option be added into the CMakeLists.txt file.

OpenDB as a TCL package, rather than a standalone executable

The integration of OpenDB with Python provides it as a package that gets loaded into the Python interpreter.

The same can be done with TCL. Rather than having a separate executable, if opendbtcl is built as a shared object library, then it can be loaded into any TCL shell through the package loading mechanism.

Alongside the shared object library there would be a TCL file called pkgIndex.tcl, which would load the shared object library if required. This would look something like:

package ifneeded opendbtcl 1.0.0 [list load $dir/libopendbtcl.so]

The end user would add the path of the directory where the pkgIndex.tcl file could be found to the environment variable TCLLIBPATH so that all the packages are known (but not loaded) when the tclsh starts up.

More information on the TCL load command:
http://tmml.sourceforge.net/doc/tcl/load.html

To use the opendbtcl package, the end user would do the following:

% tclsh
> package require opendbtcl

Taking this approach will make the python/tcl approach more consistent and tidy up some loose ends in the current opendbtcl binary [e.g. the package mechanism not working]

How can I create a row using the TCL interface

The command to create a row seems to be of the form:

dbRow_create block name site origin_x origin_y orient direction num_sites spacing

e.g.
dbRow_create $block abc $site 0 0 N horizontal 400 480
TypeError in method 'dbRow_create', argument 6 of type 'dbOrientType'

How do I create a dbOrientType to use for this - shouldn't the wrapper convert a string argument for me?

Output DEF creates illegal DEF for instance HALOs

Running the enclose tcl script on a DEF with a component that has a HALO defined, the output DEF has written an illegal syntax for the HALO description. From the transcript you can see that parentheses have been used
halo_test.tar.gz
when writing out the DEF that should not be present.

Transcript as follows:

% set db [dbDatabase_create]

odb_read_lef $db nangate45/NangateOpenCellLibrary.mod.lef
odb_read_def [$db getLibs] halo_test.input.def

odb_write_def [[$db getChip] getBlock] halo_test.output.def DEF_5_6

dbDatabase_destroy $db
_607a2c0200000000_p_odb__dbDatabase
% % No Logger: notice 0: Reading LEF file:  nangate45/NangateOpenCellLibrary.mod.lef

No Logger: notice 0:     Created 22 technology layers

No Logger: notice 0:     Created 27 technology vias

No Logger: notice 0:     Created 134 library cells

No Logger: notice 0: Finished LEF file:  nangate45/NangateOpenCellLibrary.mod.lef

_3011370200000000_p_odb__dbLib
% No Logger: notice 0: 
Reading DEF file: halo_test.input.def

No Logger: notice 0: Design: test

No Logger: notice 0:     Created 1 components and 5 component-terminals.

No Logger: notice 0: Finished DEF file: halo_test.input.def

_2056340200000000_p_odb__dbChip
% % 1
% % % set db1 [dbDatabase_create]
_607a2c0200000000_p_odb__dbDatabase
% odb_read_lef $db1 nangate45/NangateOpenCellLibrary.mod.lef
No Logger: notice 0: Reading LEF file:  nangate45/NangateOpenCellLibrary.mod.lef

No Logger: notice 0:     Created 22 technology layers

No Logger: notice 0:     Created 27 technology vias

No Logger: notice 0:     Created 134 library cells

No Logger: notice 0: Finished LEF file:  nangate45/NangateOpenCellLibrary.mod.lef

_709d410200000000_p_odb__dbLib
% odb_read_def [$db1 getLibs] halo_test.output.def
No Logger: notice 0: 
Reading DEF file: halo_test.output.def

No Logger: notice 0: Design: test

No Logger: notice 0: error: DEF:17: syntax error, reading (


deflex: token leaked from line 17 with value AND2_X1
deflex: token leaked from line 17 with value test
No Logger: notice 0:     Created 1 components and 5 component-terminals.

No Logger: notice 0: Finished DEF file: halo_test.output.def

_b04d380200000000_p_odb__dbChip
% exec diff halo_test.input.def halo_test.output.def
17c17
<     - test AND2_X1 + FIXED ( 2784400 517660 ) N + HALO 1600 5120 1600 6060 ;
---
>     - test AND2_X1 + FIXED ( 2784400 517660 ) N + HALO ( 1600 5120 ) ( 1600 6060 ) ;

Helper functions to read lef too restrictive

It is not normal practice to concatenate LEF files together into a single file before reading into a tool.

Normally there is a single LEF file that defines the technology - this file is specified first in a list of LEF files, and is read first in order to define all the layers etc. Subsequent LEF files are read and add cells to the library.

Load additional data into a block with a DEF file

Need to have a function available from TCL to load a DEF file that will append it's data into an existing design.

Currently apply_pdn works by generating a DEF file, then merging it with the original input DEF file. This capability is available in existing EDA tools.

Testcases for extracting design data using the TCL interface

The enclosed testcase.tgz includes data and unit tests to be added to OpenDB.

The library data is based on the nangate45 open library

The first testcase, gcd_def_access_checks.tcl looks at floorplan.def. 43 out of 54 tests pass in this suite.

The second testcase, gcd_pdn_def_access_checks.tcl looks at gcd_pdn.def. 50 out of 69 tests pass in this suite

testcase.tar.gz

Cannot set viaParams on a via using TCL

The TCL function dbVia_setViaParams doesn't accept enough arguments, so I'm unable to set the via parameters

% $block getVias
_a0b0839e267f0000_p_odb__dbVia
% set via _a0b0839e267f0000_p_odb__dbVia
_a0b0839e267f0000_p_odb__dbVia
% $via hasParams
0
% set params [$via getViaParams]
_b048730100000000_p_odb__dbViaParams
% $params setNumCutRows 3
% $params getNumCutRows
3
% [$via getViaParams] getNumCutRows
1
% $via hasParams
0
% $via setViaParams $params
Wrong # args.:dbVia_setViaParams self argument 2

Clearly [$via getViaParams] is returning a copy of the viaParams object. This being the case, I need to be able to set the params to a modified set by calling the $via setViaParams function - however, this function does not accept a dbViaParams object as an argument.

Read / Write of databases

At the end of a session with the database I should be able to save the current database to a file, then I should be able to exit the tool, restart and load the database so that I'm back at the same position.

Currently all the examples are of the dbDatabase_create variety.

If I try to save a database with dbDatabase_write I get a type error

% $db write test.odb
TypeError in method 'dbDatabase_write', argument 2 of type 'FILE *'

For read:
% $db read test.odb
TypeError in method 'dbDatabase_read', argument 2 of type 'FILE *'

does this imply that I have to create a database in order to load a database?

Enable autoloading of package information

Adding the following code to the TCL routine that is executed at startup will enable the package loading mechanism to be enabled.

foreach dir $env(TCLLIBPATH) {
    if {[file exists $dir/pkgIndex.tcl]} {
        source $dir/pkgIndex.tcl
    }
}

Note the loop variable dir is used inside the pkgIndex.tcl files to load the TCL source code for a package when the package require command is called.

Access to DEF properties from TCL

There are some properties stored in the DEF that I need to get access to from the TCL interface, but it's unclear how I would go about accessing them.

% dbProperty_getProperties
Wrong number of arguments :dbProperty_getProperties object argument 1
% dbProperty_getProperties $block
TypeError in method 'dbProperty_getProperties', argument 1 of type 'dbObject *'
% dbProperty_getProperties $db
TypeError in method 'dbProperty_getProperties', argument 1 of type 'dbObject *'

Is there some additional SWIG support required for properties?

CmakeLists.txt project DESCRIPTION requires cmake > 3.8

The project currently degined in the CMakeLists.txt includes a "DESCRIPTION" parameter. (https://github.com/The-OpenROAD-Project/OpenDB/blob/master/CMakeLists.txt#L14)

The DESCRIPTION parameters was added in CMake 3.8, and so this is breaks compilation on platforms with CMake <= 3.8

Either remove this parameter or bump minimum cmake version required to 3.8

The specific error using cmake 3.3.2 is as follows

$ cmake ..
CMake Error: Could not find cmake module file: CMakeDetermineDESCRIPTIONCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_DESCRIPTION_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_DESCRIPTION_COMPILER
CMake Error: Could not find cmake module file: /net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/CMakeFiles/3.3.2/CMakeDESCRIPTIONCompiler.cmake
CMake Error: Could not find cmake module file: CMakeDetermineDatabase and Tool Framework for EDACompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Database and Tool Framework for EDA_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_Database and Tool Framework for EDA_COMPILER
CMake Error: Could not find cmake module file: /net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/CMakeFiles/3.3.2/CMakeDatabase and Tool Framework for EDACompiler.cmake
CMake Error at CMakeLists.txt:13 (project):
  No CMAKE_DESCRIPTION_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_DESCRIPTION_COMPILER to the full path to the compiler, or to the
  compiler name if it is in the PATH.


CMake Error: Could not find cmake module file: CMakeDESCRIPTIONInformation.cmake
CMake Error at CMakeLists.txt:13 (project):
  No CMAKE_Database and Tool Framework for EDA_COMPILER could be found.

  Tell CMake where to find the compiler by setting the CMake cache entry
  CMAKE_Database and Tool Framework for EDA_COMPILER to the full path to the
  compiler, or to the compiler name if it is in the PATH.


CMake Error: Could not find cmake module file: CMakeDatabase and Tool Framework for EDAInformation.cmake
CMake Error: CMAKE_DESCRIPTION_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_Database and Tool Framework for EDA_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/CMakeFiles/CMakeOutput.log".

Compilation errors builing cpp application

Hi all,

I tried making an application. My Makefile is:
INC = -I/home/muktadir/cse220/OpenDB/include/opendb
LIB = /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a

all: app

app: includeText.cpp ${LIB}
	c++ -Wall -pedantic -g $(INC) includeText.cpp -o includeText ${LIB}

clean:
	rm -f app

And I am getting these errors:

c++ -Wall -pedantic -g -I/home/muktadir/cse220/OpenDB/include/opendb includeText.cpp -o includeText /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::operator>>(odb::dbIStream&, odb::_dbDatabase&)': dbDatabase.cpp:(.text+0x169d): undefined reference to odb::ZException::ZException(char const*, ...)'
dbDatabase.cpp:(.text+0x16a4): undefined reference to odb::ZException::~ZException()' dbDatabase.cpp:(.text+0x16ff): undefined reference to odb::ZException::ZException(char const*, ...)'
dbDatabase.cpp:(.text+0x1706): undefined reference to odb::ZException::~ZException()' dbDatabase.cpp:(.text+0x175e): undefined reference to odb::ZException::ZException(char const*, ...)'
dbDatabase.cpp:(.text+0x1765): undefined reference to odb::ZException::~ZException()' dbDatabase.cpp:(.text+0x17be): undefined reference to odb::ZException::ZException(char const*, ...)'
dbDatabase.cpp:(.text+0x17c5): undefined reference to odb::ZException::~ZException()' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::dbDatabase::writeTech(_IO_FILE*)':
dbDatabase.cpp:(.text+0x255c): undefined reference to odb::ZException::ZException(char const*, ...)' dbDatabase.cpp:(.text+0x2563): undefined reference to odb::ZException::~ZException()'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::ZOutOfMemory::ZOutOfMemory()': dbDatabase.cpp:(.text._ZN3odb12ZOutOfMemoryC2Ev[_ZN3odb12ZOutOfMemoryC5Ev]+0x14): undefined reference to odb::ZException::ZException()'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::ZIOError::~ZIOError()': dbDatabase.cpp:(.text._ZN3odb8ZIOErrorD2Ev[_ZN3odb8ZIOErrorD5Ev]+0x14): undefined reference to odb::ZException::~ZException()'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::dbOStream::write_error()': dbDatabase.cpp:(.text._ZN3odb9dbOStream11write_errorEv[_ZN3odb9dbOStream11write_errorEv]+0x39): undefined reference to odb::ZIOError::ZIOError(int, char const*)'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::dbIStream::read_error()': dbDatabase.cpp:(.text._ZN3odb9dbIStream10read_errorEv[_ZN3odb9dbIStream10read_errorEv]+0x44): undefined reference to odb::ZException::ZException(char const*, ...)'
dbDatabase.cpp:(.text._ZN3odb9dbIStream10read_errorEv[_ZN3odb9dbIStream10read_errorEv]+0x4b): undefined reference to odb::ZException::~ZException()' dbDatabase.cpp:(.text._ZN3odb9dbIStream10read_errorEv[_ZN3odb9dbIStream10read_errorEv]+0x8d): undefined reference to odb::ZIOError::ZIOError(int, char const*)'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbDatabase.cpp.o): In function odb::ZOutOfMemory::~ZOutOfMemory()': dbDatabase.cpp:(.text._ZN3odb12ZOutOfMemoryD2Ev[_ZN3odb12ZOutOfMemoryD5Ev]+0x14): undefined reference to odb::ZException::~ZException()'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function _getBits': logger.cpp:(.text+0x4b): undefined reference to Tcl_AppendResult'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function _getCompileTime': logger.cpp:(.text+0x8d): undefined reference to Tcl_AppendResult'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function _getCPUTime': logger.cpp:(.text+0x152): undefined reference to Tcl_AppendResult'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_allocMem(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0x3f8): undefined reference to Tcl_GetIntFromObj'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_enableMemCount(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0x518): undefined reference to Tcl_GetIntFromObj'
logger.cpp:(.text+0x549): undefined reference to Tcl_GetDoubleFromObj' logger.cpp:(.text+0x5a5): undefined reference to odb::AthSignalInstaller(int, void ()(int))'
logger.cpp:(.text+0x5db): undefined reference to odb::AthMemCounter(int)' logger.cpp:(.text+0x5e8): undefined reference to odb::AthSignalInstaller(int, void (
)(int))'
logger.cpp:(.text+0x614): undefined reference to odb::AthMemCounterp(int)' logger.cpp:(.text+0x621): undefined reference to odb::AthSignalInstaller(int, void ()(int))'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_setVerbose(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0x6e3): undefined reference to Tcl_GetIntFromObj'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_setDebug(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0x750): undefined reference to Tcl_GetString'
logger.cpp:(.text+0x767): undefined reference to Tcl_GetString' logger.cpp:(.text+0x77e): undefined reference to Tcl_GetString'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_startTimer(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0xdbd): undefined reference to Tcl_AppendResult'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_showTimer(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0xe11): undefined reference to Tcl_GetString'
logger.cpp:(.text+0xe28): undefined reference to Tcl_GetString' logger.cpp:(.text+0xe3f): undefined reference to Tcl_GetString'
logger.cpp:(.text+0xe61): undefined reference to Tcl_GetIntFromObj' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_resetTimer(void
, Tcl_Interp*, int, Tcl_Obj* const*)':
logger.cpp:(.text+0xed7): undefined reference to Tcl_GetIntFromObj' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_getTimer(void*, Tcl_Interp*, int, Tcl_Obj* const*)':
logger.cpp:(.text+0xf40): undefined reference to Tcl_GetIntFromObj' logger.cpp:(.text+0xf90): undefined reference to Tcl_AppendResult'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_getCWToken(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0xfea): undefined reference to Tcl_AppendResult'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::_setWarnCount(void*, Tcl_Interp*, int, Tcl_Obj* const*)': logger.cpp:(.text+0x1181): undefined reference to Tcl_GetString'
logger.cpp:(.text+0x11a3): undefined reference to Tcl_GetIntFromObj' logger.cpp:(.text+0x11c1): undefined reference to Tcl_GetIntFromObj'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::Logger::initLogger(Tcl_Interp*)': logger.cpp:(.text+0x124a): undefined reference to Tcl_CreateObjCommand'
logger.cpp:(.text+0x126f): undefined reference to Tcl_CreateObjCommand' logger.cpp:(.text+0x1294): undefined reference to Tcl_CreateObjCommand'
logger.cpp:(.text+0x12b9): undefined reference to Tcl_CreateObjCommand' logger.cpp:(.text+0x12e2): undefined reference to Tcl_CreateObjCommand'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o):logger.cpp:(.text+0x130b): more undefined references to Tcl_CreateObjCommand' follow /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::idle(int)':
logger.cpp:(.text+0x14c0): undefined reference to odb::ZInterface::idle(int)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::debug(char const*, char const*, char const*, ...)':
logger.cpp:(.text+0x1916): undefined reference to odb::ZInterface::notice(int, char const*, ...)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::milos(int, char const*, ...)':
logger.cpp:(.text+0x1ceb): undefined reference to odb::ZInterface::event(char const*, char const*, char const*, ...)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::ade(int, char const*, ...)':
logger.cpp:(.text+0x1e6b): undefined reference to odb::ZInterface::event(char const*, char const*, char const*, ...)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::notice(int, char const*, ...)':
logger.cpp:(.text+0x2000): undefined reference to odb::ZInterface::event(char const*, char const*, char const*, ...)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::verbose(int, char const*, ...)':
logger.cpp:(.text+0x21ad): undefined reference to odb::ZInterface::event(char const*, char const*, char const*, ...)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::info(int, char const*, ...)':
logger.cpp:(.text+0x2365): undefined reference to odb::ZInterface::event(char const*, char const*, char const*, ...)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o):logger.cpp:(.text+0x251d): more undefined references to odb::ZInterface::event(char const*, char const*, char const*, ...)' follow
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::Logger::Logger(Tcl_Interp*)': logger.cpp:(.text._ZN3odb6LoggerC2EP10Tcl_Interp[_ZN3odb6LoggerC5EP10Tcl_Interp]+0x18): undefined reference to odb::ZInterface::ZInterface()'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o): In function odb::Logger::~Logger()': logger.cpp:(.text._ZN3odb6LoggerD2Ev[_ZN3odb6LoggerD5Ev]+0x26): undefined reference to odb::ZInterface::~ZInterface()'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(logger.cpp.o):(.data.rel.ro._ZTIN3odb6LoggerE[_ZTIN3odb6LoggerE]+0x10): undefined reference to typeinfo for odb::ZInterface' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbBlock.cpp.o): In function odb::dbBlock::findSomeMaster(char const*, std::vector<odb::dbMaster*, std::allocatorodb::dbMaster* >&)':
dbBlock.cpp:(.text+0x9928): undefined reference to Ath__parser::Ath__parser()' dbBlock.cpp:(.text+0x9944): undefined reference to Ath__parser::mkWords(char const*, char*)'
dbBlock.cpp:(.text+0x9957): undefined reference to Ath__parser::getWordCnt()' dbBlock.cpp:(.text+0x9972): undefined reference to Ath__parser::get(int)'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbBlock.cpp.o): In function odb::dbBlock::findSomeNet(char const*, std::vector<odb::dbNet*, std::allocator<odb::dbNet*> >&)': dbBlock.cpp:(.text+0x9a77): undefined reference to Ath__parser::Ath__parser()'
dbBlock.cpp:(.text+0x9a93): undefined reference to Ath__parser::mkWords(char const*, char*)' dbBlock.cpp:(.text+0x9aa6): undefined reference to Ath__parser::getWordCnt()'
dbBlock.cpp:(.text+0x9ac5): undefined reference to Ath__parser::get(int)' /home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbBlock.cpp.o): In function odb::dbBlock::findSomeInst(char const*, std::vector<odb::dbInst*, std::allocatorodb::dbInst* >&)':
dbBlock.cpp:(.text+0x9c19): undefined reference to Ath__parser::Ath__parser()' dbBlock.cpp:(.text+0x9c35): undefined reference to Ath__parser::mkWords(char const*, char*)'
dbBlock.cpp:(.text+0x9c48): undefined reference to Ath__parser::getWordCnt()' dbBlock.cpp:(.text+0x9c67): undefined reference to Ath__parser::get(int)'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbBlock.cpp.o): In function odb::dbBlock::saveLef(char*)': dbBlock.cpp:(.text+0xeaf8): undefined reference to odb::lefout::writeTechAndLib(odb::dbLib*, char const*)'
/home/muktadir/cse220/OpenDB/build/src/db/libopendb.a(dbBlock.cpp.o): In function odb::dbBlock::saveDef(char*, char*)': dbBlock.cpp:(.text+0xebbb): undefined reference to odb::defout::defout()'
dbBlock.cpp:(.text+0xec07): undefined reference to odb::defout::selectNet(odb::dbNet*)' dbBlock.cpp:(.text+0xec24): undefined reference to odb::defout::writeBlock(odb::dbBlock*, char const*)'
dbBlock.cpp:(.text+0xec54): undefined reference to odb::defout::~defout()' dbBlock.cpp:(.text+0xec81): undefined reference to odb::defout::~defout()'
collect2: error: ld returned 1 exit status
Makefile:7: recipe for target 'app' failed
make: *** [app] Error 1

DEF files (version 5.8) written contain an obsolete NAMESCASESENSITIVE statement

Additional via checking

I wrote some additional tests to examin vias that are created from via rules - the tests pass, so nothing to fix, but it would be good to incorporate the tests into the regression test suite.

via_definition.tcl.gz

OpenDB requies newer swig version

On CentOS 6 the default version of swig is 1.3.40 but OpenDB fails to build. I was able to get it working by updating to a new version of swig (I used 2.0.8).

Please bump the minimum version of swig required in the CMakeLists.txt

I observe the following error using SWIG Version 1.3.40

[ 98%] Building CXX object src/swig/tcl/CMakeFiles/opendbtcl.dir/opendb_wrap.cpp.o
/net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/src/swig/tcl/opendb_wrap.cpp: In function \u2018int _wrap_dbWireGraph_createVia__SWIG_0(ClientData, Tcl_Interp*, int, Tcl_Obj* const*)\u2019:
/net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/src/swig/tcl/opendb_wrap.cpp:69089:3: error: \u2018Via\u2019 was not declared in this scope
   Via *result = 0 ;
   ^
/net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/src/swig/tcl/opendb_wrap.cpp:69089:8: error: \u2018result\u2019 was not declared in this scope
   Via *result = 0 ;
        ^
/net/trenton/x/ajayi/projects/OpenROAD/ux/OpenDB/build/src/swig/tcl/opendb_wrap.cpp:69128:18: error: expected primary-expression before \u2018)\u2019 token
   result = (Via *)(arg1)->createVia(arg2,arg3,arg4,arg5,arg6);

Forcing an even dimension for dbSBox?

Is there a reason that the following lines require a dbSBox to have an even dimension (in DB units)?

OpenDB/src/db/dbSBox.cpp

Lines 200 to 211 in 3946371

if ( (dx & 1) && (dy & 1) ) // both odd
return NULL;
break;
case HORIZONTAL:
if ( dy & 1 ) // dy odd
return NULL;
break;
case VERTICAL:
if ( dx & 1 ) // dy odd

DEF version

If I try to set the version of DEF to be writteon out, I get:

ERROR: set defout version: Command {$def_writer setVersion DEF_5_6}
TypeError in method 'defout_setVersion', argument 2 of type 'odb::defout::Version'

I've updated one of the tests to include this check
07-write_def_test.tcl.gz

The header of the def is:

% more ./OpenDB/build/test.def
VERSION 5.3 ;
NAMESCASESENSITIVE ON ;
DIVIDERCHAR "/" ;
BUSBITCHARS "[]" ;
DESIGN counter ;
UNITS DISTANCE MICRONS 1000 ;

the VERSION value is hardcoded in the defout code. (The version in the incoming DEF is 5.7, so unless otherwise modified by the user, this should be the default value used for the def out version as well)

readLef in Lefin for c++

Hi I'm a student from UT Austin and I'm trying to use OpenDB to read Lef/Def for my router which is in C++.
My understanding of using it is:
dbDatabase db;
lefin lef(&db, false);
defin def(&db);
lef.readLef(lefFileName);
def.createChip(.....);
etc.
My question is, the readLef function in lefin is private. I'm unable to call it. Should it be public?
Could you please provide a simple example just to show how to read and write LEF/DEF?

dbBlock_getParent on top block causes assertion falure

According to the header comments in db.h#L934:

    /// Get the parent block this block. Returns NULL if this block is the
    /// top-block of the chip.
    ///
    dbBlock * getParent();

However, when getting the parent of a top-level block in the tcl shell, it causes an assertion failure and crashes the shell:

opendbtcl: /OpenDB/src/db/dbTable.h:126: T* odb::dbTable<T>::getPtr(uint) const [with T = odb::_dbBlock; uint = unsigned int]: Assertion `(id != 0) && (page < _page_cnt)' failed.
Aborted (core dumped)

I would expect the function to return NULL or gracefully error. Is this the expected behavior?

A code snippet which will reproduce the crash:

set db [dbDatabase_create]
set lef_parser [new_lefin $db true]
set def_parser [new_defin $db]
set lib [lefin_createTechAndLib $lef_parser gscl45nm ./OpenDB/tests/data/gscl45nm.lef]
set chip [$def_parser createChip {$lib} ./OpenDB/tests/data/design.def]
set block [dbChip_getBlock $chip]
dbBlock_getParent $block

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.