Skip to content

Commit 129eb14

Browse files
authored
Merge pull request #9176 from fgaray/fix_init_floorplan_python
Set current design as associated data for Tcl commands
2 parents 32c0578 + 5da94d6 commit 129eb14

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Design.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "ord/OpenRoad.hh"
2121
#include "ord/Tech.h"
2222
#include "tcl.h"
23+
#include "tclDecls.h"
2324
#include "utl/Logger.h"
2425

2526
namespace ord {
@@ -136,6 +137,7 @@ std::string Design::evalTclString(const std::string& cmd)
136137
ord::OpenRoad::setOpenRoad(openroad, /* reinit_ok */ true);
137138
Tcl_Interp* tcl_interp = openroad->tclInterp();
138139
sta::Sta::setSta(openroad->getSta());
140+
Tcl_SetAssocData(tcl_interp, "design", nullptr, this);
139141
Tcl_Eval(tcl_interp, cmd.c_str());
140142
return std::string(Tcl_GetStringResult(tcl_interp));
141143
}

0 commit comments

Comments
 (0)