3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-18 14:49:02 +00:00

memory_libmap: Move MapWorker into loop

This commit is contained in:
Krystine Sherwin 2025-04-11 11:09:35 +12:00
parent 3410e10ed5
commit 3644201acb
No known key found for this signature in database

View file

@ -2232,10 +2232,10 @@ struct MemoryLibMapPass : public Pass {
if (module->has_processes_warn())
continue;
MapWorker worker(module);
auto mems = Mem::get_selected_memories(module);
for (auto &mem : mems)
{
MapWorker worker(module);
MemMapping map(worker, mem, lib, opts);
int idx = -1;
int best = map.logic_cost;
@ -2258,8 +2258,6 @@ struct MemoryLibMapPass : public Pass {
log("using FF mapping for memory %s.%s\n", log_id(module->name), log_id(mem.memid));
} else {
map.emit(map.cfgs[idx]);
// Rebuild indices after modifying module
worker = MapWorker(module);
}
}
}