Fix for svinterfaces

This commit is contained in:
Eddie Hung 2019-09-30 14:52:04 -07:00
parent 08b55a20e3
commit 0a1af434e8
1 changed files with 8 additions and 2 deletions

View File

@ -1398,11 +1398,17 @@ RTLIL::IdString AstModule::derive(RTLIL::Design *design, dict<RTLIL::IdString, R
has_interfaces = true;
}
std::string new_modname = modname;
if (has_interfaces)
modname += "$interfaces$" + interf_info;
new_modname += "$interfaces$" + interf_info;
if (!design->has(modname)) {
if (!design->has(new_modname)) {
if (!new_ast) {
auto mod = dynamic_cast<AstModule*>(design->module(modname));
new_ast = mod->ast->clone();
}
modname = new_modname;
new_ast->str = modname;
// Iterate over all interfaces which are ports in this module: