mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-03 01:40:23 +00:00
cutpoint: Re-add whole module optimization
Also add a test script for it.
This commit is contained in:
parent
aa30589c12
commit
7c89355b70
2 changed files with 64 additions and 0 deletions
|
@ -86,6 +86,20 @@ struct CutpointPass : public Pass {
|
|||
|
||||
for (auto module : design->all_selected_modules())
|
||||
{
|
||||
if (module->is_selected_whole()) {
|
||||
log("Making all outputs of module %s cut points, removing module contents.\n", log_id(module));
|
||||
module->new_connections(std::vector<RTLIL::SigSig>());
|
||||
for (auto cell : vector<Cell*>(module->cells()))
|
||||
module->remove(cell);
|
||||
vector<Wire*> output_wires;
|
||||
for (auto wire : module->wires())
|
||||
if (wire->port_output)
|
||||
output_wires.push_back(wire);
|
||||
for (auto wire : output_wires)
|
||||
module->connect(wire, flag_undef ? Const(State::Sx, GetSize(wire)) : module->Anyseq(NEW_ID, GetSize(wire)));
|
||||
continue;
|
||||
}
|
||||
|
||||
SigMap sigmap(module);
|
||||
pool<SigBit> cutpoint_bits;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue