]> rtime.felk.cvut.cz Git - fpga/zynq/canbench-sw.git/commitdiff
system: updated scripts
authorMartin Jerabek <jerabma7@fel.cvut.cz>
Thu, 12 May 2016 11:50:16 +0000 (13:50 +0200)
committerMartin Jerabek <jerabma7@fel.cvut.cz>
Thu, 12 May 2016 23:56:01 +0000 (01:56 +0200)
system/script/build.tcl
system/script/recreate.tcl

index 6ca520ac1d9d900ebd20e33920ed6f704ec6c66d..08a6feab5cdc05349fee76b416f629d571df68de 100644 (file)
@@ -9,6 +9,8 @@ set obj [get_files $design_file]
 generate_target all $obj
 export_ip_user_files -of_objects $obj -no_script -force -quiet
 
+update_compile_order -fileset sources_1
+
 #foreach ip [get_ips] {
 #      create_ip_run $ip
 #}
index 47e569297d039c97b16f6d0d3ca0befb56dc1bb3..adcd4cb843dcc75b27c839be6f360ab45b21b519 100644 (file)
@@ -58,6 +58,9 @@ create_project canbench ../project
 # 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
@@ -73,7 +76,7 @@ if {[string equal [get_filesets -quiet sources_1] ""]} {
 
 # 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
@@ -86,15 +89,20 @@ set files [list \
 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
@@ -102,10 +110,18 @@ if {[string equal [get_filesets -quiet 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] ""]} {
@@ -118,35 +134,47 @@ set obj [get_filesets 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
@@ -158,6 +186,6 @@ set_property "steps.write_bitstream.args.readback_file" "0" $obj
 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"