projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9dd8133
)
Replace assert in addModule with more useful error message
author
Dan Ravensloft
<dan.ravensloft@gmail.com>
Fri, 5 Mar 2021 21:45:11 +0000
(21:45 +0000)
committer
Marcelina KoĆcielnicka
<mwk@0x04.net>
Fri, 5 Mar 2021 23:10:28 +0000
(
00:10
+0100)
kernel/rtlil.cc
patch
|
blob
|
history
diff --git
a/kernel/rtlil.cc
b/kernel/rtlil.cc
index 1faf376e7fd67fc1c3822c4afcdd5924b96dd3c8..40079ffc5f88f23a44febdf21767284da08ce618 100644
(file)
--- a/
kernel/rtlil.cc
+++ b/
kernel/rtlil.cc
@@
-613,7
+613,8
@@
void RTLIL::Design::add(RTLIL::Module *module)
RTLIL::Module *RTLIL::Design::addModule(RTLIL::IdString name)
{
- log_assert(modules_.count(name) == 0);
+ if (modules_.count(name) != 0)
+ log_error("Attempted to add new module named '%s', but a module by that name already exists\n", name.c_str());
log_assert(refcount_modules_ == 0);
RTLIL::Module *module = new RTLIL::Module;