From 770d74cc9b51d6b8ef0e3c4d3dee0a63ca83c02e Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 31 Dec 2025 17:59:24 +0100 Subject: [PATCH] patch: GC comment --- kernel/unstable/patch.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kernel/unstable/patch.cc b/kernel/unstable/patch.cc index 976a769fe..33bbb9777 100644 --- a/kernel/unstable/patch.cc +++ b/kernel/unstable/patch.cc @@ -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; }