From af9a5b4fde5e4f1f340ac125e7536f4e28bbc412 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 9 Apr 2020 12:53:04 +0200 Subject: ghdl.cc: avoid duplicate blackboxes. --- src/ghdl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ghdl.cc b/src/ghdl.cc index d8b42af..a5d8ca0 100644 --- a/src/ghdl.cc +++ b/src/ghdl.cc @@ -493,7 +493,10 @@ static void import_module(RTLIL::Design *design, GhdlSynth::Module m) std::string module_name = to_str(get_module_name(m)); if (design->has(module_name)) { - log_cmd_error("Re-definition of module `%s'.\n", module_name.c_str()); + if (is_valid(self_inst)) { + // Error message only for non-black-boxes. + log_cmd_error("Re-definition of module `%s'.\n", module_name.c_str()); + } return; } -- cgit v1.2.3