Remove library/scripts/common_bd.tcl

Remove the script from the file list of the IPs that previously used it.
axi_clkgen: Add independent adi_auto_assign_device_spec proc
main
AndreiGrozav 2019-04-02 12:13:25 +03:00 committed by AndreiGrozav
parent 7dcaaea04e
commit 23841478c6
5 changed files with 34 additions and 68 deletions

View File

@ -9,13 +9,12 @@ adi_ip_files axi_clkgen [list \
"$ad_hdl_dir/library/xilinx/common/ad_mmcm_drp.v" \ "$ad_hdl_dir/library/xilinx/common/ad_mmcm_drp.v" \
"$ad_hdl_dir/library/common/up_axi.v" \ "$ad_hdl_dir/library/common/up_axi.v" \
"$ad_hdl_dir/library/common/up_clkgen.v" \ "$ad_hdl_dir/library/common/up_clkgen.v" \
"$ad_hdl_dir/library/scripts/common_bd.tcl" \
"$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \ "$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \
"bd/bd.tcl" \ "bd/bd.tcl" \
"axi_clkgen.v" ] "axi_clkgen.v" ]
adi_ip_properties axi_clkgen adi_ip_properties axi_clkgen
adi_ip_bd axi_clkgen "bd/bd.tcl $ad_hdl_dir/library/scripts/common_bd.tcl" adi_ip_bd axi_clkgen "bd/bd.tcl"
ipx::infer_bus_interface clk xilinx.com:signal:clock_rtl:1.0 [ipx::current_core] ipx::infer_bus_interface clk xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
ipx::infer_bus_interface clk2 xilinx.com:signal:clock_rtl:1.0 [ipx::current_core] ipx::infer_bus_interface clk2 xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]

View File

@ -48,9 +48,6 @@ proc init {cellpath otherInfo} {
DEV_PACKAGE \ DEV_PACKAGE \
FPGA_VOLTAGE" FPGA_VOLTAGE"
set ip_path [bd::get_vlnv_dir [get_property VLNV $ip]]
source ${ip_path}../scripts/common_bd.tcl
adi_auto_assign_device_spec $cellpath adi_auto_assign_device_spec $cellpath
} }
@ -69,6 +66,39 @@ proc axi_clkgen_get_infer_period {ip param clk_name} {
} }
} }
proc adi_auto_assign_device_spec {cellpath} {
set ip [get_bd_cells $cellpath]
set ip_param_list [list_property $ip]
set ip_path [bd::get_vlnv_dir [get_property VLNV $ip]]
set parent_dir "../"
for {set x 1} {$x<=4} {incr x} {
set linkname ${ip_path}${parent_dir}scripts/adi_xilinx_device_info_enc.tcl
if { [file exists $linkname] } {
source ${ip_path}${parent_dir}/scripts/adi_xilinx_device_info_enc.tcl
break
}
append parent_dir "../"
}
# Find predefindes auto assignable parameters
foreach i $auto_set_param_list {
if { [lsearch $ip_param_list "CONFIG.$i"] > 0 } {
set val [adi_device_spec $cellpath $i]
set_property CONFIG.$i $val $ip
}
}
# Find predefindes auto assignable/overwritable parameters
foreach i $auto_set_param_list_overwritable {
if { [lsearch $ip_param_list "CONFIG.$i"] > 0 } {
set val [adi_device_spec $cellpath $i]
set_property CONFIG.$i $val $ip
}
}
}
proc propagate {cellpath otherinfo} { proc propagate {cellpath otherinfo} {
set ip [get_bd_cells $cellpath] set ip [get_bd_cells $cellpath]

View File

@ -1,61 +0,0 @@
## ***************************************************************************
## ***************************************************************************
## Copyright 2014 - 2018 (c) Analog Devices, Inc. All rights reserved.
##
## In this HDL repository, there are many different and unique modules, consisting
## of various HDL (Verilog or VHDL) components. The individual modules are
## developed independently, and may be accompanied by separate and unique license
## terms.
##
## The user should read each of these license terms, and understand the
## freedoms and responsibilities that he or she has by using this source/core.
##
## This core is distributed in the hope that it will be useful, but WITHOUT ANY
## WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
## A PARTICULAR PURPOSE.
##
## Redistribution and use of source or resulting binaries, with or without modification
## of this file, are permitted under one of the following two license terms:
##
## 1. The GNU General Public License version 2 as published by the
## Free Software Foundation, which can be found in the top level directory
## of this repository (LICENSE_GPL2), and also online at:
## <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
##
## OR
##
## 2. An ADI specific BSD license, which can be found in the top level directory
## of this repository (LICENSE_ADIBSD), and also on-line at:
## https://github.com/analogdevicesinc/hdl/blob/master/LICENSE_ADIBSD
## This will allow to generate bit files and not release the source code,
## as long as it attaches to an ADI device.
##
## ***************************************************************************
## ***************************************************************************
# auto set parameters defined in auto_set_param_list (adi_xilinx_device_info_enc.tcl)
proc adi_auto_assign_device_spec {cellpath} {
set ip [get_bd_cells $cellpath]
set ip_param_list [list_property $ip]
set ip_path [bd::get_vlnv_dir [get_property VLNV $ip]]
set parent_dir "../"
for {set x 1} {$x<=4} {incr x} {
set linkname ${ip_path}${parent_dir}scripts/adi_xilinx_device_info_enc.tcl
if { [file exists $linkname] } {
source ${ip_path}${parent_dir}/scripts/adi_xilinx_device_info_enc.tcl
break
}
append parent_dir "../"
}
# Find predefindes auto assignable parameters
foreach i $auto_set_param_list {
if { [lsearch $ip_param_list "CONFIG.$i"] > 0 } {
set val [adi_device_spec $cellpath $i]
set_property CONFIG.$i $val $ip
}
}
}

View File

@ -6,7 +6,6 @@ source $ad_hdl_dir/library/scripts/adi_ip.tcl
adi_ip_create axi_adxcvr adi_ip_create axi_adxcvr
adi_ip_files axi_adxcvr [list \ adi_ip_files axi_adxcvr [list \
"$ad_hdl_dir/library/common/up_axi.v" \ "$ad_hdl_dir/library/common/up_axi.v" \
"$ad_hdl_dir/library/scripts/common_bd.tcl" \
"$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \ "$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \
"axi_adxcvr_es.v" \ "axi_adxcvr_es.v" \
"axi_adxcvr_up.v" \ "axi_adxcvr_up.v" \

View File

@ -5,7 +5,6 @@ source $ad_hdl_dir/library/scripts/adi_ip.tcl
adi_ip_create util_adxcvr adi_ip_create util_adxcvr
adi_ip_files util_adxcvr [list \ adi_ip_files util_adxcvr [list \
"$ad_hdl_dir/library/scripts/common_bd.tcl" \
"$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \ "$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \
"util_adxcvr_constr.xdc" \ "util_adxcvr_constr.xdc" \
"util_adxcvr_xcm.v" \ "util_adxcvr_xcm.v" \