mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-23 07:32:32 +00:00
rtlil: fix masquerade
This commit is contained in:
parent
2d3b7e9c92
commit
1a8a95b472
11 changed files with 77 additions and 39 deletions
|
|
@ -268,11 +268,8 @@ struct DesignPass : public Pass {
|
|||
{
|
||||
log("Importing %s as %s.\n", mod, RTLIL::unescape_id(prefix));
|
||||
|
||||
RTLIL::Module *t = mod->clone();
|
||||
t->name = prefix;
|
||||
t->design = copy_to_design;
|
||||
RTLIL::Module *t = mod->clone(copy_to_design, RTLIL::IdString(prefix));
|
||||
t->attributes.erase(ID::top);
|
||||
copy_to_design->add(t);
|
||||
|
||||
queue.insert(t);
|
||||
done[mod->name] = prefix;
|
||||
|
|
@ -300,11 +297,8 @@ struct DesignPass : public Pass {
|
|||
if (copy_to_design->module(trg_name) != nullptr)
|
||||
copy_to_design->remove(copy_to_design->module(trg_name));
|
||||
|
||||
RTLIL::Module *t = fmod->clone();
|
||||
t->name = trg_name;
|
||||
t->design = copy_to_design;
|
||||
RTLIL::Module *t = fmod->clone(copy_to_design, RTLIL::IdString(trg_name));
|
||||
t->attributes.erase(ID::top);
|
||||
copy_to_design->add(t);
|
||||
|
||||
queue.insert(t);
|
||||
done[cell->type] = trg_name;
|
||||
|
|
@ -327,10 +321,7 @@ struct DesignPass : public Pass {
|
|||
if (copy_to_design->module(trg_name) != nullptr)
|
||||
copy_to_design->remove(copy_to_design->module(trg_name));
|
||||
|
||||
RTLIL::Module *t = mod->clone();
|
||||
t->name = trg_name;
|
||||
t->design = copy_to_design;
|
||||
copy_to_design->add(t);
|
||||
mod->clone(copy_to_design, RTLIL::IdString(trg_name));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue