3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-05-25 11:26:22 +00:00

patch: unique heap

This commit is contained in:
Emil J. Tywoniak 2026-05-14 17:43:46 +02:00
parent dbc7e33908
commit b7ea32dbee
3 changed files with 15 additions and 12 deletions

View file

@ -13,13 +13,13 @@ struct TestPatchPass : public Pass {
void execute(std::vector<std::string> args, RTLIL::Design *design) override
{
(void) args;
RTLIL::Patch patcher;
design->bufNormalize();
for (auto module : design->selected_modules()) {
patcher.mod = module;
patcher.map = SigMap(module);
for (auto cell : module->selected_cells()) {
if (cell->type == ID($add)) {
RTLIL::Patch patcher;
patcher.mod = module;
patcher.map = SigMap(module);
RTLIL::Cell* sub = patcher.addCell(NEW_ID, ID($sub));
sub->connections_ = cell->connections();
sub->parameters = cell->parameters;