rsz: Preserve port-backed ModNet names during buffer removal - #11258
rsz: Preserve port-backed ModNet names during buffer removal#11258jhkim-pii wants to merge 3 commits into
Conversation
Add a hierarchy-faithful reproducer that inserts a buffer across sibling modules through the production rebuffer API. Verify targeted removal preserves the input-port ModNet name and emitted Verilog connectivity. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Detect top-level and hierarchical input, output, and inout ports symmetrically when removing feedthrough buffers. Keep input/inout survivor ModNet names and adopt a shallower flat name only when it remains represented, preventing write_verilog from emitting undriven loads. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
Add reusable input/output port connectivity queries that cover top-level BTerms and hierarchical ModBTerms, including inout/feedthrough directions. Use the OpenDB API in Resizer buffer-removal logic to remove duplicated topology checks without changing behavior. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
There was a problem hiding this comment.
Code Review
This pull request introduces isConnectedToInputPort() and isConnectedToOutputPort() helper methods to dbModNet to check for connections to input/output ports. These methods are utilized in the Resizer to correctly preserve input/inout port names during buffer removal, ensuring that write_verilog retains the necessary feedthrough assigns. A new unit test has also been added to verify this behavior. I have no feedback to provide.
|
🥳 |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
write_verilogfrom emitting kept-module boundary loads without a driver.Problem
BufRemTest3.HierInputPortNamePreservedAfterBufferRemovalreproduces the failure through the same insert/remove ECO APIs used by timing repair. The snippets below show the relevant Verilog at each operation.Initial netlist
u_bufis inserted by Rebuffer.netdrivesu_buf, andload_netis driven by the buffer output.u_bufis removed by remove_buffer. In the output verilog, the undriven netload_netremains.seedinstead ofload_net.Cause
u_bufis removed, one of two nets (input netnetand output netload_net) should survive.netis selected as the surviving net, but its corresponding ModNet name is renamed toload_net, which is wrong.removeBuffer()selectssource/driver/outand its input-port ModNetnetas the survivors, whilesink/load_netand its ModNetload_netare removed.sink/load_netto the flat net andload_netto the ModNet.Sink.netModBTerm remains connected but its surviving ModNet is renamed fromnettoload_net.write_verilogthen declares inputnet, connects the loads toload_net, and emits no input-to-net assign, producing the undriven loads.Solution
dbModNet::isConnectedToInputPort()andisConnectedToOutputPort()to detect top-level BTerms and hierarchical ModBTerms, including inout/feedthrough directions.Resizer::removeBuffer(), detect when the deeper surviving ModNet is connected to an input-capable port before applying the depth-based rename.netand continues to representSink.netcorrectly.sink/load_netin the regression, neither survivor adopts that name.Related