aboutsummaryrefslogtreecommitdiffstats
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
parent6340bba68ba501b77c622498250827e4fd631c96 (diff)
downloadghdl-yosys-plugin-af9a5b4fde5e4f1f340ac125e7536f4e28bbc412.tar.gz
ghdl-yosys-plugin-af9a5b4fde5e4f1f340ac125e7536f4e28bbc412.tar.bz2
ghdl-yosys-plugin-af9a5b4fde5e4f1f340ac125e7536f4e28bbc412.zip
ghdl.cc: avoid duplicate blackboxes.
-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;
}
33' href='#n133'>133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213