Replies: 2 comments 1 reply
-
|
I'm curious why you are using python when all your calls are to evalTclString. I suggest you look at the python unit tests in ifp/test for examples of using python directly. |
Beta Was this translation helpful? Give feedback.
-
|
thanks a lot ,i think i find the reason .i add the code Without this line, SWIG does not generate proper wrappers for the InitFloorplan class, and calling getFloorplan() from Design returns a SwigPyObject instead of a usable object, causing runtime errors such as: Adding the %include resolved the issue and allowed me to call findSite, makeTracks, and other methods normally. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
my py code is as below:
`if name == 'main':
tt = time.time()
with open(sys.argv[1]) as f:
config = json.load(f)
print(json.dumps(config))
it can run util i use initial_floorplan tcl command. the info below:
hgp@DESKTOP-5URS5B9:~/DREAMPlace/Fianl$ python3 /home/hgp/DREAMPlace/Fianl/op.py bp_fe/config.json {"case": "bp_fe", "lef": ["bp_fe/1Nangate.lef", "bp_fe/lef/fakeram45_64x7.lef", "bp_fe/lef/fakeram45_64x96.lef", "bp_fe/lef/fakeram45_512x64.lef"], "def_in": "bp_fe/bp_fe.def", "netlist": "bp_fe/1_synth.v", "lib": ["bp_fe/1NangateOpenCellLibrary_typical.lib", "bp_fe/lib/fakeram45_64x7.lib", "bp_fe/lib/fakeram45_64x96.lib", "bp_fe/lib/fakeram45_512x64.lib"], "sdc": "bp_fe/constraint.sdc", "def_out": "bp_fe/test.def"} [INFO ODB-0227] LEF file: bp_fe/1Nangate.lef, created 22 layers, 27 vias, 157 library cells [INFO ODB-0227] LEF file: bp_fe/lef/fakeram45_64x7.lef, created 1 library cells [INFO ODB-0227] LEF file: bp_fe/lef/fakeram45_64x96.lef, created 1 library cells [INFO ODB-0227] LEF file: bp_fe/lef/fakeram45_512x64.lef, created 1 library cells [INFO ORD-0030] Using 1 thread(s). block Exists <Swig Object of type 'odb::dbBlock *' at 0x7dfe46b6d810> Segmentation fault (core dumped)then i use gdb to see what happended, it seems error occurs at ord::Design::getBlock()
#0 0x00007ffff36c4068 in ord::Design::getBlock() () from /home/hgp/DREAMPlace/Fianl/_ord_py.so #1 0x00007ffff36c4d8d in ord::Design::getFloorplan() () from /home/hgp/DREAMPlace/Fianl/_ord_py.so #2 0x00007ffff36dbe66 in ifp::make_die_util(ord::Design*, double, double, int, int, int, int) () from /home/hgp/DREAMPlace/Fianl/_ord_py.so #3 0x00007ffff36dd064 in _wrap_make_die_util () from /home/hgp/DREAMPlace/Fianl/_ord_py.so #4 0x00007ffff207f5f2 in TclNRRunCallbacks () from /lib/x86_64-linux-gnu/libtcl8.6.so #5 0x00007ffff2080924 in ?? () from /lib/x86_64-linux-gnu/libtcl8.6.so #6 0x00007ffff2080367 in Tcl_EvalEx () from /lib/x86_64-linux-gnu/libtcl8.6.so #7 0x00007ffff20814fa in Tcl_Eval () from /lib/x86_64-linux-gnu/libtcl8.6.so #8 0x00007ffff36c42bc in ord::Design::evalTclString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /home/hgp/DREAMPlace/Fianl/_ord_py.so #9 0x00007ffff36a7b3a in _wrap_Design_evalTclString () from /home/hgp/DREAMPlace/Fianl/_ord_py.so #10 0x00000000005f596a in PyCFunction_Call () #11 0x00000000005f6496 in _PyObject_MakeTpCall () #12 0x0000000000570807 in _PyEval_EvalFrameDefault ()so i wonder the flow i use the openroad python module is alright? is there a guide to show how to use the python module?
Beta Was this translation helpful? Give feedback.
All reactions