From 5debd619e5634a3e29eb53de21948fd7dcaee485 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Fri, 13 Feb 2026 06:51:42 -0800 Subject: [PATCH] Add workaround for Liberty duplication --- kernel/rtlil.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index d27eabc25..baf938660 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -1346,8 +1346,10 @@ void RTLIL::Design::add(RTLIL::Binding *binding) RTLIL::Module *RTLIL::Design::addModule(RTLIL::IdString name) { - if (modules_.count(name) != 0) - log_error("Attempted to add new module named '%s', but a module by that name already exists\n", name); + if (modules_.count(name) != 0) { + log_warning("Attempted to add new module named '%s', but a module by that name already exists\n", name); + return modules_.at(name); + } log_assert(refcount_modules_ == 0); RTLIL::Module *module = new RTLIL::Module;