2023-07-06 12:08:22 +00:00
|
|
|
###############################################################################
|
|
|
|
## Copyright (C) 2014-2023 Analog Devices, Inc. All rights reserved.
|
|
|
|
### SPDX short identifier: ADIBSD
|
|
|
|
###############################################################################
|
2015-06-26 09:04:19 +00:00
|
|
|
|
2023-07-06 12:08:22 +00:00
|
|
|
# ip
|
2022-07-12 11:06:15 +00:00
|
|
|
source ../../scripts/adi_env.tcl
|
2018-08-14 09:59:39 +00:00
|
|
|
source $ad_hdl_dir/library/scripts/adi_ip_xilinx.tcl
|
2015-06-26 09:04:19 +00:00
|
|
|
|
|
|
|
adi_ip_create axi_clkgen
|
|
|
|
adi_ip_files axi_clkgen [list \
|
|
|
|
"$ad_hdl_dir/library/common/ad_rst.v" \
|
2016-08-05 15:00:34 +00:00
|
|
|
"$ad_hdl_dir/library/xilinx/common/ad_mmcm_drp.v" \
|
2015-06-26 09:04:19 +00:00
|
|
|
"$ad_hdl_dir/library/common/up_axi.v" \
|
|
|
|
"$ad_hdl_dir/library/common/up_clkgen.v" \
|
2019-01-11 08:54:16 +00:00
|
|
|
"$ad_hdl_dir/library/scripts/adi_xilinx_device_info_enc.tcl" \
|
2017-04-20 17:20:26 +00:00
|
|
|
"bd/bd.tcl" \
|
2015-06-26 09:04:19 +00:00
|
|
|
"axi_clkgen.v" ]
|
|
|
|
|
|
|
|
adi_ip_properties axi_clkgen
|
2019-04-02 09:13:25 +00:00
|
|
|
adi_ip_bd axi_clkgen "bd/bd.tcl"
|
2015-06-26 09:04:19 +00:00
|
|
|
|
2021-10-20 15:08:35 +00:00
|
|
|
set_property company_url {https://wiki.analog.com/resources/fpga/docs/axi_clkgen} [ipx::current_core]
|
|
|
|
|
2017-04-20 17:22:23 +00:00
|
|
|
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 clk_0 xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
|
|
|
|
ipx::infer_bus_interface clk_1 xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
|
|
|
|
|
2017-04-20 17:21:05 +00:00
|
|
|
set cc [ipx::current_core]
|
|
|
|
set page0 [ipgui::get_pagespec -name "Page 0" -component $cc]
|
2015-11-06 15:55:29 +00:00
|
|
|
|
2017-04-20 17:21:05 +00:00
|
|
|
set param [ipx::add_user_parameter ENABLE_CLKIN2 $cc]
|
|
|
|
set_property -dict {value_resolve_type user value_format bool value false} $param
|
2015-06-26 09:04:19 +00:00
|
|
|
|
2017-04-20 17:21:05 +00:00
|
|
|
set param [ipgui::add_param -name {ENABLE_CLKIN2} -component $cc -parent $page0]
|
|
|
|
set_property -dict [list \
|
|
|
|
display_name {Enable secondary clock input} \
|
|
|
|
widget {checkBox} \
|
|
|
|
] $param
|
2015-06-26 09:04:19 +00:00
|
|
|
|
2017-04-20 17:21:05 +00:00
|
|
|
set param [ipx::add_user_parameter ENABLE_CLKOUT1 $cc]
|
|
|
|
set_property -dict {value_resolve_type user value_format bool value false} $param
|
|
|
|
|
|
|
|
set param [ipgui::add_param -name {ENABLE_CLKOUT1} -component $cc -parent $page0]
|
|
|
|
set_property -dict [list \
|
|
|
|
display_name {Enable secondary clock output} \
|
|
|
|
widget {checkBox} \
|
|
|
|
] $param
|
|
|
|
|
2019-01-11 08:54:16 +00:00
|
|
|
adi_add_auto_fpga_spec_params
|
|
|
|
ipx::create_xgui_files [ipx::current_core]
|
|
|
|
|
2017-04-20 17:21:05 +00:00
|
|
|
set_property enablement_tcl_expr {$ENABLE_CLKIN2} [ipx::get_user_parameters CLKIN2_PERIOD -of_objects $cc]
|
|
|
|
set_property enablement_tcl_expr {$ENABLE_CLKOUT1} [ipx::get_user_parameters CLK1_DIV -of_objects $cc]
|
|
|
|
set_property enablement_tcl_expr {$ENABLE_CLKOUT1} [ipx::get_user_parameters CLK1_PHASE -of_objects $cc]
|
|
|
|
|
|
|
|
adi_set_ports_dependency clk2 ENABLE_CLKIN2 0
|
|
|
|
adi_set_ports_dependency clk_1 ENABLE_CLKOUT1
|
|
|
|
|
|
|
|
ipx::create_xgui_files $cc
|
|
|
|
ipx::save_core $cc
|