-
Notifications
You must be signed in to change notification settings - Fork 24
/
elinkdv.tcl
181 lines (151 loc) · 7.28 KB
/
elinkdv.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#
# Vivado (TM) v2014.4.1 (64-bit)
#
# elinkdv.tcl: Tcl script for re-creating project 'simulation/elinkdv'
#
# Generated by Vivado on Fri Sep 04 16:10:26 BST 2015
# IP Build 1147552 on Wed Feb 18 14:25:16 MST 2015
#
# 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 (elinkdv.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' and '$origin_dir' variable setting below at the start of the script)
#
# "./elinkdv/archive_project_summary.txt"
#
# 3. The following remote source files that were added to the original project:-
#
# "./elinkdv/elinkdv.srcs/sources_1/bd/elink_testbench/elink_testbench.bd"
# "./elinkdv/elinkdv.srcs/constrs_1/imports/constraints/parallella_timing.xdc"
# "./elinkdv/elinkdv.srcs/constrs_1/imports/constraints/parallella_z70x0_loc.xdc"
# "./elinkdv/elinkdv.srcs/constrs_1/imports/constraints/parallella_z7020_loc.xdc"
# "./elinkdv/elinkdv.srcs/sim_1/imports/elink_test/elink2new_tb.v"
#
#*****************************************************************************************
# Set the reference directory for source file relative paths (by default the value is script directory path)
set origin_dir "."
# Set the directory path for the original project from where this script was exported
set orig_proj_dir "[file normalize "$origin_dir/simulation/elinkdv"]"
# Create project
## create_project elinkdv ./elinkdv
# Open project
open_project simulation/elinkdv/elinkdv.xpr
# Set the directory path for the new project
set proj_dir [get_property directory [current_project]]
# Set project properties
set obj [get_projects elinkdv]
set_property "default_lib" "xil_defaultlib" $obj
set_property "part" "xc7z020clg400-1" $obj
set_property "simulator_language" "Mixed" $obj
# Create 'sources_1' fileset (if not found)
if {[string equal [get_filesets -quiet sources_1] ""]} {
create_fileset -srcset sources_1
}
# Set IP repository paths
set obj [get_filesets sources_1]
set_property "ip_repo_paths" "[file normalize "$origin_dir/AdaptevaLib"] [file normalize "$origin_dir/AdiHDLLib/library"]" $obj
# Set 'sources_1' fileset object
set obj [get_filesets sources_1]
set files [list \
"[file normalize "$orig_proj_dir/elinkdv.srcs/sources_1/bd/elink_testbench/elink_testbench.bd"]"\
"[file normalize "$orig_proj_dir/archive_project_summary.txt"]"\
]
add_files -norecurse -fileset $obj $files
# Set 'sources_1' fileset file properties for remote files
set file "$orig_proj_dir/elinkdv.srcs/sources_1/bd/elink_testbench/elink_testbench.bd"
set file [file normalize $file]
set file_obj [get_files -of_objects [get_filesets sources_1] [list "*$file"]]
if { ![get_property "is_locked" $file_obj] } {
set_property "generate_synth_checkpoint" "0" $file_obj
}
set_property "used_in_implementation" "0" $file_obj
set_property "used_in_synthesis" "0" $file_obj
# Set 'sources_1' fileset file properties for local files
# None
# Set 'sources_1' fileset properties
set obj [get_filesets sources_1]
# Create 'constrs_1' fileset (if not found)
if {[string equal [get_filesets -quiet constrs_1] ""]} {
create_fileset -constrset constrs_1
}
# Set 'constrs_1' fileset object
set obj [get_filesets constrs_1]
# Add/Import constrs file and set constrs file properties
set file "[file normalize "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_timing.xdc"]"
set file_added [add_files -norecurse -fileset $obj $file]
set file "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_timing.xdc"
set file [file normalize $file]
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
set_property "file_type" "XDC" $file_obj
# Add/Import constrs file and set constrs file properties
set file "[file normalize "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_z70x0_loc.xdc"]"
set file_added [add_files -norecurse -fileset $obj $file]
set file "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_z70x0_loc.xdc"
set file [file normalize $file]
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
set_property "file_type" "XDC" $file_obj
# Add/Import constrs file and set constrs file properties
set file "[file normalize "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_z7020_loc.xdc"]"
set file_added [add_files -norecurse -fileset $obj $file]
set file "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_z7020_loc.xdc"
set file [file normalize $file]
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
set_property "file_type" "XDC" $file_obj
# Set 'constrs_1' fileset properties
set obj [get_filesets constrs_1]
set_property "target_constrs_file" "$orig_proj_dir/elinkdv.srcs/constrs_1/imports/constraints/parallella_timing.xdc" $obj
# Create 'sim_1' fileset (if not found)
if {[string equal [get_filesets -quiet sim_1] ""]} {
create_fileset -simset sim_1
}
# Set 'sim_1' fileset object
set obj [get_filesets sim_1]
set files [list \
"[file normalize "$orig_proj_dir/elinkdv.srcs/sim_1/imports/elink_test/elink2new_tb.v"]"\
]
add_files -norecurse -fileset $obj $files
# Set 'sim_1' fileset file properties for remote files
# None
# Set 'sim_1' fileset file properties for local files
# None
# Set 'sim_1' fileset properties
set obj [get_filesets sim_1]
set_property "top" "elink2_tb" $obj
set_property "xsim.view" "$orig_proj_dir/elink_tb_behav.wcfg" $obj
# Create 'synth_1' run (if not found)
if {[string equal [get_runs -quiet synth_1] ""]} {
create_run -name synth_1 -part xc7z020clg400-1 -flow {Vivado Synthesis 2014} -strategy "Vivado Synthesis Defaults" -constrset constrs_1
} else {
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
set_property flow "Vivado Synthesis 2014" [get_runs synth_1]
}
set obj [get_runs synth_1]
set_property "part" "xc7z020clg400-1" $obj
# set the current synth run
current_run -synthesis [get_runs synth_1]
# Create 'impl_1' run (if not found)
if {[string equal [get_runs -quiet impl_1] ""]} {
create_run -name impl_1 -part xc7z020clg400-1 -flow {Vivado Implementation 2014} -strategy "Vivado Implementation Defaults" -constrset constrs_1 -parent_run synth_1
} else {
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
set_property flow "Vivado Implementation 2014" [get_runs impl_1]
}
set obj [get_runs impl_1]
set_property "part" "xc7z020clg400-1" $obj
# set the current impl run
current_run -implementation [get_runs impl_1]
puts "INFO: Project created:elinkdv"
generate_target all [get_files $orig_proj_dir/elinkdv.srcs/sources_1/bd/elink_testbench/elink_testbench.bd]
puts "INFO: Generated Output Products:elinkdv"