mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-31 00:13:18 +00:00
Added module->design and cell->module, wire->module pointers
This commit is contained in:
parent
1cb25c05b3
commit
e6d33513a5
15 changed files with 142 additions and 44 deletions
|
@ -482,7 +482,7 @@ static void import_netlist(RTLIL::Design *design, Netlist *nl, std::set<Netlist*
|
|||
{
|
||||
std::string module_name = nl->IsOperator() ? std::string("$verific$") + nl->Owner()->Name() : RTLIL::escape_id(nl->Owner()->Name());
|
||||
|
||||
if (design->modules_.count(module_name)) {
|
||||
if (design->has(module_name)) {
|
||||
if (!nl->IsOperator())
|
||||
log_cmd_error("Re-definition of module `%s'.\n", nl->Owner()->Name());
|
||||
return;
|
||||
|
@ -490,7 +490,7 @@ static void import_netlist(RTLIL::Design *design, Netlist *nl, std::set<Netlist*
|
|||
|
||||
RTLIL::Module *module = new RTLIL::Module;
|
||||
module->name = module_name;
|
||||
design->modules_[module->name] = module;
|
||||
design->add(module);
|
||||
|
||||
log("Importing module %s.\n", RTLIL::id2cstr(module->name));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue