jesd204: DAC TPL to support 64 channels

main
Laszlo Nagy 2020-02-15 02:41:26 +00:00 committed by Laszlo Nagy
parent 62eb5a067d
commit e698b286e5
2 changed files with 23 additions and 6 deletions

View File

@ -93,7 +93,7 @@ foreach p {DDS_CORDIC_DW DDS_CORDIC_PHASE_DW} {
foreach {p v} { foreach {p v} {
"NUM_LANES" "1 2 3 4 8 16" \ "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" \ "BITS_PER_SAMPLE" "8 12 16" \
"CONVERTER_RESOLUTION" "8 11 12 16" \ "CONVERTER_RESOLUTION" "8 11 12 16" \
"SAMPLES_PER_FRAME" "1 2 3 4 6 8 12 16" \ "SAMPLES_PER_FRAME" "1 2 3 4 6 8 12 16" \

View File

@ -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} { if {$num_of_converters > 1} {
# Concatenation and slicer cores # Concatenation and slicer cores
ad_ip_instance xlconcat "${ip_name}/data_concat" [list \ # xconcat limited to 32 input ports
NUM_PORTS $num_of_converters \ 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} { for {set i 0} {$i < $num_of_converters} {incr i} {
ad_ip_instance xlslice "${ip_name}/enable_slice_${i}" [list \ 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}/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}/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 { } else {
ad_connect ${ip_name}/dac_data_0 ${ip_name}/dac_tpl_core/dac_ddata 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 ad_connect ${ip_name}/dac_tpl_core/enable ${ip_name}/dac_enable_0