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

patch: GC comment

This commit is contained in:
Emil J. Tywoniak 2025-12-31 17:59:24 +01:00
parent 89e5c4ccca
commit 770d74cc9b

View file

@ -4,6 +4,14 @@
YOSYS_NAMESPACE_BEGIN
/**
* Notes
*
* If we want GC, we need more indices
* namely user count (and users?). This should be optional
*
*
*/
using namespace RTLIL;
Cell* Patch::addCell(IdString name, IdString type) {
auto& cell = cells_.emplace_back(Cell::ConstructToken{});
@ -22,7 +30,9 @@ void Patch::patch() {
for (auto chunk : sig.chunks()) {
log_assert(chunk.is_wire());
auto* wire = chunk.wire;
// Unwire old driver
wire->driverCell_->setPort(wire->driverPort_, SigSpec());
// Maintain bufnorm
wire->driverCell_ = new_cell;
wire->driverPort_ = port_name;
}