axi_clkgen: Add enable parameters for secondary clock inputs/outputs
The secondary clock inputs and outputs of the axi_clkgen are rarely used. Add enable parameters that need to be explicitly set before they are available. This allows to hide the secondary clock pins when they are not used in the block design. There are currently no projects which use the secondary clock inputs or outputs so there is no need to set these new parameters anywhere. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>main
parent
886c818b72
commit
15ce8cc356
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue