struct Initializer
{
Initializer() {
- if(!Yosys::yosys_already_setup())
- {
+ if(!Yosys::yosys_already_setup())
+ {
Yosys::log_streams.push_back(&std::cout);
Yosys::log_error_stderr = true;
Yosys::yosys_setup();
Yosys::yosys_banner();
- }
+ }
}
Initializer(Initializer const &) {}
return new_proc;
}
+
+#ifdef WITH_PYTHON
RTLIL::Memory::~Memory()
{
-#ifdef WITH_PYTHON
RTLIL::Memory::get_all_memorys()->erase(hashidx_);
-#endif
}
-
-#ifdef WITH_PYTHON
static std::map<unsigned int, RTLIL::Memory*> *all_memorys = new std::map<unsigned int, RTLIL::Memory*>();
std::map<unsigned int, RTLIL::Memory*> *RTLIL::Memory::get_all_memorys(void)
{
unsigned int hash() const { return hashidx_; }
Memory();
+ ~Memory();
RTLIL::IdString name;
int width, start_offset, size;
#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. \
if (filename.find('/') == std::string::npos)
filename = "./" + filename;
+ #ifdef WITH_PYTHON
if (!loaded_plugins.count(filename) && !loaded_python_plugins.count(filename)) {
+ #else
+ if (!loaded_plugins.count(filename)) {
+ #endif
#ifdef WITH_PYTHON
if(boost::algorithm::ends_with(filename, ".py"))