aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-09 12:53:04 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-09 12:53:04 +0200
commitaf9a5b4fde5e4f1f340ac125e7536f4e28bbc412 (patch)
tree8d5c9d4efccf3f740a37abbe07f5c778119f1cee /src
parent6340bba68ba501b77c622498250827e4fd631c96 (diff)
downloadghdl-yosys-plugin-af9a5b4fde5e4f1f340ac125e7536f4e28bbc412.tar.gz
ghdl-yosys-plugin-af9a5b4fde5e4f1f340ac125e7536f4e28bbc412.tar.bz2
ghdl-yosys-plugin-af9a5b4fde5e4f1f340ac125e7536f4e28bbc412.zip
ghdl.cc: avoid duplicate blackboxes.
Diffstat (limited to 'src')
-rw-r--r--src/ghdl.cc5
1 files changed, 4 insertions, 1 deletions
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;
}