Skip to content

Commit

Permalink
library/scripts/adi_ip_xilinx: adi_ip_files update
Browse files Browse the repository at this point in the history
- Creates a list for design sources and constraints and then imports all the files at once in their respective category

Signed-off-by: Istvan-Zsolt Szekely <istvan.szekely@analog.com>
  • Loading branch information
IstvanZsSzekely committed Dec 11, 2024
1 parent 71f59dc commit c32d76b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions library/scripts/adi_ip_xilinx.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,21 @@ proc adi_ip_create {ip_name} {
#
proc adi_ip_files {ip_name ip_files} {
set proj_fileset [get_filesets sources_1]
set design_source_files [list]
set constraint_files [list]
foreach m_file $ip_files {
if {[file extension $m_file] eq ".xdc"} {
add_files -norecurse -fileset constrs_1 $m_file
lappend constraint_files $m_file
} else {
add_files -norecurse -scan_for_includes -fileset $proj_fileset $m_file
lappend design_source_files $m_file
}
}
if {$design_source_files != {}} {
add_files -norecurse -scan_for_includes -fileset $proj_fileset $design_source_files
}
if {$constraint_files != {}} {
add_files -norecurse -fileset constrs_1 $constraint_files
}
set_property "top" "$ip_name" $proj_fileset
}

Expand Down

0 comments on commit c32d76b

Please sign in to comment.