diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-31 14:11:39 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-31 14:11:39 +0200 |
commit | e6d33513a5b809facc6e3e5e75d2248bfa94f82b (patch) | |
tree | bcee5a22fc9ac7dca5b871ce667114e5f15d07d0 /passes/cmds/design.cc | |
parent | 1cb25c05b37b0172dbc50e140fe20f25d973dd8a (diff) | |
download | yosys-e6d33513a5b809facc6e3e5e75d2248bfa94f82b.tar.gz yosys-e6d33513a5b809facc6e3e5e75d2248bfa94f82b.tar.bz2 yosys-e6d33513a5b809facc6e3e5e75d2248bfa94f82b.zip |
Added module->design and cell->module, wire->module pointers
Diffstat (limited to 'passes/cmds/design.cc')
-rw-r--r-- | passes/cmds/design.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/passes/cmds/design.cc b/passes/cmds/design.cc index 79695c635..41548f621 100644 --- a/passes/cmds/design.cc +++ b/passes/cmds/design.cc @@ -198,6 +198,7 @@ struct DesignPass : public Pass { delete copy_to_design->modules_.at(trg_name); copy_to_design->modules_[trg_name] = mod->clone(); copy_to_design->modules_[trg_name]->name = trg_name; + copy_to_design->modules_[trg_name]->design = copy_to_design; } } @@ -206,7 +207,7 @@ struct DesignPass : public Pass { RTLIL::Design *design_copy = new RTLIL::Design; for (auto &it : design->modules_) - design_copy->modules_[it.first] = it.second->clone(); + design_copy->add(it.second->clone()); design_copy->selection_stack = design->selection_stack; design_copy->selection_vars = design->selection_vars; @@ -242,7 +243,7 @@ struct DesignPass : public Pass { pushed_designs.pop_back(); for (auto &it : saved_design->modules_) - design->modules_[it.first] = it.second->clone(); + design->add(it.second->clone()); design->selection_stack = saved_design->selection_stack; design->selection_vars = saved_design->selection_vars; |