palaniappan-r's picture
Add markdown sources
d59bb1b verified
# How to query odb database
Tool: OpenDB
Subcategory: Incomplete documentation
## Conversation
### titan73
I want to directly query odb database. How can I do that? There is no command for that.
I found some ord::xxx commands by searching the net but there is no proper documentation with all commands.
### titan73
also found odb::xxx. No documentation either.
Most functions required a self argument.
Tested "::odb::dbBlock_getPowerDomains [::odb::dbBlock]" to get power domains but it crashes.
### titan73
I got to something using orf and odb to get the created power domains:
foreach pd [::odb::dbBlock_getPowerDomains [::ord::get_db_block]] {
puts "[::odb::dbPowerDomain_getName $pd]"
}
I think I get the idea. A pity it's not documented.
### maliberty
We use swig on https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/odb/include/odb/db.h so the APIs and comments there should be a guide. If you have specific questions please ask.
### titan73
Ok thanks. It helps. Although not all methods have comments. dbPowerDomain for instance.
How does int& is supposed to be mapped in tcl? Ex: bool getArea(int& x1, int& y1, int& x2, int& y2);