Skip to content

Commit

Permalink
Merge pull request #2081 from YosysHQ/eddie/blackbox_ast
Browse files Browse the repository at this point in the history
blackbox: use Module::makeblackbox() method
  • Loading branch information
eddiehung authored May 30, 2020
2 parents ea46ed8 + 721283a commit fe273fa
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions passes/cmds/blackbox.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,7 @@ struct BlackboxPass : public Pass {

for (auto module : design->selected_whole_modules_warn())
{
pool<Cell*> remove_cells;
pool<Wire*> remove_wires;

for (auto cell : module->cells())
remove_cells.insert(cell);

for (auto wire : module->wires())
if (wire->port_id == 0)
remove_wires.insert(wire);

for (auto it = module->memories.begin(); it != module->memories.end(); ++it)
delete it->second;
module->memories.clear();

for (auto it = module->processes.begin(); it != module->processes.end(); ++it)
delete it->second;
module->processes.clear();

module->new_connections(std::vector<RTLIL::SigSig>());

for (auto cell : remove_cells)
module->remove(cell);

module->remove(remove_wires);

module->makeblackbox();
module->set_bool_attribute(ID::blackbox);
}
}
Expand Down

0 comments on commit fe273fa

Please sign in to comment.