mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-11 02:08:08 +00:00
Merge 0aa2a4c260
into 89f32a415b
This commit is contained in:
commit
ea84ab0bf3
14 changed files with 950 additions and 5 deletions
|
@ -188,7 +188,7 @@ extern char yosys_path[PATH_MAX];
|
|||
#endif
|
||||
#ifdef YOSYS_ENABLE_TCL
|
||||
namespace Yosys {
|
||||
extern int yosys_tcl_iterp_init(Tcl_Interp *interp);
|
||||
extern int yosys_tcl_interp_init(Tcl_Interp *interp);
|
||||
extern void yosys_tcl_activate_repl();
|
||||
};
|
||||
#endif
|
||||
|
@ -610,7 +610,7 @@ int main(int argc, char **argv)
|
|||
if (run_tcl_shell) {
|
||||
#ifdef YOSYS_ENABLE_TCL
|
||||
yosys_tcl_activate_repl();
|
||||
Tcl_Main(argc, argv, yosys_tcl_iterp_init);
|
||||
Tcl_Main(argc, argv, yosys_tcl_interp_init);
|
||||
#else
|
||||
log_error("Can't exectue TCL shell: this version of yosys is not built with TCL support enabled.\n");
|
||||
#endif
|
||||
|
|
|
@ -533,7 +533,7 @@ static int tcl_set_param(ClientData, Tcl_Interp *interp, int objc, Tcl_Obj *cons
|
|||
return TCL_OK;
|
||||
}
|
||||
|
||||
int yosys_tcl_iterp_init(Tcl_Interp *interp)
|
||||
int yosys_tcl_interp_init(Tcl_Interp *interp)
|
||||
{
|
||||
if (Tcl_Init(interp)!=TCL_OK)
|
||||
log_warning("Tcl_Init() call failed - %s\n",Tcl_ErrnoMsg(Tcl_GetErrno()));
|
||||
|
|
|
@ -95,6 +95,7 @@ CellTypes yosys_celltypes;
|
|||
|
||||
#ifdef YOSYS_ENABLE_TCL
|
||||
Tcl_Interp *yosys_tcl_interp = NULL;
|
||||
Tcl_Interp *yosys_sdc_interp = NULL;
|
||||
#endif
|
||||
|
||||
std::set<std::string> yosys_input_files, yosys_output_files;
|
||||
|
@ -392,17 +393,18 @@ void rewrite_filename(std::string &filename)
|
|||
#ifdef YOSYS_ENABLE_TCL
|
||||
|
||||
// defined in tclapi.cc
|
||||
extern int yosys_tcl_iterp_init(Tcl_Interp *interp);
|
||||
extern int yosys_tcl_interp_init(Tcl_Interp *interp);
|
||||
|
||||
extern Tcl_Interp *yosys_get_tcl_interp()
|
||||
{
|
||||
if (yosys_tcl_interp == NULL) {
|
||||
yosys_tcl_interp = Tcl_CreateInterp();
|
||||
yosys_tcl_iterp_init(yosys_tcl_interp);
|
||||
yosys_tcl_interp_init(yosys_tcl_interp);
|
||||
}
|
||||
return yosys_tcl_interp;
|
||||
}
|
||||
|
||||
// Also see SdcPass
|
||||
struct TclPass : public Pass {
|
||||
TclPass() : Pass("tcl", "execute a TCL script file") { }
|
||||
void help() override {
|
||||
|
@ -445,6 +447,7 @@ struct TclPass : public Pass {
|
|||
Tcl_Release(interp);
|
||||
}
|
||||
} TclPass;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(__CYGWIN__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue