Repository navigation
Conversation
macro_place_util.tcl turned RTLMP_PIN_AWARE_CHANNELS off by writing 0 into the environment when RTLMP_MIN_CHANNEL_SIZE was empty, then passed -pin_aware_channels from the variable it had just rewritten. Decide it where the option is added instead: -pin_aware_channels is passed when RTLMP_MIN_CHANNEL_SIZE is set and RTLMP_PIN_AWARE_CHANNELS is on, which is what variables.yaml documents. The environment is no longer written. RTLMP_MIN_CHANNEL_SIZE gets `default: ""`: unset, rtl_macro_placer chooses the channels, as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Øyvind Harboe <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces changes to the macro placement utility script and variables configuration. It sets a default empty string value for RTLMP_MIN_CHANNEL_SIZE in variables.yaml and refactors how -pin_aware_channels is appended to the RTLMP arguments in macro_place_util.tcl, checking that RTLMP_MIN_CHANNEL_SIZE is not empty and RTLMP_PIN_AWARE_CHANNELS is active. There are no review comments, and the changes look correct, so I have no feedback to provide.
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 0 without a comparable baseline. ✅ QoR is compared against the master build at this PR's merge base |
macro_place_util.tclturnedRTLMP_PIN_AWARE_CHANNELSoff by writing0into the environment whenRTLMP_MIN_CHANNEL_SIZEwas empty, and then passed-pin_aware_channelsfrom the variable it had just rewritten. This decides it where the option is added instead:-pin_aware_channelsis passed when a minimum channel size is set andRTLMP_PIN_AWARE_CHANNELSis on, which is whatvariables.yamldocuments ("Requires RTLMP_MIN_CHANNEL_SIZE to also be set. Defaults to 1 whenever RTLMP_MIN_CHANNEL_SIZE is set"). The environment is no longer written.RTLMP_MIN_CHANNEL_SIZEgetsdefault: "": unset or empty,rtl_macro_placerchooses the channels and pin-aware trimming is off, as before. Seven platforms set it (?=) and 27 designs; none sets it empty.No
TclContract.mdline: the Makefile Contract already says "A script never overwrites a variable that is set", and the optional-value rule is the one #4921 adds.Why
Easier to read: the condition for
-pin_aware_channelsis on the line that adds it, instead of in an environment write three lines up. Failures are hard and early: a misspelled or erasedRTLMP_MIN_CHANNEL_SIZEfails at the line that reads it. And fewer squirrels for AI to chase: a script that rewrites a user's variable makes the log and the configuration disagree, and an agent reading both chases the difference.Test
gf180/uart-blocks, whose parent places the
uart_rxblock withrtl_macro_placerand setsRTLMP_MIN_CHANNEL_SIZE = 40 40; master vs this branch, logs (runtimes, memory and paths dropped) and every stage metric compared:rtl_macro_placergets, before and afterKEEP_VARS=1finish-min_channel_size "40 40" -pin_aware_channelsRTLMP_MIN_CHANNEL_SIZE=(empty)floorplanRTLMP_PIN_AWARE_CHANNELS=0floorplan-min_channel_size "40 40"onlyUnset in the tool's environment: master passes neither option; this branch stops at the read,
can't read "::env(RTLMP_MIN_CHANNEL_SIZE)": no such variable, in2_2_floorplan_macro.tclint/tclfmt0.9.0 are clean;flow/testtest_generate_vars.pyandtest_make_issue.pypass; this merges cleanly with each of #4910-#4922, and with the other open Tcl cleanup branches.🤖 Generated with Claude Code