Skip to content
Snippets Groups Projects
Commit e7c32e48 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Use natural init values instead of integer to avoid issues with TO_UINT() and...

Use natural init values instead of integer to avoid issues with TO_UINT() and limited 32 bit VHDL integer range. Adjust v_sosi.data by -g_pkt_len instead of -1 to have first data with value g_data_init.
parent e0743e63
No related branches found
No related tags found
No related merge requests found
...@@ -48,10 +48,10 @@ ENTITY dp_stream_stimuli IS ...@@ -48,10 +48,10 @@ ENTITY dp_stream_stimuli IS
-- initializations -- initializations
g_sync_period : NATURAL := 10; g_sync_period : NATURAL := 10;
g_sync_offset : NATURAL := 7; g_sync_offset : NATURAL := 7;
g_data_init : INTEGER := -1; g_data_init : NATURAL := 0;
g_bsn_init : STD_LOGIC_VECTOR(c_dp_stream_bsn_w-1 DOWNTO 0) := X"0000000000000000"; -- X"0877665544332211" g_bsn_init : STD_LOGIC_VECTOR(c_dp_stream_bsn_w-1 DOWNTO 0) := X"0000000000000000"; -- X"0877665544332211"
g_err_init : NATURAL := 247; g_err_init : NATURAL := 247;
g_channel_init : INTEGER := 5; -- fixed g_channel_init : NATURAL := 5; -- fixed
-- specific -- specific
g_in_dat_w : NATURAL := 32; g_in_dat_w : NATURAL := 32;
g_nof_repeat : NATURAL := 5; g_nof_repeat : NATURAL := 5;
...@@ -117,7 +117,7 @@ BEGIN ...@@ -117,7 +117,7 @@ BEGIN
-- Adjust initial sosi field values by -1 to compensate for auto increment -- Adjust initial sosi field values by -1 to compensate for auto increment
v_sosi.bsn := INCR_UVEC(g_bsn_init, -1); v_sosi.bsn := INCR_UVEC(g_bsn_init, -1);
v_sosi.channel := INCR_UVEC(TO_DP_CHANNEL(g_channel_init), -1); v_sosi.channel := INCR_UVEC(TO_DP_CHANNEL(g_channel_init), -1);
v_sosi.data := INCR_UVEC(TO_DP_DATA(g_data_init), -1); v_sosi.data := INCR_UVEC(TO_DP_DATA(g_data_init), -g_pkt_len);
v_sosi.err := INCR_UVEC(TO_DP_ERROR(g_err_init), -1); v_sosi.err := INCR_UVEC(TO_DP_ERROR(g_err_init), -1);
i_src_out <= c_dp_sosi_rst; i_src_out <= c_dp_sosi_rst;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment