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

rtlil: evacuate src_id_ from AttrObject to per-Design meta vector

This commit is contained in:
Emil J. Tywoniak 2026-06-05 14:15:51 +02:00
parent e70eed3296
commit f1edb571f2
22 changed files with 668 additions and 390 deletions

View file

@ -770,13 +770,13 @@ Cell *FfData::emit() {
if (!src_twine.empty() && cell->module && cell->module->design) {
TwinePool *dst_pool = &cell->module->design->src_twines;
if (src_twine.pool() == dst_pool) {
cell->set_src_id(dst_pool, src_twine.id());
cell->set_src_id(src_twine.id());
} else {
// Cross-pool (unusual — FfData migrated between
// designs). Rebuild the twine structure into the
// destination pool, then adopt that fresh id.
Twine::Id migrated = dst_pool->copy_from(*src_twine.pool(), src_twine.id());
cell->set_src_id(dst_pool, migrated);
cell->set_src_id(migrated);
dst_pool->release(migrated);
}
}