From a47f69536a1ac93657d334f57dac2a800ab34f3f Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 30 Mar 2016 10:02:03 +0200 Subject: [PATCH 1/3] Added support for installed plugins --- passes/cmds/plugin.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/passes/cmds/plugin.cc b/passes/cmds/plugin.cc index e2d80d9b..828c671d 100644 --- a/passes/cmds/plugin.cc +++ b/passes/cmds/plugin.cc @@ -31,19 +31,23 @@ std::map loaded_plugin_aliases; #ifdef YOSYS_ENABLE_PLUGINS void load_plugin(std::string filename, std::vector aliases) { + std::string orig_filename = filename; + if (filename.find('/') == std::string::npos) filename = "./" + filename; if (!loaded_plugins.count(filename)) { void *hdl = dlopen(filename.c_str(), RTLD_LAZY|RTLD_LOCAL); + if (hdl == NULL && orig_filename.find('/') == std::string::npos) + hdl = dlopen((proc_share_dirname() + "plugins/" + orig_filename + ".so").c_str(), RTLD_LAZY|RTLD_LOCAL); if (hdl == NULL) log_cmd_error("Can't load module `%s': %s\n", filename.c_str(), dlerror()); - loaded_plugins[filename] = hdl; + loaded_plugins[orig_filename] = hdl; Pass::init_register(); } for (auto &alias : aliases) - loaded_plugin_aliases[alias] = filename; + loaded_plugin_aliases[alias] = orig_filename; } #else void load_plugin(std::string, std::vector) From 48dbc75beddd6db92f09125b49761859be33693d Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 30 Mar 2016 13:24:49 +0200 Subject: [PATCH 2/3] Added .vhd file extension support --- kernel/yosys.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/yosys.cc b/kernel/yosys.cc index a69a8544..b9a26ee8 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -763,6 +763,8 @@ void run_frontend(std::string filename, std::string command, std::string *backen command = "verilog"; else if (filename.size() > 2 && filename.substr(filename.size()-3) == ".sv") command = "verilog -sv"; + else if (filename.size() > 2 && filename.substr(filename.size()-4) == ".vhd") + command = "vhdl"; else if (filename.size() > 4 && filename.substr(filename.size()-5) == ".blif") command = "blif"; else if (filename.size() > 3 && filename.substr(filename.size()-3) == ".il") From 0db53284fd610cac1e956a87c7eec7df3d8564c5 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 30 Mar 2016 13:52:26 +0200 Subject: [PATCH 3/3] We have 2016 for a while now --- README | 2 +- kernel/yosys.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 5c649a4e..f0dcd3c0 100644 --- a/README +++ b/README @@ -3,7 +3,7 @@ | | | yosys -- Yosys Open SYnthesis Suite | | | - | Copyright (C) 2012 - 2015 Clifford Wolf | + | Copyright (C) 2012 - 2016 Clifford Wolf | | | | Permission to use, copy, modify, and/or distribute this software for any | | purpose with or without fee is hereby granted, provided that the above | diff --git a/kernel/yosys.cc b/kernel/yosys.cc index b9a26ee8..501d9422 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -104,7 +104,7 @@ void yosys_banner() log(" | |\n"); log(" | yosys -- Yosys Open SYnthesis Suite |\n"); log(" | |\n"); - log(" | Copyright (C) 2012 - 2015 Clifford Wolf |\n"); + log(" | Copyright (C) 2012 - 2016 Clifford Wolf |\n"); log(" | |\n"); log(" | Permission to use, copy, modify, and/or distribute this software for any |\n"); log(" | purpose with or without fee is hereby granted, provided that the above |\n");