2014-03-01 02:17:01 +00:00
|
|
|
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "none"
|
2014-03-01 02:17:01 +00:00
|
|
|
|
2014-11-25 17:34:44 +00:00
|
|
|
if {![info exists REQUIRED_VIVADO_VERSION]} {
|
|
|
|
set REQUIRED_VIVADO_VERSION "2014.2"
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[info exists ::env(ADI_IGNORE_VERSION_CHECK)]} {
|
|
|
|
set IGNORE_VERSION_CHECK 1
|
|
|
|
} elseif {![info exists IGNORE_VERSION_CHECK]} {
|
|
|
|
set IGNORE_VERSION_CHECK 0
|
|
|
|
}
|
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
proc adi_project_create {project_name} {
|
|
|
|
|
2014-03-03 15:06:36 +00:00
|
|
|
global ad_hdl_dir
|
|
|
|
global ad_phdl_dir
|
2014-03-11 13:57:59 +00:00
|
|
|
global xl_board
|
2014-11-25 17:34:44 +00:00
|
|
|
global REQUIRED_VIVADO_VERSION
|
|
|
|
global IGNORE_VERSION_CHECK
|
2014-03-03 15:06:36 +00:00
|
|
|
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "none"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "none"
|
|
|
|
set project_board "none"
|
|
|
|
|
2014-05-06 13:29:21 +00:00
|
|
|
if [regexp "_ml605$" $project_name] {
|
|
|
|
set xl_board "ml605"
|
|
|
|
set project_part "xc6vlx240tff1156-1"
|
|
|
|
set project_board "ml605"
|
|
|
|
}
|
2014-03-01 02:17:01 +00:00
|
|
|
if [regexp "_ac701$" $project_name] {
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "ac701"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "xc7a200tfbg676-2"
|
|
|
|
set project_board "xilinx.com:artix7:ac701:1.0"
|
|
|
|
}
|
|
|
|
if [regexp "_kc705$" $project_name] {
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "kc705"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "xc7k325tffg900-2"
|
|
|
|
set project_board "xilinx.com:kintex7:kc705:1.1"
|
|
|
|
}
|
|
|
|
if [regexp "_vc707$" $project_name] {
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "vc707"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "xc7vx485tffg1761-2"
|
|
|
|
set project_board "xilinx.com:virtex7:vc707:1.1"
|
|
|
|
}
|
2014-04-26 01:56:58 +00:00
|
|
|
if [regexp "_kcu105$" $project_name] {
|
|
|
|
set xl_board "kcu105"
|
|
|
|
set project_part "xcku040-ffva1156-2-e-es1"
|
|
|
|
set project_board "not-applicable"
|
|
|
|
}
|
2014-03-01 02:17:01 +00:00
|
|
|
if [regexp "_zed$" $project_name] {
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "zed"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "xc7z020clg484-1"
|
|
|
|
set project_board "em.avnet.com:zynq:zed:d"
|
|
|
|
}
|
|
|
|
if [regexp "_zc702$" $project_name] {
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "zc702"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "xc7z020clg484-1"
|
|
|
|
set project_board "xilinx.com:zynq:zc702:1.0"
|
|
|
|
}
|
|
|
|
if [regexp "_zc706$" $project_name] {
|
2014-03-11 13:57:59 +00:00
|
|
|
set xl_board "zc706"
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_part "xc7z045ffg900-2"
|
2014-09-22 14:28:13 +00:00
|
|
|
set project_board "xilinx.com:zc706:part0:1.0"
|
2014-03-01 02:17:01 +00:00
|
|
|
}
|
|
|
|
|
2014-06-02 08:08:03 +00:00
|
|
|
if [regexp "_mitx045$" $project_name] {
|
|
|
|
set xl_board "mitx045"
|
|
|
|
set project_part "xc7z045ffg900-2"
|
2014-11-18 08:04:39 +00:00
|
|
|
set project_board "em.avnet.com:mini_itx_7z045:part0:1.0"
|
2014-06-02 08:08:03 +00:00
|
|
|
}
|
|
|
|
|
2014-05-06 13:29:21 +00:00
|
|
|
# planahead - 6 and down
|
|
|
|
|
|
|
|
if {$xl_board eq "ml605"} {
|
|
|
|
|
|
|
|
set project_system_dir "./$project_name.srcs/sources_1/edk/$xl_board"
|
|
|
|
|
|
|
|
create_project $project_name . -part $project_part -force
|
|
|
|
set_property board $project_board [current_project]
|
|
|
|
|
|
|
|
import_files -norecurse $ad_hdl_dir/projects/common/ml605/system.xmp
|
|
|
|
|
|
|
|
generate_target {synthesis implementation} [get_files $project_system_dir/system.xmp]
|
|
|
|
make_wrapper -files [get_files $project_system_dir/system.xmp] -top
|
|
|
|
import_files -force -norecurse -fileset sources_1 $project_system_dir/system_stub.v
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
# vivado - 7 and up
|
|
|
|
|
2014-11-25 17:34:44 +00:00
|
|
|
if {!$IGNORE_VERSION_CHECK && [string compare [version -short] $REQUIRED_VIVADO_VERSION] != 0} {
|
|
|
|
return -code error [format "ERROR: This project requires Vivado %s." $REQUIRED_VIVADO_VERSION]
|
|
|
|
}
|
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_system_dir "./$project_name.srcs/sources_1/bd/system"
|
|
|
|
|
|
|
|
create_project $project_name . -part $project_part -force
|
2014-04-26 01:56:58 +00:00
|
|
|
if {$project_board ne "not-applicable"} {
|
|
|
|
set_property board $project_board [current_project]
|
|
|
|
}
|
2014-03-03 15:06:36 +00:00
|
|
|
|
|
|
|
set lib_dirs $ad_hdl_dir/library
|
|
|
|
if {$ad_hdl_dir ne $ad_phdl_dir} {
|
|
|
|
lappend lib_dirs $ad_phdl_dir/library
|
|
|
|
}
|
|
|
|
|
|
|
|
set_property ip_repo_paths $lib_dirs [current_fileset]
|
2014-03-01 02:17:01 +00:00
|
|
|
update_ip_catalog
|
|
|
|
|
2014-10-17 18:35:35 +00:00
|
|
|
set_msg_config -id {BD 41-1348} -new_severity info
|
2014-10-24 17:38:31 +00:00
|
|
|
set_msg_config -id {BD 41-1343} -new_severity info
|
2014-10-15 18:42:04 +00:00
|
|
|
set_msg_config -id {BD 41-1306} -new_severity info
|
|
|
|
set_msg_config -id {IP_Flow 19-1687} -new_severity info
|
|
|
|
set_msg_config -id {filemgmt 20-1763} -new_severity info
|
2014-11-13 16:55:43 +00:00
|
|
|
set_msg_config -severity {CRITICAL WARNING} -quiet -id {BD 41-1276} -new_severity error
|
2014-10-15 18:42:04 +00:00
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
create_bd_design "system"
|
|
|
|
source system_bd.tcl
|
|
|
|
|
2014-06-25 13:20:14 +00:00
|
|
|
save_bd_design
|
|
|
|
validate_bd_design
|
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
generate_target {synthesis implementation} [get_files $project_system_dir/system.bd]
|
|
|
|
make_wrapper -files [get_files $project_system_dir/system.bd] -top
|
|
|
|
import_files -force -norecurse -fileset sources_1 $project_system_dir/hdl/system_wrapper.v
|
|
|
|
}
|
|
|
|
|
|
|
|
proc adi_project_files {project_name project_files} {
|
|
|
|
|
2014-03-03 15:06:36 +00:00
|
|
|
global ad_hdl_dir
|
|
|
|
global ad_phdl_dir
|
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
add_files -norecurse -fileset sources_1 $project_files
|
|
|
|
set_property top system_top [current_fileset]
|
|
|
|
}
|
|
|
|
|
|
|
|
proc adi_project_run {project_name} {
|
|
|
|
|
2014-03-03 15:06:36 +00:00
|
|
|
global ad_hdl_dir
|
|
|
|
global ad_phdl_dir
|
2014-05-06 13:29:21 +00:00
|
|
|
global xl_board
|
|
|
|
|
|
|
|
# planahead - 6 and down
|
|
|
|
|
|
|
|
if {$xl_board eq "ml605"} {
|
|
|
|
|
|
|
|
set project_system_dir "./$project_name.srcs/sources_1/edk/$xl_board"
|
|
|
|
|
|
|
|
set_property strategy MapTiming [get_runs impl_1]
|
|
|
|
set_property strategy TimingWithIOBPacking [get_runs synth_1]
|
|
|
|
|
|
|
|
launch_runs synth_1
|
|
|
|
wait_on_run synth_1
|
|
|
|
open_run synth_1
|
|
|
|
report_timing -file timing_synth.log
|
|
|
|
|
|
|
|
launch_runs impl_1 -to_step bitgen
|
|
|
|
wait_on_run impl_1
|
|
|
|
open_run impl_1
|
|
|
|
report_timing -file timing_impl.log
|
|
|
|
|
|
|
|
# -- Unable to find an equivalent
|
|
|
|
#if [expr [get_property SLACK [get_timing_paths]] < 0] {
|
|
|
|
# puts "ERROR: Timing Constraints NOT met."
|
|
|
|
# use_this_invalid_command_to_crash
|
|
|
|
#}
|
|
|
|
|
|
|
|
export_hardware [get_files $project_system_dir/system.xmp] [get_runs impl_1] -bitstream
|
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
# vivado - 7 and up
|
2014-03-03 15:06:36 +00:00
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
set project_system_dir "./$project_name.srcs/sources_1/bd/system"
|
|
|
|
|
2014-03-07 09:06:11 +00:00
|
|
|
set_property constrs_type XDC [current_fileset -constrset]
|
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
launch_runs synth_1
|
|
|
|
wait_on_run synth_1
|
|
|
|
open_run synth_1
|
|
|
|
report_timing_summary -file timing_synth.log
|
|
|
|
|
2014-03-19 14:42:44 +00:00
|
|
|
set_property STEPS.PHYS_OPT_DESIGN.IS_ENABLED true [get_runs impl_1]
|
|
|
|
set_property STEPS.PHYS_OPT_DESIGN.ARGS.DIRECTIVE Explore [get_runs impl_1]
|
2014-04-07 12:02:38 +00:00
|
|
|
set_property STRATEGY "Performance_Explore" [get_runs impl_1]
|
2014-03-19 14:42:44 +00:00
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
launch_runs impl_1 -to_step write_bitstream
|
|
|
|
wait_on_run impl_1
|
|
|
|
open_run impl_1
|
|
|
|
report_timing_summary -file timing_impl.log
|
|
|
|
|
|
|
|
#get_property STATS.THS [get_runs impl_1]
|
|
|
|
#get_property STATS.TNS [get_runs impl_1]
|
|
|
|
#get_property STATS.TPWS [get_runs impl_1]
|
|
|
|
|
2014-10-27 13:57:20 +00:00
|
|
|
export_hardware [get_files $project_system_dir/system.bd] [get_runs impl_1] -bitstream
|
|
|
|
|
2014-03-01 02:17:01 +00:00
|
|
|
if [expr [get_property SLACK [get_timing_paths]] < 0] {
|
|
|
|
puts "ERROR: Timing Constraints NOT met."
|
|
|
|
use_this_invalid_command_to_crash
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|