mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-16 16:27:12 +00:00
memory_libmap: Move MapWorker into loop
This commit is contained in:
parent
3410e10ed5
commit
3644201acb
1 changed files with 1 additions and 3 deletions
|
@ -2232,10 +2232,10 @@ struct MemoryLibMapPass : public Pass {
|
||||||
if (module->has_processes_warn())
|
if (module->has_processes_warn())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
MapWorker worker(module);
|
|
||||||
auto mems = Mem::get_selected_memories(module);
|
auto mems = Mem::get_selected_memories(module);
|
||||||
for (auto &mem : mems)
|
for (auto &mem : mems)
|
||||||
{
|
{
|
||||||
|
MapWorker worker(module);
|
||||||
MemMapping map(worker, mem, lib, opts);
|
MemMapping map(worker, mem, lib, opts);
|
||||||
int idx = -1;
|
int idx = -1;
|
||||||
int best = map.logic_cost;
|
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));
|
log("using FF mapping for memory %s.%s\n", log_id(module->name), log_id(mem.memid));
|
||||||
} else {
|
} else {
|
||||||
map.emit(map.cfgs[idx]);
|
map.emit(map.cfgs[idx]);
|
||||||
// Rebuild indices after modifying module
|
|
||||||
worker = MapWorker(module);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue