Wire config.cfg pre_synth entries into hardware builds#138
Open
merkelmarrow wants to merge 1 commit into
Open
Conversation
The parser stored [user_region] pre_synth= entries in ConnectivityConfig.user_region.pre_synth_tcls, but the hardware build only ever read LinkerConfiguration.pre_synth_tcls, which was populated solely from the --pre-synth-tcls CLI flag. The config-declared scripts were parsed and then dropped, so they never reached the build. This also left the CMak add_vbin flow with no working pre-synth path, since it never passes --pre-synth-tcls. Merge both sources in LinkerConfiguration: config entries source first, then CLI ones, so the order is predicatable. Duplicates are now dropped by resolved path, which also collapses a repeated --pre-synth-tcls path that previously sourced twice. Signed-off-by: Marco Blackwell <mblackwe@amd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The config.cfg file lets you list pre-synthesis Tcl scripts uner a
[user_region]section, meant to run before synthesis during a hardware build (for example to apply timing constraints or per-step implementation directives). Until now those entries were parsed but never actually used, so the only working way to inject a pre-synth script was the--pre-synth-tclscommand-line flag, which is not reachable through the regularadd_vbinCMake build flow.This change wires the config file entries through to the build, so both the config file and the command-line flag now work.
--pre-synth-tcls. When both are used, the config file scripts run first and the command-line ones after, so a command-line script can be layered on top.Example
Testing
[user_region] pre_synth=entry (no command-line flag) confirmed the script is sourced during the build and the build completes and produces a valid image.