From 7ad0797ba4efd0aad26266bbae1a96b226be603a Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Wed, 1 Nov 2023 16:20:18 +0100 Subject: [PATCH] Add missing g_use_complex condition. --- libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd b/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd index 742233ad29..52c549b540 100644 --- a/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd +++ b/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd @@ -177,12 +177,15 @@ begin v_last.channel := TO_DP_CHANNEL(g_channel_init + (g_nof_repeat - 1) * g_channel_incr); v_last.err := TO_DP_ERROR(g_err_init + (g_nof_repeat - 1) * g_err_incr); -- . account for g_pkt_len - v_last.data := INCR_UVEC(v_sosi.data, g_pkt_len - 1); - v_last.data := RESIZE_DP_DATA(v_last.data(g_in_dat_w - 1 downto 0)); -- wrap when >= 2**g_in_dat_w - v_last.re := INCR_UVEC(v_sosi.re, g_pkt_len - 1); - v_last.re := RESIZE_DP_DSP_DATA(v_last.re(g_in_dat_w - 1 downto 0)); -- wrap when >= 2**g_in_dat_w - v_last.im := INCR_UVEC(v_sosi.im, g_pkt_len - 1); - v_last.im := RESIZE_DP_DSP_DATA(v_last.im(g_in_dat_w - 1 downto 0)); -- wrap when >= 2**g_in_dat_w + if g_use_complex = false then + v_last.data := INCR_UVEC(v_sosi.data, g_pkt_len - 1); + v_last.data := RESIZE_DP_DATA(v_last.data(g_in_dat_w - 1 downto 0)); -- wrap when >= 2**g_in_dat_w + else + v_last.re := INCR_UVEC(v_sosi.re, g_pkt_len - 1); + v_last.re := RESIZE_DP_DSP_DATA(v_last.re(g_in_dat_w - 1 downto 0)); -- wrap when >= 2**g_in_dat_w + v_last.im := INCR_UVEC(v_sosi.im, g_pkt_len - 1); + v_last.im := RESIZE_DP_DSP_DATA(v_last.im(g_in_dat_w - 1 downto 0)); -- wrap when >= 2**g_in_dat_w + end if; last_snk_in <= v_last; -- Signal end of stimuli -- GitLab