Skip to content

Commit

Permalink
library/axi_ltc2387: Update GUI
Browse files Browse the repository at this point in the history
 * Added TWOLANES to the GUI
 * Changed the way these 3 parameters are created and displayed
   (ADC_RES, OUT_RES, TWOLANES)
 * ADC_RES and TWOLANES are user-selectable, but OUT_RES depends on
   ADC_RES, so a warning was added in the IP GUI
 * Fixed the default values on parameters (ADC_RES=18, OUT_RES=32, TWOLANES=1)

Signed-off-by: Iulia Moldovan <[email protected]>
  • Loading branch information
IuliaCMoldovan committed Oct 15, 2024
1 parent 64ad02f commit e1cab23
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 24 deletions.
8 changes: 4 additions & 4 deletions library/axi_ltc2387/axi_ltc2387_channel.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ***************************************************************************
// ***************************************************************************
// Copyright (C) 2021-2023 Analog Devices, Inc. All rights reserved.
// Copyright (C) 2021-2024 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
Expand Down Expand Up @@ -37,9 +37,9 @@

module axi_ltc2387_channel #(

parameter ADC_RES = 16,
parameter OUT_RES = 16,
parameter TWOLANES = 1,
parameter ADC_RES = 18, // 18-bit or 16-bit resolution
parameter OUT_RES = 32, // 32-bit for ADC_RES=18 or 16-bit for ADC_RES=16
parameter TWOLANES = 1, // 0 for one lane, 1 for two lanes
parameter USERPORTS_DISABLE = 0,
parameter DATAFORMAT_DISABLE = 0
) (
Expand Down
4 changes: 2 additions & 2 deletions library/axi_ltc2387/axi_ltc2387_if.v
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ module axi_ltc2387_if #(
parameter IO_DELAY_GROUP = "adc_if_delay_group",
parameter IODELAY_CTRL = 1,
parameter DELAY_REFCLK_FREQUENCY = 200,
parameter [0:0] TWOLANES = 1, // 0 for Single Lane, 1 for Two Lanes
parameter RESOLUTION = 16 // 16 or 18 bits
parameter TWOLANES = 1, // 0 for one-lane, 1 for two lanes
parameter RESOLUTION = 18 // 16 or 18 bits
) (

// delay interface
Expand Down
68 changes: 50 additions & 18 deletions library/axi_ltc2387/axi_ltc2387_ip.tcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
## Copyright (C) 2022-2023 Analog Devices, Inc. All rights reserved.
## Copyright (C) 2022-2024 Analog Devices, Inc. All rights reserved.
### SPDX short identifier: ADIBSD
###############################################################################

Expand Down Expand Up @@ -31,36 +31,68 @@ adi_ip_files axi_ltc2387 [list \

adi_ip_properties axi_ltc2387

ipx::infer_bus_interface ref_clk xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
ipx::infer_bus_interface dco_p xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]
ipx::infer_bus_interface dco_n xilinx.com:signal:clock_rtl:1.0 [ipx::current_core]

set cc [ipx::current_core]

set page0 [ipgui::get_pagespec -name "Page 0" -component $cc]

ipx::infer_bus_interface ref_clk xilinx.com:signal:clock_rtl:1.0 $cc
ipx::infer_bus_interface dco_p xilinx.com:signal:clock_rtl:1.0 $cc
ipx::infer_bus_interface dco_n xilinx.com:signal:clock_rtl:1.0 $cc

ipgui::add_static_text -name {Warning} -component $cc -parent $page0 -text {In one-lane mode, only 18-bit resolution is supported!
Output data width (OUT_RES) depends on ADC_RES!}

ipx::add_user_parameter ADC_RES $cc
set_property value_resolve_type user [ipx::get_user_parameters ADC_RES -of_objects $cc]
ipgui::add_param -name "ADC_RES" -component $cc -parent $page0
set_property -dict [list \
"display_name" "ADC resolution" \
"display_name" "ADC_RES" \
"layout" "horizontal" \
"tooltip" "ADC resolution" \
"widget" "radioGroup" \
] [ipgui::get_guiparamspec -name "ADC_RES" -component $cc]

set_property -dict [list \
"value_validation_type" "list" \
"value_validation_list" "16 18" \
] \
[ipx::get_user_parameters ADC_RES -of_objects $cc]
"value" "18" \
"value_format" "long" \
"value_validation_type" "list" \
"value_validation_list" "18 16" \
] [ipx::get_user_parameters ADC_RES -of_objects $cc]

# OUT_RES depends on the value of ADC_RES, and is set in the project
ipx::add_user_parameter OUT_RES $cc
set_property value_resolve_type user [ipx::get_user_parameters OUT_RES -of_objects $cc]
ipgui::add_param -name "OUT_RES" -component $cc -parent $page0
set_property -dict [list \
"display_name" "Output data width" \
"tooltip" "Memory interface" \
"display_name" "OUT_RES" \
"layout" "horizontal" \
"tooltip" "Output data width" \
"widget" "radioGroup" \
] [ipgui::get_guiparamspec -name "OUT_RES" -component $cc]

set_property -dict [list \
"value_validation_type" "list" \
"value_validation_list" "16 32" \
] \
[ipx::get_user_parameters OUT_RES -of_objects $cc]
"value" "32" \
"value_format" "long" \
"value_validation_type" "list" \
"value_validation_list" "32 16" \
] [ipx::get_user_parameters OUT_RES -of_objects $cc]

ipx::add_user_parameter TWOLANES $cc
set_property value_resolve_type user [ipx::get_user_parameters TWOLANES -of_objects $cc]
ipgui::add_param -name "TWOLANES" -component $cc -parent $page0
set_property -dict [list \
"display_name" "TWOLANES" \
"layout" "horizontal" \
"tooltip" "Two-lane mode (1) or one-lane mode (0)" \
"widget" "radioGroup" \
] [ipgui::get_guiparamspec -name "TWOLANES" -component $cc]

set_property -dict [list \
"value" "1" \
"value_format" "long" \
"value_validation_type" "list" \
"value_validation_list" "1 0" \
] [ipx::get_user_parameters TWOLANES -of_objects $cc]

ipx::save_core [ipx::current_core]
ipx::create_xgui_files $cc
ipx::update_checksums $cc
ipx::save_core $cc

0 comments on commit e1cab23

Please sign in to comment.