| 1 |
15 |
qaztronic |
#
|
| 2 |
|
|
#*****************************************************************************************
|
| 3 |
|
|
#
|
| 4 |
|
|
#*****************************************************************************************
|
| 5 |
|
|
|
| 6 |
|
|
close_project -quiet
|
| 7 |
|
|
|
| 8 |
|
|
# set variables for project
|
| 9 |
|
|
set PROJECT_NAME axi_lite_to_wb
|
| 10 |
|
|
|
| 11 |
|
|
# Set the reference directory for source file relative paths (by default the value is script directory path)
|
| 12 |
|
|
set origin_dir [file dirname [info script] ]
|
| 13 |
|
|
|
| 14 |
|
|
# Create project
|
| 15 |
|
|
create_project -force $PROJECT_NAME $origin_dir/$PROJECT_NAME
|
| 16 |
|
|
|
| 17 |
|
|
# Set project properties
|
| 18 |
|
|
set obj [get_projects $PROJECT_NAME]
|
| 19 |
|
|
set_property "board_part" "em.avnet.com:zed:part0:1.2" $obj
|
| 20 |
|
|
set_property "default_lib" "xil_defaultlib" $obj
|
| 21 |
|
|
|
| 22 |
|
|
# Create 'sources_1' fileset (if not found)
|
| 23 |
|
|
if {[string equal [get_filesets -quiet sources_1] ""]} {
|
| 24 |
|
|
create_fileset -srcset sources_1
|
| 25 |
|
|
}
|
| 26 |
|
|
|
| 27 |
|
|
add_files -fileset sources_1 -norecurse $origin_dir/../src/top.v
|
| 28 |
|
|
add_files -fileset sources_1 -norecurse $origin_dir/../src/reg_file_v1_0_S00_AXI.v
|
| 29 |
|
|
|
| 30 |
|
|
update_compile_order -fileset sources_1
|
| 31 |
|
|
|
| 32 |
|
|
# Set 'sources_1' fileset properties
|
| 33 |
|
|
set obj [get_filesets sources_1]
|
| 34 |
|
|
set_property "top" "top" $obj
|
| 35 |
|
|
|
| 36 |
|
|
# Create 'constrs_1' fileset (if not found)
|
| 37 |
|
|
if {[string equal [get_filesets -quiet constrs_1] ""]} {
|
| 38 |
|
|
create_fileset -constrset constrs_1
|
| 39 |
|
|
}
|
| 40 |
|
|
|
| 41 |
|
|
# Set 'constrs_1' fileset object
|
| 42 |
|
|
set obj [get_filesets constrs_1]
|
| 43 |
|
|
|
| 44 |
|
|
# Add/Import constrs file and set constrs file properties
|
| 45 |
|
|
set file "[file normalize "$origin_dir/../src/zedboard_master_XDC_RevC_D_v2.xdc"]"
|
| 46 |
|
|
set file_added [add_files -norecurse -fileset $obj $file]
|
| 47 |
|
|
set file "$origin_dir/../src/zedboard_master_XDC_RevC_D_v2.xdc"
|
| 48 |
|
|
set file [file normalize $file]
|
| 49 |
|
|
set file_obj [get_files -of_objects [get_filesets constrs_1] [list "*$file"]]
|
| 50 |
|
|
set_property "file_type" "XDC" $file_obj
|
| 51 |
|
|
|
| 52 |
|
|
# Set 'constrs_1' fileset properties
|
| 53 |
|
|
set obj [get_filesets constrs_1]
|
| 54 |
|
|
set_property "target_constrs_file" "[file normalize "$origin_dir/../src/zedboard_master_XDC_RevC_D_v2.xdc"]" $obj
|
| 55 |
|
|
|
| 56 |
|
|
# Create 'sim_1' fileset (if not found)
|
| 57 |
|
|
if {[string equal [get_filesets -quiet sim_1] ""]} {
|
| 58 |
|
|
create_fileset -simset sim_1
|
| 59 |
|
|
}
|
| 60 |
|
|
|
| 61 |
|
|
# Set 'sim_1' fileset object
|
| 62 |
|
|
set obj [get_filesets sim_1]
|
| 63 |
|
|
# Empty (no sources present)
|
| 64 |
|
|
|
| 65 |
|
|
# Set 'sim_1' fileset properties
|
| 66 |
|
|
set obj [get_filesets sim_1]
|
| 67 |
|
|
set_property "top" "top" $obj
|
| 68 |
|
|
|
| 69 |
|
|
# Create 'synth_1' run (if not found)
|
| 70 |
|
|
if {[string equal [get_runs -quiet synth_1] ""]} {
|
| 71 |
27 |
qaztronic |
create_run -name synth_1 -part xc7z020clg484-1 -flow {Vivado Synthesis 2016} -strategy "Vivado Synthesis Defaults" -constrset constrs_1
|
| 72 |
15 |
qaztronic |
} else {
|
| 73 |
|
|
set_property strategy "Vivado Synthesis Defaults" [get_runs synth_1]
|
| 74 |
27 |
qaztronic |
set_property flow "Vivado Synthesis 2016" [get_runs synth_1]
|
| 75 |
15 |
qaztronic |
}
|
| 76 |
|
|
set obj [get_runs synth_1]
|
| 77 |
|
|
|
| 78 |
|
|
# set the current synth run
|
| 79 |
|
|
current_run -synthesis [get_runs synth_1]
|
| 80 |
|
|
|
| 81 |
|
|
# Create 'impl_1' run (if not found)
|
| 82 |
|
|
if {[string equal [get_runs -quiet impl_1] ""]} {
|
| 83 |
27 |
qaztronic |
create_run -name impl_1 -part xc7z020clg484-1 -flow {Vivado Implementation 2016} -strategy "Vivado Implementation Defaults" -constrset constrs_1 -parent_run synth_1
|
| 84 |
15 |
qaztronic |
} else {
|
| 85 |
|
|
set_property strategy "Vivado Implementation Defaults" [get_runs impl_1]
|
| 86 |
27 |
qaztronic |
set_property flow "Vivado Implementation 2016" [get_runs impl_1]
|
| 87 |
15 |
qaztronic |
}
|
| 88 |
|
|
set obj [get_runs impl_1]
|
| 89 |
|
|
|
| 90 |
|
|
# set the current impl run
|
| 91 |
|
|
current_run -implementation [get_runs impl_1]
|
| 92 |
|
|
|
| 93 |
|
|
# regenerate block diagrams
|
| 94 |
27 |
qaztronic |
source $origin_dir/../block_diagrams/zync_bd_16_2.tcl
|
| 95 |
15 |
qaztronic |
|
| 96 |
|
|
close_project -quiet
|
| 97 |
|
|
|
| 98 |
|
|
puts "INFO: Project created:$PROJECT_NAME"
|
| 99 |
|
|
|
| 100 |
|
|
|
| 101 |
|
|
|