File: viv_generate_hls_ip.tcl

package info (click to toggle)
uhd 3.13.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 207,120 kB
  • sloc: cpp: 167,245; ansic: 86,841; vhdl: 53,420; python: 40,839; xml: 13,167; tcl: 5,688; makefile: 2,167; sh: 1,719; pascal: 230; csh: 94; asm: 20; perl: 11
file content (36 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# Copyright 2015 Ettus Research
#

# ---------------------------------------
# Gather all external parameters
# ---------------------------------------
set part_name        $::env(PART_NAME)              ;# Full Xilinx part name
set hls_ip_name      $::env(HLS_IP_NAME)            ;# High level synthesis IP name
set hls_ip_srcs      $::env(HLS_IP_SRCS)            ;# High level synthesis IP source files
set hls_ip_inc       $::env(HLS_IP_INCLUDES)        ;# High level synthesis IP include directories

# ---------------------------------------
# Vivado Commands
# ---------------------------------------
open_project $hls_ip_name
open_solution "solution"
set_part $part_name
set_top $hls_ip_name
puts "BUILDER: Using include location : $hls_ip_inc"
foreach src_file $hls_ip_srcs {
    set src_ext [file extension $src_file ]
    if [expr [lsearch {.c .cpp .cc .h .hpp} $src_ext] >= 0] {
        puts "BUILDER: Adding C/C++ : $src_file"
        add_files $src_file -cflags "-I $hls_ip_inc"
    } elseif [expr [lsearch {.tcl} $src_ext] >= 0] {
        puts "BUILDER: Executing tcl script : $src_file"
        source $src_file
    } else {
        puts "BUILDER: \[WARNING\] File ignored!!!: $src_file"
    }
}
csynth_design
export_design -format ip_catalog

exit