3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-21 22:55: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

@ -71,11 +71,10 @@ void create_ice40_wrapcarry(ice40_wrapcarry_pm &pm)
// Propagate one of the cell-level srcs to the wrapper too so backends
// emitting `attribute \src` see a usable value on the wrapper.
if (cell->module && cell->module->design) {
TwinePool *pool = &cell->module->design->src_twines;
if (st.carry->src_id() != Twine::Null)
cell->set_src_id(pool, st.carry->src_id());
cell->set_src_id(st.carry->src_id());
else if (st.lut->src_id() != Twine::Null)
cell->set_src_id(pool, st.lut->src_id());
cell->set_src_id(st.lut->src_id());
}
cell->attributes[IdString{"\\SB_LUT4.name"}] = Const(st.lut->name.str());
if (st.carry->get_bool_attribute(ID::keep) || st.lut->get_bool_attribute(ID::keep))