Skip to content

Conversation

phlfm
Copy link
Collaborator

@phlfm phlfm commented Sep 9, 2025

⚠️ Warning - these changes have not been tested on the corresponding hardware / setup / boards!

PR Description

This PR addresses timing violations observed across multiple projects following the upgrade to Vivado 2025.1, without requiring any HDL modifications.

After the upgrade, most designs exhibited hold violations, likely due to Vivado's aggressive optimization for setup timing. This behavior appears to shorten certain paths excessively, inadvertently introducing hold issues. While invoking phys_opt_design post-route helped resolve some violations automatically, it was not consistently effective, particularly in congested regions where rerouting options were limited.

To mitigate this, the Congestion_SpreadLogic_high strategy was adopted (alternatively _medium or _low depending on design needs). This approach encourages a more distributed placement of logic, which not only alleviates congestion but can also accelerate implementation due to the relatively low resource utilization. Although this spreading may introduce setup timing challenges, a subsequent phys_opt_design pass (or two) has proven highly effective at resolving them.

By spreading the logic and reducing congestion, Vivado gains greater flexibility during post-route optimization, improving its ability to correct HOLD violations without manual intervention.

Change log

  • implemented scripts/auto_timing_fix.tcl
  • improvements to projects/scripts/adi_project_xilinx.tcl
    • added ADI_MAX_THREADS so the trade-off between speed and RAM usage can be adjusted
    • added post place and route script flag
    • added documentation for other flags
  • fixed timing issues in fmcomms2 with 2025.1 toolchain without hdl changes
    • project presented hold timing violations on vivado 2025.1
    • "phys_opt_design -hold_fix" resolved it for most variations but not for all of them
    • changed implementation strategy to spread placement on board to make hold timing easier to resolve
    • now all projects finish successfully after the auto fix script runs
    • no HDL changes were made
  • fixed timing for ad9081 on vcu118 for specific make parameters
    • presented setup timing violations
    • use of "spread high" strategy solved issues without need of ATF or HDL changes

PR Type

  • Bug fix (change that fixes an issue)
  • New feature (change that adds new functionality)
  • Breaking change (has dependencies in other repos or will cause CI to fail)
  • Documentation

PR Checklist

  • I have followed the code style guidelines
  • I have performed a self-review of changes
  • I have compiled all hdl projects and libraries affected by this PR
  • I have tested in hardware affected projects, at least on relevant boards
  • I have commented my code, at least hard-to-understand parts
  • I have signed off all commits from this PR
  • I have updated the documentation (wiki pages, ReadMe files, Copyright etc)
  • I have not introduced new Warnings/Critical Warnings on compilation
  • I have added new hdl testbenches or updated existing ones

@CLAassistant
Copy link

CLAassistant commented Sep 9, 2025

CLA assistant check
All committers have signed the CLA.

@IuliaCMoldovan IuliaCMoldovan changed the title fix timing issues on fmcomms2 and ad9081 vcu118 Fix timing issues on FMCOMMS2 and AD9081/VCU118 Sep 10, 2025
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
…script

Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
…Logic_high

Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
@phlfm phlfm force-pushed the fix_timing_fmcomms2_and_ad9081 branch from ba373d6 to 2cc0018 Compare September 10, 2025 13:42
@phlfm
Copy link
Collaborator Author

phlfm commented Sep 10, 2025

Split into more atomic commits as requested by @acostina

@phlfm
Copy link
Collaborator Author

phlfm commented Sep 15, 2025

RetriggerCI

Comment on lines 351 to 375
# Additional configuration flags are:
# - ADI_EXTRACT_PORTS - If set, extracts port properties from a predefined list
# of IPs into 'ports_properties.txt'.
# - ADI_GENERATE_BIN - If set, generates a binary bitstream file (.bin)
# in addition to the .xsa hardware platform.
# - ADI_GENERATE_UTILIZATION - If set, generates CSV and log files detailing
# resource utilization for the design and specific IPs.
# - ADI_GENERATE_XPA - If set, runs a Xilinx Power Analysis (XPA) and generates
# a summary report.
# - ADI_MAX_OOC_JOBS - Specifies the number of parallel jobs to use for
# Out-of-Context (OOC) synthesis.
# - ADI_MAX_THREADS - Specifies the maximum number of threads for Vivado
# operations. Default value is 8.
# - ADI_NO_BITSTREAM_COMPRESSION - If set, disables compression of the final
# bitstream file.
# - ADI_POST_ROUTE_SCRIPT - Specifies the path to a Tcl script to be executed
# after the routing design step.
# - ADI_POWER_OPTIMIZATION - If set to 1, enables power optimization during the
# implementation run.
# - ADI_PROJECT_DIR - Specifies a base directory for output files such as logs
# and reports.
# - ADI_SKIP_SYNTHESIS - If set, the entire procedure will exit before starting
# synthesis.
# - ADI_USE_OOC_SYNTHESIS - If set to 1, launches synthesis for OOC IP modules
# in parallel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have all of those described on the rst doc (build_hdl.rst), not all of them are there

Copy link
Contributor

@LBFFilho LBFFilho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and everything builds fine, it would be nice to test it on hardware before merging.

if {$final_wns >= 0} {
puts "INFO: ATF: auto timing fix SUCCESS after ${attempt} attempts - final WNS is ${final_wns} ns."
} elseif {$final_wns <= $ADI_AUTOFIX_WNS_THRESHOLD} {
puts "WARNING: ATF: WNS (${wns} ns) excedes threshold (${ADI_AUTOFIX_WNS_THRESHOLD} ns). Automatic fix aborted."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: exceeds.

puts "WARNING: ATF: WNS (${wns} ns) exceeds threshold (${ADI_AUTOFIX_WNS_THRESHOLD} ns). Automatic fix aborted."

Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Copy link
Contributor

@caosjr caosjr Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo line 321: existing.

Add source files to an existing project.

Copy link
Contributor

@caosjr caosjr Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is not related to this commit, but maybe it could be added as well. It is not necessary the elseif in line 332, just an else satisfies the filter for constrs_1 and sources_1.

    if {[string range $pfile [expr 1 + [string last . $pfile]] end] == "xdc"} {
      add_files -norecurse -fileset constrs_1 $pfile
    } else {
      add_files -norecurse -fileset sources_1 $pfile
    }

@caosjr
Copy link
Contributor

caosjr commented Sep 19, 2025

system_bd.tcl scripts are not using your BOARD_NAME variable.

@bia1708
Copy link
Collaborator

bia1708 commented Sep 22, 2025

RetriggerCI

Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
- use less space in jenkins due to checkpoints being large in size
- status of ATF execution is visible by checkpoint file name

Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
Signed-off-by: Pedro Mendonca <Pedro.Mendonca@analog.com>
@phlfm phlfm requested a review from StancaPop as a code owner September 25, 2025 20:02
@phlfm
Copy link
Collaborator Author

phlfm commented Sep 26, 2025

RetriggerCI

@IuliaCMoldovan IuliaCMoldovan requested review from sarpadi and removed request for sarpadi October 10, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants