From e698b286e527063f34a387f4ab300f43b8c3916f Mon Sep 17 00:00:00 2001 From: Laszlo Nagy Date: Sat, 15 Feb 2020 02:41:26 +0000 Subject: [PATCH] jesd204: DAC TPL to support 64 channels --- .../ad_ip_jesd204_tpl_dac_ip.tcl | 2 +- library/jesd204/scripts/jesd204.tcl | 27 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/library/jesd204/ad_ip_jesd204_tpl_dac/ad_ip_jesd204_tpl_dac_ip.tcl b/library/jesd204/ad_ip_jesd204_tpl_dac/ad_ip_jesd204_tpl_dac_ip.tcl index 408703373..7bf3fe3a2 100644 --- a/library/jesd204/ad_ip_jesd204_tpl_dac/ad_ip_jesd204_tpl_dac_ip.tcl +++ b/library/jesd204/ad_ip_jesd204_tpl_dac/ad_ip_jesd204_tpl_dac_ip.tcl @@ -93,7 +93,7 @@ foreach p {DDS_CORDIC_DW DDS_CORDIC_PHASE_DW} { foreach {p v} { "NUM_LANES" "1 2 3 4 8 16" \ - "NUM_CHANNELS" "1 2 4 6 8 16 32" \ + "NUM_CHANNELS" "1 2 4 6 8 16 32 64" \ "BITS_PER_SAMPLE" "8 12 16" \ "CONVERTER_RESOLUTION" "8 11 12 16" \ "SAMPLES_PER_FRAME" "1 2 3 4 6 8 12 16" \ diff --git a/library/jesd204/scripts/jesd204.tcl b/library/jesd204/scripts/jesd204.tcl index c24ce1037..dbd7b50f6 100644 --- a/library/jesd204/scripts/jesd204.tcl +++ b/library/jesd204/scripts/jesd204.tcl @@ -254,9 +254,18 @@ proc adi_tpl_jesd204_tx_create {ip_name num_of_lanes num_of_converters samples_p if {$num_of_converters > 1} { # Concatenation and slicer cores - ad_ip_instance xlconcat "${ip_name}/data_concat" [list \ - NUM_PORTS $num_of_converters \ - ] + # xconcat limited to 32 input ports + for {set i 0} {$i < $num_of_converters} {incr i 32} { + ad_ip_instance xlconcat "${ip_name}/data_concat[expr $i/32]" [list \ + NUM_PORTS [expr min(32,$num_of_converters-$i)] \ + ] + } + # main concat + if {$num_of_converters > 32} { + ad_ip_instance xlconcat "${ip_name}/data_concat" [list \ + NUM_PORTS [expr int(ceil(double($num_of_converters)/32))] \ + ] + } for {set i 0} {$i < $num_of_converters} {incr i} { ad_ip_instance xlslice "${ip_name}/enable_slice_${i}" [list \ @@ -289,10 +298,18 @@ proc adi_tpl_jesd204_tx_create {ip_name num_of_lanes num_of_converters samples_p ad_connect ${ip_name}/enable_slice_$i/Dout ${ip_name}/dac_enable_$i ad_connect ${ip_name}/valid_slice_$i/Dout ${ip_name}/dac_valid_$i - ad_connect ${ip_name}/dac_data_$i ${ip_name}/data_concat/In$i + ad_connect ${ip_name}/dac_data_$i ${ip_name}/data_concat[expr $i/32]/In[expr $i%32] } - ad_connect ${ip_name}/data_concat/dout ${ip_name}/dac_tpl_core/dac_ddata + if {$num_of_converters > 32} { + # wire all concatenators together + for {set i 0} {$i < $num_of_converters} {incr i 32} { + ad_connect ${ip_name}/data_concat[expr $i/32]/dout ${ip_name}/data_concat/In[expr $i/32] + } + ad_connect ${ip_name}/data_concat/dout ${ip_name}/dac_tpl_core/dac_ddata + } else { + ad_connect ${ip_name}/data_concat0/dout ${ip_name}/dac_tpl_core/dac_ddata + } } else { ad_connect ${ip_name}/dac_data_0 ${ip_name}/dac_tpl_core/dac_ddata ad_connect ${ip_name}/dac_tpl_core/enable ${ip_name}/dac_enable_0