# Set the directory path for the new project
set proj_dir [get_property directory [current_project]]
+# Reconstruct message rules
+# None
+
# Set project properties
set obj [get_projects canbench]
set_property "board_part" "em.avnet.com:microzed_7010:part0:1.0" $obj
# Set IP repository paths
set obj [get_filesets sources_1]
-set_property "ip_repo_paths" "[file normalize "$origin_dir/../ip/can_merge"]" $obj
+set_property "ip_repo_paths" "[file normalize "$origin_dir/../ip/sja1000_1.0"] [file normalize "$origin_dir/../ip/sja1000_1.0"] [file normalize "$origin_dir/../ip/can_merge"] [file normalize "$origin_dir/../ip/canbench_cc_gpio"]" $obj
# Rebuild user ip_repo's index before adding any source files
update_ip_catalog -rebuild
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
-set file "top/top.bd"
+set file "$origin_dir/../src/top/top.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 "synth_checkpoint_mode" "Hierarchical" $file_obj
}
+# Set 'sources_1' fileset file properties for local files
+# None
+
+# Set 'sources_1' fileset properties
+#set obj [get_filesets sources_1]
+#set_property "top" "top_wrapper" $obj
+
# 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]
-# Empty (no sources present)
+
+# Add/Import constrs file and set constrs file properties
+set file "[file normalize "$origin_dir/../src/constrs/microzed_CAN-CC_RevA.xdc"]"
+set file_added [add_files -norecurse -fileset $obj $file]
+set file "$origin_dir/../src/constrs/microzed_CAN-CC_RevA.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 obj [get_filesets constrs_1]
+#set_property "target_constrs_file" "$orig_proj_dir/canbench.srcs/constrs_1/new/test.xdc" $obj
# Create 'sim_1' fileset (if not found)
if {[string equal [get_filesets -quiet sim_1] ""]} {
# Set 'sim_1' fileset properties
set obj [get_filesets sim_1]
+set_property "transport_int_delay" "0" $obj
+set_property "transport_path_delay" "0" $obj
set_property "xelab.nosort" "1" $obj
set_property "xelab.unifast" "" $obj
# Create 'synth_1' run (if not found)
if {[string equal [get_runs -quiet synth_1] ""]} {
- create_run -name synth_1 -part xc7z010clg400-1 -flow {Vivado Synthesis 2015} -strategy "Vivado Synthesis Defaults" -constrset constrs_1
+ create_run -name synth_1 -part xc7z010clg400-1 -flow {Vivado Synthesis 2016} -strategy "Vivado Synthesis Defaults" -constrset constrs_1
} else {
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
- set_property flow "Vivado Synthesis 2015" [get_runs synth_1]
+ set_property flow "Vivado Synthesis 2016" [get_runs synth_1]
}
set obj [get_runs synth_1]
-set_property "needs_refresh" "1" $obj
+set_property "part" "xc7z010clg400-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 xc7z010clg400-1 -flow {Vivado Implementation 2015} -strategy "Vivado Implementation Defaults" -constrset constrs_1 -parent_run synth_1
+ create_run -name impl_1 -part xc7z010clg400-1 -flow {Vivado Implementation 2016} -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 2015" [get_runs impl_1]
+ set_property flow "Vivado Implementation 2016" [get_runs impl_1]
}
+set obj [get_runs impl_1]
+set_property "part" "xc7z010clg400-1" $obj
+set_property "steps.write_bitstream.args.readback_file" "0" $obj
+set_property "steps.write_bitstream.args.verbose" "0" $obj
+
+# set the current impl run
+current_run -implementation [get_runs impl_1]
# Create block design
#source ../src/top/top.tcl
+# Upgrade IPs
+#upgrade_ip [get_ips]
+
# Generate the wrapper
-open_bd_design ../src/top/top.bd
+open_bd_design "$origin_dir/../src/top/top.bd"
set design_name [get_bd_designs]
set obj [get_files $design_name.bd]
make_wrapper -files $obj -top -import
set_property "steps.write_bitstream.args.verbose" "0" $obj
current_run -implementation [get_runs impl_1]
-
+check_ip_cache -import_from_project -use_project_cache
puts "INFO: Project created:canbench"