diff --git a/library/axi_clkgen/axi_clkgen_ip.tcl b/library/axi_clkgen/axi_clkgen_ip.tcl index d42cdc3f0..c74912019 100644 --- a/library/axi_clkgen/axi_clkgen_ip.tcl +++ b/library/axi_clkgen/axi_clkgen_ip.tcl @@ -17,8 +17,33 @@ adi_ip_properties axi_clkgen ipx::remove_bus_interface {clk} [ipx::current_core] ipx::associate_bus_interfaces -busif s_axi -clock s_axi_aclk [ipx::current_core] -set_property driver_value 0 [ipx::get_ports *clk2* -of_objects [ipx::current_core]] +set cc [ipx::current_core] +set page0 [ipgui::get_pagespec -name "Page 0" -component $cc] -ipx::save_core [ipx::current_core] +set param [ipx::add_user_parameter ENABLE_CLKIN2 $cc] +set_property -dict {value_resolve_type user value_format bool value false} $param +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 +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 + +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