Add a dummy uhdm plugin It shows a deprecation warning and automatically loads the systemverilog plugin. Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
diff --git a/Makefile b/Makefile index 5f3503f..91b0ba9 100644 --- a/Makefile +++ b/Makefile
@@ -6,7 +6,7 @@ # # SPDX-License-Identifier:ISC -PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog dsp-ff +PLUGIN_LIST := fasm xdc params sdc ql-iob design_introspection integrateinv ql-qlf systemverilog uhdm dsp-ff PLUGINS := $(foreach plugin,$(PLUGIN_LIST),$(plugin).so) PLUGINS_INSTALL := $(foreach plugin,$(PLUGIN_LIST),install_$(plugin)) PLUGINS_CLEAN := $(foreach plugin,$(PLUGIN_LIST),clean_$(plugin))
diff --git a/uhdm-plugin/Makefile b/uhdm-plugin/Makefile new file mode 100644 index 0000000..8018d76 --- /dev/null +++ b/uhdm-plugin/Makefile
@@ -0,0 +1,11 @@ +# Copyright (C) 2022 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +NAME = uhdm +SOURCES = uhdm.cc +include ../Makefile_plugin.common
diff --git a/uhdm-plugin/tests/Makefile b/uhdm-plugin/tests/Makefile new file mode 100644 index 0000000..66d5a63 --- /dev/null +++ b/uhdm-plugin/tests/Makefile
@@ -0,0 +1,9 @@ +# Copyright (C) 2020-2021 The SymbiFlow Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier:ISC + +include $(shell pwd)/../../Makefile_test.common
diff --git a/uhdm-plugin/uhdm.cc b/uhdm-plugin/uhdm.cc new file mode 100644 index 0000000..2babb21 --- /dev/null +++ b/uhdm-plugin/uhdm.cc
@@ -0,0 +1,38 @@ +/* + * yosys -- Yosys Open SYnthesis Suite + * + * Copyright (C) 2022 Antmicro + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include "kernel/log.h" + +USING_YOSYS_NAMESPACE + +PRIVATE_NAMESPACE_BEGIN + +struct UhdmDummy { + UhdmDummy() + { + log("\n"); + log("!! DEPRECATION WARNING !!\n"); + log("\n"); + log("The uhdm plugin has been renamed to systemverilog.\n"); + log("Loading the systemverilog plugin...\n"); + + std::vector<std::string> plugin_aliases; + load_plugin("systemverilog", plugin_aliases); + } +} UhdmDummy; + +PRIVATE_NAMESPACE_END