3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-03-11 07:40:32 +00:00

Fixed issue when using a python plugin in the yosys shell

This commit is contained in:
Benedikt Tutzer 2018-08-20 14:44:03 +02:00
parent d79a2808cf
commit 5864db3c2b
3 changed files with 28 additions and 4 deletions

View file

@ -2783,10 +2783,13 @@ namespace YOSYS_PYTHON {
struct Initializer
{
Initializer() {
Yosys::log_streams.push_back(&std::cout);
Yosys::log_error_stderr = true;
Yosys::yosys_setup();
Yosys::yosys_banner();
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 &) {}