aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/yosys.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-04-22 14:47:52 +0200
committerGitHub <noreply@github.com>2019-04-22 14:47:52 +0200
commit99d5435650c38fb96dc364c0fd4ac6250a4871ea (patch)
treecc638feaa89ef0be5acbc0f157dfc6764812fc11 /kernel/yosys.h
parent0e7901e45cc54a9bf76a86dd58092f310f72c90a (diff)
parente19981ab6111765baa5b2ab7a16c92278130fd8b (diff)
downloadyosys-99d5435650c38fb96dc364c0fd4ac6250a4871ea.tar.gz
yosys-99d5435650c38fb96dc364c0fd4ac6250a4871ea.tar.bz2
yosys-99d5435650c38fb96dc364c0fd4ac6250a4871ea.zip
Merge pull request #905 from christian-krieg/feature/python_bindings
Feature/python bindings
Diffstat (limited to 'kernel/yosys.h')
-rw-r--r--kernel/yosys.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h
index c9f973318..2cf6188b4 100644
--- a/kernel/yosys.h
+++ b/kernel/yosys.h
@@ -66,6 +66,10 @@
#include <stdio.h>
#include <limits.h>
+#ifdef WITH_PYTHON
+#include <Python.h>
+#endif
+
#ifndef _YOSYS_
# error It looks like you are trying to build Yosys without the config defines set. \
When building Yosys with a custom make system, make sure you set all the \
@@ -115,6 +119,7 @@ extern const char *Tcl_GetStringResult(Tcl_Interp *interp);
# define PATH_MAX 4096
#endif
+#define YOSYS_NAMESPACE Yosys
#define PRIVATE_NAMESPACE_BEGIN namespace {
#define PRIVATE_NAMESPACE_END }
#define YOSYS_NAMESPACE_BEGIN namespace Yosys {
@@ -276,6 +281,11 @@ namespace hashlib {
}
void yosys_setup();
+
+#ifdef WITH_PYTHON
+bool yosys_already_setup();
+#endif
+
void yosys_shutdown();
#ifdef YOSYS_ENABLE_TCL
@@ -317,6 +327,9 @@ extern std::vector<RTLIL::Design*> pushed_designs;
// from passes/cmds/pluginc.cc
extern std::map<std::string, void*> loaded_plugins;
+#ifdef WITH_PYTHON
+extern std::map<std::string, void*> loaded_python_plugins;
+#endif
extern std::map<std::string, std::string> loaded_plugin_aliases;
void load_plugin(std::string filename, std::vector<std::string> aliases);