39if { [info exists ::origin_dir_loc] } {
40 set origin_dir $::origin_dir_loc
44set _xil_proj_name_
"sandbox"
47if { [info exists ::user_project_name] } {
48 set _xil_proj_name_ $::user_project_name
52set script_file
"create_project.tcl"
58 puts
"Recreate a Vivado project from this script. The created project will be"
59 puts
"functionally equivalent to the original project for which this script was"
60 puts
"generated. The script contains commands for creating a project, filesets,"
61 puts
"runs, adding/importing sources and setting properties on various objects.\n"
64 puts
"$script_file -tclargs \[--origin_dir <path>\]"
65 puts
"$script_file -tclargs \[--project_name <name>\]"
66 puts
"$script_file -tclargs \[--help\]\n"
68 puts
"Name Description"
69 puts
"-------------------------------------------------------------------------"
70 puts
"\[--origin_dir <path>\] Determine source file paths wrt this path. Default"
71 puts
" origin_dir path value is \".\", otherwise, the value"
72 puts
" that was set with the \"-paths_relative_to\" switch"
73 puts
" when this script was generated.\n"
74 puts
"\[--project_name <name>\] Create project with the specified name. Default"
75 puts
" name is the name of the project from where this"
76 puts
" script was generated.\n"
77 puts
"\[--help\] Print help information for this script"
78 puts
"-------------------------------------------------------------------------\n"
83 for {set i 0} {$i < $::argc} {incr i} {
84 set option [string trim [lindex $::argv $i]]
85 switch -regexp -- $option {
86 "--origin_dir" { incr i; set origin_dir [lindex $::argv $i] }
87 "--project_name" { incr i; set _xil_proj_name_ [lindex $::argv $i] }
88 "--help" { print_help }
90 if { [regexp {^-} $option] } {
91 puts
"ERROR: Unknown option '$option' specified, please type '$script_file -tclargs --help' for usage info.\n"
100set orig_proj_dir
"[file normalize "$origin_dir/../project/sandbox
"]"
103create_project ${_xil_proj_name_} ./${_xil_proj_name_} -part xc7a35tcpg236-1
106set proj_dir [get_property directory [current_project]]
109set obj [current_project]
110set_property -name
"default_lib" -value
"xil_defaultlib" -objects $obj
111set_property -name
"dsa.accelerator_binary_content" -value
"bitstream" -objects $obj
112set_property -name
"dsa.accelerator_binary_format" -value
"xclbin2" -objects $obj
113set_property -name
"dsa.description" -value
"Vivado generated DSA" -objects $obj
114set_property -name
"dsa.dr_bd_base_address" -value
"0" -objects $obj
115set_property -name
"dsa.emu_dir" -value
"emu" -objects $obj
116set_property -name
"dsa.flash_interface_type" -value
"bpix16" -objects $obj
117set_property -name
"dsa.flash_offset_address" -value
"0" -objects $obj
118set_property -name
"dsa.flash_size" -value
"1024" -objects $obj
119set_property -name
"dsa.host_architecture" -value
"x86_64" -objects $obj
120set_property -name
"dsa.host_interface" -value
"pcie" -objects $obj
121set_property -name
"dsa.num_compute_units" -value
"60" -objects $obj
122set_property -name
"dsa.platform_state" -value
"pre_synth" -objects $obj
123set_property -name
"dsa.vendor" -value
"xilinx" -objects $obj
124set_property -name
"dsa.version" -value
"0.0" -objects $obj
125set_property -name
"enable_vhdl_2008" -value
"1" -objects $obj
126set_property -name
"ip_cache_permissions" -value
"read write" -objects $obj
127set_property -name
"ip_output_repo" -value
"$proj_dir/${_xil_proj_name_}.cache/ip" -objects $obj
128set_property -name
"mem.enable_memory_map_generation" -value
"1" -objects $obj
129set_property -name
"part" -value
"xc7a35tcpg236-1" -objects $obj
130set_property -name
"sim.central_dir" -value
"$proj_dir/${_xil_proj_name_}.ip_user_files" -objects $obj
131set_property -name
"sim.ip.auto_export_scripts" -value
"1" -objects $obj
132set_property -name
"simulator_language" -value
"Mixed" -objects $obj
133set_property -name
"target_language" -value
"VHDL" -objects $obj
136if {[string equal [get_filesets -quiet sources_1]
""]} {
137 create_fileset -srcset sources_1
141set obj [get_filesets sources_1]
143 [file normalize
"${origin_dir}/../src/rtl/TOP.vhd"] \
145add_files -norecurse -fileset $obj $files
148set file
"$origin_dir/../src/rtl/TOP.vhd"
149set file [file normalize $file]
150set file_obj [get_files -of_objects [get_filesets sources_1] [list
"*$file"]]
151set_property -name
"file_type" -value
"VHDL" -objects $file_obj
158set obj [get_filesets sources_1]
159set_property -name
"top" -value
"TOP" -objects $obj
160set_property -name
"top_auto_set" -value
"0" -objects $obj
163if {[string equal [get_filesets -quiet constrs_1]
""]} {
164 create_fileset -constrset constrs_1
168set obj [get_filesets constrs_1]
171set file
"[file normalize "$origin_dir/../constraints/Basys3_GPIO.xdc
"]"
172set file_added [add_files -norecurse -fileset $obj [list $file]]
173set file
"$origin_dir/../constraints/Basys3_GPIO.xdc"
174set file [file normalize $file]
175set file_obj [get_files -of_objects [get_filesets constrs_1] [list
"*$file"]]
176set_property -name
"file_type" -value
"XDC" -objects $file_obj
179set obj [get_filesets constrs_1]
180set_property -name
"target_part" -value
"xc7a35tcpg236-1" -objects $obj
183if {[string equal [get_filesets -quiet sim_1]
""]} {
184 create_fileset -simset sim_1
188set obj [get_filesets sim_1]
192set obj [get_filesets sim_1]
193set_property -name
"top" -value
"TOP" -objects $obj
194set_property -name
"top_auto_set" -value
"0" -objects $obj
195set_property -name
"top_lib" -value
"xil_defaultlib" -objects $obj
198set obj [get_filesets utils_1]
202set obj [get_filesets utils_1]
205if {[string equal [get_runs -quiet synth_1]
""]} {
206 create_run -name synth_1 -part xc7a35tcpg236-1 -flow {Vivado Synthesis 2019} -strategy
"Vivado Synthesis Defaults" -report_strategy {No Reports} -constrset constrs_1
208 set_property strategy
"Vivado Synthesis Defaults" [get_runs synth_1]
209 set_property flow
"Vivado Synthesis 2019" [get_runs synth_1]
211set obj [get_runs synth_1]
212set_property set_report_strategy_name 1 $obj
213set_property report_strategy {Vivado Synthesis Default Reports} $obj
214set_property set_report_strategy_name 0 $obj
216if { [ string equal [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
"" ] } {
217 create_report_config -report_name synth_1_synth_report_utilization_0 -report_type report_utilization:1.0 -steps synth_design -runs synth_1
219set obj [get_report_configs -of_objects [get_runs synth_1] synth_1_synth_report_utilization_0]
223set obj [get_runs synth_1]
224set_property -name
"part" -value
"xc7a35tcpg236-1" -objects $obj
225set_property -name
"strategy" -value
"Vivado Synthesis Defaults" -objects $obj
228current_run -synthesis [get_runs synth_1]
231if {[string equal [get_runs -quiet impl_1]
""]} {
232 create_run -name impl_1 -part xc7a35tcpg236-1 -flow {Vivado Implementation 2019} -strategy
"Vivado Implementation Defaults" -report_strategy {No Reports} -constrset constrs_1 -parent_run synth_1
234 set_property strategy
"Vivado Implementation Defaults" [get_runs impl_1]
235 set_property flow
"Vivado Implementation 2019" [get_runs impl_1]
237set obj [get_runs impl_1]
238set_property set_report_strategy_name 1 $obj
239set_property report_strategy {Vivado Implementation Default Reports} $obj
240set_property set_report_strategy_name 0 $obj
242if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
"" ] } {
243 create_report_config -report_name impl_1_init_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps init_design -runs impl_1
245set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_init_report_timing_summary_0]
247set_property -name
"is_enabled" -value
"0" -objects $obj
248set_property -name
"options.max_paths" -value
"10" -objects $obj
252if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
"" ] } {
253 create_report_config -report_name impl_1_opt_report_drc_0 -report_type report_drc:1.0 -steps opt_design -runs impl_1
255set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_drc_0]
260if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
"" ] } {
261 create_report_config -report_name impl_1_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps opt_design -runs impl_1
263set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_opt_report_timing_summary_0]
265set_property -name
"is_enabled" -value
"0" -objects $obj
266set_property -name
"options.max_paths" -value
"10" -objects $obj
270if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
"" ] } {
271 create_report_config -report_name impl_1_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps power_opt_design -runs impl_1
273set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_power_opt_report_timing_summary_0]
275set_property -name
"is_enabled" -value
"0" -objects $obj
276set_property -name
"options.max_paths" -value
"10" -objects $obj
280if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
"" ] } {
281 create_report_config -report_name impl_1_place_report_io_0 -report_type report_io:1.0 -steps place_design -runs impl_1
283set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_io_0]
288if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
"" ] } {
289 create_report_config -report_name impl_1_place_report_utilization_0 -report_type report_utilization:1.0 -steps place_design -runs impl_1
291set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_utilization_0]
296if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
"" ] } {
297 create_report_config -report_name impl_1_place_report_control_sets_0 -report_type report_control_sets:1.0 -steps place_design -runs impl_1
299set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_control_sets_0]
301set_property -name
"options.verbose" -value
"1" -objects $obj
305if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
"" ] } {
306 create_report_config -report_name impl_1_place_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
308set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_0]
310set_property -name
"is_enabled" -value
"0" -objects $obj
314if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
"" ] } {
315 create_report_config -report_name impl_1_place_report_incremental_reuse_1 -report_type report_incremental_reuse:1.0 -steps place_design -runs impl_1
317set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_incremental_reuse_1]
319set_property -name
"is_enabled" -value
"0" -objects $obj
323if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
"" ] } {
324 create_report_config -report_name impl_1_place_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps place_design -runs impl_1
326set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_place_report_timing_summary_0]
328set_property -name
"is_enabled" -value
"0" -objects $obj
329set_property -name
"options.max_paths" -value
"10" -objects $obj
333if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
"" ] } {
334 create_report_config -report_name impl_1_post_place_power_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_place_power_opt_design -runs impl_1
336set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_place_power_opt_report_timing_summary_0]
338set_property -name
"is_enabled" -value
"0" -objects $obj
339set_property -name
"options.max_paths" -value
"10" -objects $obj
343if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
"" ] } {
344 create_report_config -report_name impl_1_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps phys_opt_design -runs impl_1
346set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_phys_opt_report_timing_summary_0]
348set_property -name
"is_enabled" -value
"0" -objects $obj
349set_property -name
"options.max_paths" -value
"10" -objects $obj
353if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
"" ] } {
354 create_report_config -report_name impl_1_route_report_drc_0 -report_type report_drc:1.0 -steps route_design -runs impl_1
356set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_drc_0]
361if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
"" ] } {
362 create_report_config -report_name impl_1_route_report_methodology_0 -report_type report_methodology:1.0 -steps route_design -runs impl_1
364set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_methodology_0]
369if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
"" ] } {
370 create_report_config -report_name impl_1_route_report_power_0 -report_type report_power:1.0 -steps route_design -runs impl_1
372set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_power_0]
377if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
"" ] } {
378 create_report_config -report_name impl_1_route_report_route_status_0 -report_type report_route_status:1.0 -steps route_design -runs impl_1
380set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_route_status_0]
385if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
"" ] } {
386 create_report_config -report_name impl_1_route_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps route_design -runs impl_1
388set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_timing_summary_0]
390set_property -name
"options.max_paths" -value
"10" -objects $obj
394if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
"" ] } {
395 create_report_config -report_name impl_1_route_report_incremental_reuse_0 -report_type report_incremental_reuse:1.0 -steps route_design -runs impl_1
397set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_incremental_reuse_0]
402if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
"" ] } {
403 create_report_config -report_name impl_1_route_report_clock_utilization_0 -report_type report_clock_utilization:1.0 -steps route_design -runs impl_1
405set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_clock_utilization_0]
410if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
"" ] } {
411 create_report_config -report_name impl_1_route_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps route_design -runs impl_1
413set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_route_report_bus_skew_0]
415set_property -name
"options.warn_on_violation" -value
"1" -objects $obj
419if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
"" ] } {
420 create_report_config -report_name impl_1_post_route_phys_opt_report_timing_summary_0 -report_type report_timing_summary:1.0 -steps post_route_phys_opt_design -runs impl_1
422set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_timing_summary_0]
424set_property -name
"options.max_paths" -value
"10" -objects $obj
425set_property -name
"options.warn_on_violation" -value
"1" -objects $obj
429if { [ string equal [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
"" ] } {
430 create_report_config -report_name impl_1_post_route_phys_opt_report_bus_skew_0 -report_type report_bus_skew:1.1 -steps post_route_phys_opt_design -runs impl_1
432set obj [get_report_configs -of_objects [get_runs impl_1] impl_1_post_route_phys_opt_report_bus_skew_0]
434set_property -name
"options.warn_on_violation" -value
"1" -objects $obj
437set obj [get_runs impl_1]
438set_property -name
"part" -value
"xc7a35tcpg236-1" -objects $obj
439set_property -name
"strategy" -value
"Vivado Implementation Defaults" -objects $obj
440set_property -name
"steps.write_bitstream.args.readback_file" -value
"0" -objects $obj
441set_property -name
"steps.write_bitstream.args.verbose" -value
"0" -objects $obj
444current_run -implementation [get_runs impl_1]
446puts
"INFO: Project created:${_xil_proj_name_}"
448if {[string equal [get_dashboard_gadgets [ list
"drc_1" ] ]
""]} {
449create_dashboard_gadget -name {drc_1} -type drc
451set obj [get_dashboard_gadgets [ list
"drc_1" ] ]
452set_property -name
"reports" -value
"impl_1#impl_1_route_report_drc_0" -objects $obj
455if {[string equal [get_dashboard_gadgets [ list
"methodology_1" ] ]
""]} {
456create_dashboard_gadget -name {methodology_1} -type methodology
458set obj [get_dashboard_gadgets [ list
"methodology_1" ] ]
459set_property -name
"reports" -value
"impl_1#impl_1_route_report_methodology_0" -objects $obj
462if {[string equal [get_dashboard_gadgets [ list
"power_1" ] ]
""]} {
463create_dashboard_gadget -name {power_1} -type power
465set obj [get_dashboard_gadgets [ list
"power_1" ] ]
466set_property -name
"reports" -value
"impl_1#impl_1_route_report_power_0" -objects $obj
469if {[string equal [get_dashboard_gadgets [ list
"timing_1" ] ]
""]} {
470create_dashboard_gadget -name {timing_1} -type timing
472set obj [get_dashboard_gadgets [ list
"timing_1" ] ]
473set_property -name
"reports" -value
"impl_1#impl_1_route_report_timing_summary_0" -objects $obj
476if {[string equal [get_dashboard_gadgets [ list
"utilization_1" ] ]
""]} {
477create_dashboard_gadget -name {utilization_1} -type utilization
479set obj [get_dashboard_gadgets [ list
"utilization_1" ] ]
480set_property -name
"reports" -value
"synth_1#synth_1_synth_report_utilization_0" -objects $obj
481set_property -name
"run.step" -value
"synth_design" -objects $obj
482set_property -name
"run.type" -value
"synthesis" -objects $obj
485if {[string equal [get_dashboard_gadgets [ list
"utilization_2" ] ]
""]} {
486create_dashboard_gadget -name {utilization_2} -type utilization
488set obj [get_dashboard_gadgets [ list
"utilization_2" ] ]
489set_property -name
"reports" -value
"impl_1#impl_1_place_report_utilization_0" -objects $obj
491move_dashboard_gadget -name {utilization_1} -row 0 -col 0
492move_dashboard_gadget -name {power_1} -row 1 -col 0
493move_dashboard_gadget -name {drc_1} -row 2 -col 0
494move_dashboard_gadget -name {timing_1} -row 0 -col 1
495move_dashboard_gadget -name {utilization_2} -row 1 -col 1
496move_dashboard_gadget -name {methodology_1} -row 2 -col 1