-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreateProject.tcl
115 lines (95 loc) · 4.22 KB
/
createProject.tcl
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# Vivado (TM) v2013.3 (64-bit)
#
# createProject.tcl: Tcl script for re-creating project 'matrixMultiply'
#
# Generated by Vivado on Tue May 27 12:26:50 PDT 2014
# IP Build 192953 on Wed Oct 16 08:44:02 MDT 2013
#
# This file contains the Vivado Tcl commands for re-creating the project to the state*
# when this script was generated. In order to re-create the project, please source this
# file in the Vivado Tcl Shell.
#
# * Note that the runs in the created project will be configured the same way as the
# original project, however they will not be launched automatically. To regenerate the
# run results please launch the synthesis/implementation runs as needed.
#
#*****************************************************************************************
# NOTE: In order to use this script for source control purposes, please make sure that the
# following files are added to the source control system:-
#
# 1. This project restoration tcl script (createProject.tcl) that was generated.
#
# 2. The following source(s) files that were local or imported into the original project.
# (Please see the '$orig_proj_dir' variable setting below at the start of the script)
#
# <none>
#
# 3. The following remote source files that were added to the original project:-
#
# "/home/raghu/work/projects/matrixMultiply/matrixMultiply.srcs/sources_1/bd/matrixMultiply/hdl/matrixMultiply_wrapper.v"
# "/home/raghu/work/projects/matrixMultiply/matrixMultiply.srcs/sources_1/bd/matrixMultiply/matrixMultiply.bd"
#
#*****************************************************************************************
# Set the original project directory path for adding/importing sources in the new project
set orig_proj_dir "/home/raghu/w/vivadoProjects/matrixMultiply"
# Create project
create_project matrixMultiply ./matrixMultiply
# Set the directory path for the new project
set proj_dir [get_property directory [current_project]]
# Set project properties
set obj [get_projects matrixMultiply]
set_property "board" "xilinx.com:zynq:zc706:1.1" $obj
set_property "simulator_language" "Mixed" $obj
# Create block design
source createbd.tcl
make_wrapper -files [get_files ${orig_proj_dir}/matrixMultiply/matrixMultiply.srcs/sources_1/bd/matrixMultiply/matrixMultiply.bd] -top
# Create 'sources_1' fileset (if not found)
if {[string equal [get_filesets sources_1] ""]} {
create_fileset -srcset sources_1
}
# Add files to 'sources_1' fileset
set obj [get_filesets sources_1]
set files [list \
"[file normalize "$orig_proj_dir/matrixMultiply/matrixMultiply.srcs/sources_1/bd/matrixMultiply/hdl/matrixMultiply_wrapper.v"]"\
"[file normalize "$orig_proj_dir/matrixMultiply/matrixMultiply.srcs/sources_1/bd/matrixMultiply/matrixMultiply.bd"]"\
]
add_files -norecurse -fileset $obj $files
# Set 'sources_1' fileset file properties for remote files
# None
# Set 'sources_1' fileset file properties for local files
# None
# Set 'sources_1' fileset properties
set obj [get_filesets sources_1]
set_property "ip_repo_paths" "$orig_proj_dir/hls/mmult/solution1/impl" $obj
set_property "top" "matrixMultiply_wrapper" $obj
# Create 'constrs_1' fileset (if not found)
if {[string equal [get_filesets constrs_1] ""]} {
create_fileset -constrset constrs_1
}
# Add files to 'constrs_1' fileset
set obj [get_filesets constrs_1]
# Empty (no sources present)
# Set 'constrs_1' fileset properties
set obj [get_filesets constrs_1]
# Create 'sim_1' fileset (if not found)
if {[string equal [get_filesets sim_1] ""]} {
create_fileset -simset sim_1
}
# Add files to 'sim_1' fileset
set obj [get_filesets sim_1]
# Empty (no sources present)
# Set 'sim_1' fileset properties
set obj [get_filesets sim_1]
set_property "top" "matrixMultiply_wrapper" $obj
# Create 'synth_1' run (if not found)
if {[string equal [get_runs synth_1] ""]} {
create_run -name synth_1 -part xc7z045ffg900-2 -flow {Vivado Synthesis 2013} -strategy "Vivado Synthesis Defaults" -constrset constrs_1
}
set obj [get_runs synth_1]
# Create 'impl_1' run (if not found)
if {[string equal [get_runs impl_1] ""]} {
create_run -name impl_1 -part xc7z045ffg900-2 -flow {Vivado Implementation 2013} -strategy "Vivado Implementation Defaults" -constrset constrs_1 -parent_run synth_1
}
set obj [get_runs impl_1]
puts "INFO: Project created:matrixMultiply"