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

rtlil, patch: update signorm index and driver fields when committing Cell from Patch to Design

This commit is contained in:
Emil J. Tywoniak 2026-05-23 01:09:26 +02:00
parent b0eb50be1b
commit 5a6568edbe
3 changed files with 164 additions and 110 deletions

View file

@ -2146,6 +2146,15 @@ private:
struct ConstructToken { explicit ConstructToken() = default; };
friend struct RTLIL::Module;
friend struct RTLIL::Patch;
// Push existing port connections into signorm/bufnorm indices after module assignment.
// Assumes signals are already in normalized form.
void initIndex();
// Signorm index helpers (used by setPort/unsetPort/initIndex)
void signorm_index_remove(RTLIL::IdString portname, const RTLIL::SigSpec &old_signal, bool is_input);
void signorm_index_add(RTLIL::IdString portname, const RTLIL::SigSpec &new_signal, bool is_input);
bool bufnorm_handle_setPort(RTLIL::IdString portname, RTLIL::SigSpec &signal, dict<RTLIL::IdString, RTLIL::SigSpec>::iterator conn_it);
public:
Hasher::hash_t hashidx_;
[[nodiscard]] Hasher hash_into(Hasher h) const { h.eat(hashidx_); return h; }