From 40c50f62550deadc337194c2f5466a3368ab32ff Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 23 Sep 2026 11:39:36 +0200 Subject: [PATCH 1/2] bufnorm: let directed connections to IO pads be handled as directed --- kernel/rtlil_bufnorm.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/rtlil_bufnorm.cc b/kernel/rtlil_bufnorm.cc index aad4f5199..c43a3e9ca 100644 --- a/kernel/rtlil_bufnorm.cc +++ b/kernel/rtlil_bufnorm.cc @@ -402,10 +402,8 @@ void RTLIL::Module::bufNormalize() } } - // If a wire has one or more inout drivers and an unconditional driver, that's still a conflict for (auto driver : weakly_driven) - if (!driven.insert(driver).second) - conflicted.insert(driver); + driven.insert(driver); // This only leaves the drivers matching `driven`'s definition above for (auto driver : conflicted) From 692ca9c0b86afc04f7a3135dd7191083c4168b7d Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Wed, 23 Sep 2026 11:41:36 +0200 Subject: [PATCH 2/2] bufnorm: cover IO pad handling with tests --- tests/arch/ecp5/abc9_inout_pad_input.ys | 21 +++++++++++++++++++++ tests/techmap/abc_new_inout_pad.ys | 18 ++++++++++++++++++ tests/techmap/bufnorm_inout_input.ys | 19 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 tests/arch/ecp5/abc9_inout_pad_input.ys create mode 100644 tests/techmap/abc_new_inout_pad.ys create mode 100644 tests/techmap/bufnorm_inout_input.ys diff --git a/tests/arch/ecp5/abc9_inout_pad_input.ys b/tests/arch/ecp5/abc9_inout_pad_input.ys new file mode 100644 index 000000000..04fc54d14 --- /dev/null +++ b/tests/arch/ecp5/abc9_inout_pad_input.ys @@ -0,0 +1,21 @@ +read_verilog <