|
1 | 1 | ############################################################################### |
2 | | -## Copyright (C) 2014-2023 Analog Devices, Inc. All rights reserved. |
| 2 | +## Copyright (C) 2014-2023, 2025 Analog Devices, Inc. All rights reserved. |
3 | 3 | ### SPDX short identifier: ADIBSD |
4 | 4 | ############################################################################### |
5 | 5 |
|
@@ -28,6 +28,17 @@ set ADI_USE_INCR_COMP 1 |
28 | 28 | ## Set to enable power optimization |
29 | 29 | set ADI_POWER_OPTIMIZATION 0 |
30 | 30 |
|
| 31 | +## Set to generate .bin (for selmap) |
| 32 | +if {![info exists ::env(ADI_GENERATE_BIN)]} { |
| 33 | + set ADI_GENERATE_BIN 0 |
| 34 | +} else { |
| 35 | + if {[string equal $::env(ADI_GENERATE_BIN) n]} { |
| 36 | + set ADI_GENERATE_BIN 0 |
| 37 | + } else { |
| 38 | + set ADI_GENERATE_BIN 1 |
| 39 | + } |
| 40 | +} |
| 41 | + |
31 | 42 | ## Initialize global variables |
32 | 43 | set p_board "not-applicable" |
33 | 44 | set p_device "none" |
@@ -335,9 +346,11 @@ proc adi_project_files {project_name project_files} { |
335 | 346 | proc adi_project_run {project_name} { |
336 | 347 |
|
337 | 348 | global ad_project_dir |
| 349 | + global sys_zynq |
338 | 350 | global ADI_POWER_OPTIMIZATION |
339 | 351 | global ADI_USE_OOC_SYNTHESIS |
340 | 352 | global ADI_MAX_OOC_JOBS |
| 353 | + global ADI_GENERATE_BIN |
341 | 354 |
|
342 | 355 | if {![info exists ::env(ADI_PROJECT_DIR)]} { |
343 | 356 | set actual_project_name $project_name |
@@ -549,14 +562,24 @@ proc adi_project_run {project_name} { |
549 | 562 | if { [string match "*VIOLATED*" $timing_string] == 1 || |
550 | 563 | [string match "*Timing constraints are not met*" $timing_string] == 1} { |
551 | 564 | write_hw_platform -fixed -force -include_bit -file ${actual_project_name}.sdk/system_top_bad_timing.xsa |
552 | | - if {[info exists ::env(ADI_GENERATE_BIN)]} { |
553 | | - write_bitstream -bin_file ${actual_project_name}.sdk/system_top_bad_timing.bit |
| 565 | + # Generate .bin file only for non Versal designs |
| 566 | + if {$ADI_GENERATE_BIN == 1} { |
| 567 | + if {$sys_zynq == 3} { |
| 568 | + puts "Bin generation skipped, Versal families do not support it." |
| 569 | + } else { |
| 570 | + write_bitstream -bin_file ${actual_project_name}.sdk/system_top_bad_timing.bit |
| 571 | + } |
554 | 572 | } |
555 | 573 | return -code error [format "ERROR: Timing Constraints NOT met!"] |
556 | 574 | } else { |
557 | 575 | write_hw_platform -fixed -force -include_bit -file ${actual_project_name}.sdk/system_top.xsa |
558 | | - if {[info exists ::env(ADI_GENERATE_BIN)]} { |
559 | | - write_bitstream -bin_file ${actual_project_name}.sdk/system_top.bit |
| 576 | + # Generate .bin file only for non Versal designs |
| 577 | + if {$ADI_GENERATE_BIN == 1} { |
| 578 | + if {$sys_zynq == 3} { |
| 579 | + puts "Bin generation skipped, Versal families do not support it." |
| 580 | + } else { |
| 581 | + write_bitstream -bin_file ${actual_project_name}.sdk/system_top.bit |
| 582 | + } |
560 | 583 | } |
561 | 584 | } |
562 | 585 | } |
|
0 commit comments