project.tcl 1.56 KB
Newer Older
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
37
38
39
40
41
42
43
44
45
46
47
48
49
# global variables
set ::platform "uz7evcc"
set ::silicon "i"

# local variables
set design_nm "${::platform}_vcu"
set project_dir "build/$design_nm"
set ip_dir "srcs/ip"
set constrs_dir "constrs"
set scripts_dir "designs/$design_nm"

# set variable names
set part "xczu7ev-fbvb900-1-${::silicon}"
puts "INFO: Target part selected: '$part'"

# set up project
create_project $design_nm $project_dir -part $part -force
set board_lat [ get_board_parts -latest_file_version  {*ultrazed_7ev_cc*} ]
set_property board_part $board_lat [current_project]

# set up IP repo
set_property ip_repo_paths $ip_dir [current_fileset]
update_ip_catalog -rebuild

# set up bd design
create_bd_design bd
source $scripts_dir/bd.tcl

# add hdl sources to project
make_wrapper -files [get_files ./$project_dir/$design_nm.srcs/sources_1/bd/bd/bd.bd] -top

# Use the pre-built wrapper file instead of the generated wrapper (uncomment the following 2 lines)
add_files -norecurse ./srcs/hdl/${design_nm}_wrapper.v
set_property top ${design_nm}_wrapper [current_fileset]

# Alternatively, use the generated wrapper (uncomment the following 2 lines)
#add_files -norecurse ./$project_dir/$design_nm.srcs/sources_1/bd/bd/hdl/bd_wrapper.v
#set_property top bd_wrapper [current_fileset]

add_files -fileset constrs_1 -norecurse $constrs_dir/${design_nm}.xdc
update_compile_order -fileset sources_1
set_property strategy Performance_NetDelay_low [get_runs impl_1]       

validate_bd_design
update_compile_order -fileset sources_1
regenerate_bd_layout

import_files
save_bd_design
50