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

Fixed v.src_out.empty and snk_out.ready in dp_repack_out. The snk_out.ready...

Fixed v.src_out.empty and snk_out.ready in dp_repack_out. The snk_out.ready derivation is now similar in both dp_repack_in and dp_repack_out. The tb_tb works for active flow controls, not yet for random.
parent 5c22401b
No related branches found
No related tags found
No related merge requests found
......@@ -216,6 +216,10 @@ ARCHITECTURE rtl OF dp_repack_in IS
SIGNAL r : t_reg;
SIGNAL nxt_r : t_reg;
-- Debug signals
SIGNAL snk_in_data : STD_LOGIC_VECTOR(g_in_dat_w-1 DOWNTO 0);
SIGNAL src_out_data : STD_LOGIC_VECTOR(c_in_buf_dat_w-1 DOWNTO 0);
SIGNAL dbg_g_in_dat_w : NATURAL := g_in_dat_w;
SIGNAL dbg_in_nof_words : NATURAL := g_in_nof_words;
SIGNAL dbg_in_symbol_w : NATURAL := g_in_symbol_w;
......@@ -339,7 +343,10 @@ BEGIN
--------------------------------------------------------------------------
-- Wired output
snk_in_data <= snk_in.data(g_in_dat_w-1 DOWNTO 0);
src_out <= r.src_out;
src_out_data <= r.src_out.data(c_in_buf_dat_w-1 DOWNTO 0);
--------------------------------------------------------------------------
-- Flow control
......@@ -411,6 +418,10 @@ ARCHITECTURE rtl OF dp_repack_out IS
SIGNAL r : t_reg;
SIGNAL nxt_r : t_reg;
-- Debug signals
SIGNAL snk_in_data : STD_LOGIC_VECTOR(g_in_buf_dat_w-1 DOWNTO 0);
SIGNAL src_out_data : STD_LOGIC_VECTOR(g_out_dat_w-1 DOWNTO 0);
SIGNAL dbg_g_in_buf_dat_w : NATURAL := g_in_buf_dat_w;
SIGNAL dbg_g_out_dat_w : NATURAL := g_out_dat_w;
SIGNAL dbg_out_nof_words : NATURAL := g_out_nof_words;
......@@ -493,7 +504,7 @@ BEGIN
-- fill in local empty if this is the last subsection of a block
IF v.eos='1' THEN
IF snk_in.eop='1' THEN
IF v.hold_out.eop='1' THEN
v.src_out.empty := TO_DP_EMPTY(v.empty_bit_cnt - v.pack_bit_cnt); -- in nof bits
v.src_out.empty := SHIFT_UVEC(v.src_out.empty, c_out_empty_lo); -- in nof symbols
END IF;
......@@ -553,7 +564,10 @@ BEGIN
--------------------------------------------------------------------------
-- Wired output
snk_in_data <= snk_in.data(g_in_buf_dat_w-1 DOWNTO 0);
src_out <= r.src_out;
src_out_data <= r.src_out.data(g_out_dat_w-1 DOWNTO 0);
--------------------------------------------------------------------------
-- Flow control
......@@ -568,7 +582,7 @@ BEGIN
END PROCESS;
-- combined local and remote src_in flow control
snk_out.ready <= r_snk_out.ready WHEN r.hold_out.valid='0' ELSE src_in.ready; -- if there is pending output then the src_in ready determines the flow control
snk_out.ready <= r_snk_out.ready WHEN nxt_r.hold_out.valid='0' ELSE src_in.ready; -- if there is pending output then the src_in ready determines the flow control
snk_out.xon <= src_in.xon; -- just pass on the xon/off frame flow control
END rtl;
......
......@@ -27,7 +27,7 @@ USE dp_lib.tb_dp_pkg.ALL;
-- Purpose: Verify multiple variations of tb_dp_repack_dev
-- Description:
-- Usage:
-- > as 3
-- > as 5
-- > run -all
ENTITY tb_tb_dp_repack_dev IS
......@@ -38,11 +38,13 @@ ARCHITECTURE tb OF tb_tb_dp_repack_dev IS
CONSTANT c_nof_repeat : NATURAL := 10;
CONSTANT c_flow : t_dp_flow_control_enum_arr := c_dp_flow_control_enum_arr;
BEGIN
-- -- general
-- g_flow_control_stimuli : t_dp_flow_control_enum := e_active; -- always active, random or pulse flow control
-- g_flow_control_verify : t_dp_flow_control_enum := e_active; -- always active, random or pulse flow control
-- g_flow_control_stimuli : t_dp_flow_control_enum := e_active; -- always e_active, e_random or e_pulse flow control
-- g_flow_control_verify : t_dp_flow_control_enum := e_active; -- always e_active, e_random or e_pulse flow control
-- -- specific
-- g_in_dat_w : NATURAL := 16;
-- g_in_nof_words : NATURAL := 2;
......@@ -53,40 +55,40 @@ BEGIN
-- g_pkt_len : NATURAL := 2;
-- g_pkt_gap : NATURAL := 0
g_flow_control_stimuli : FOR I IN 0 TO 0 GENERATE -- 0 = e_active, 1 = e_random, 2 = e_pulse
g_flow_control_verify : FOR J IN 0 TO 0 GENERATE -- 0 = e_active, 1 = e_random, 2 = e_pulse
-- no repack
u_act_act_16_1_16_1_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 16, 1, 16, 1, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len > g_in_nof_words
u_act_act_16_1_16_1_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 16, 1, 16, 1, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len > g_in_nof_words, odd
u_act_act_16_1_16_1_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 16, 1, 16, 1, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len > g_in_nof_words, even
u_act_act_16_1_16_1_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 16, 1, 16, 1, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len = g_in_nof_words
u_16_1_16_1_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 16, 1, 16, 1, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len > g_in_nof_words
u_16_1_16_1_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 16, 1, 16, 1, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len > g_in_nof_words, odd
u_16_1_16_1_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 16, 1, 16, 1, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len > g_in_nof_words, even
u_16_1_16_1_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 16, 1, 16, 1, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len = g_in_nof_words
u_act_act_16_1_16_1_len_1_gap_1 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 16, 1, 16, 1, FALSE, c_nof_repeat, 1, 1); -- g_pkt_gap > 0
u_16_1_16_1_len_1_gap_1 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 16, 1, 16, 1, FALSE, c_nof_repeat, 1, 1); -- g_pkt_gap > 0
-- g_in_nof_words > g_pack_nof_words can use always active stimuli except when g_pkt_len MOD g_in_nof_words /= 0, because then the input stage needs to flush
u_act_act_8_4_32_1_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 8, 4, 32, 1, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len < g_in_nof_words
u_act_act_8_4_32_1_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 8, 4, 32, 1, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len = g_in_nof_words
u_act_act_8_4_32_1_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 8, 4, 32, 1, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len > g_in_nof_words, MOD /= 0
u_act_act_8_4_32_1_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 8, 4, 32, 1, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len > g_in_nof_words, MOD /= 0
u_act_act_8_4_32_1_len_11_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 8, 4, 32, 1, FALSE, c_nof_repeat, 11, 0); -- g_pkt_len > g_in_nof_words, MOD /= 0
u_act_act_8_4_32_1_len_12_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 8, 4, 32, 1, FALSE, c_nof_repeat, 12, 0); -- g_pkt_len > g_in_nof_words, MOD = 0
u_8_4_32_1_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 8, 4, 32, 1, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len < g_in_nof_words
u_8_4_32_1_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 8, 4, 32, 1, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len = g_in_nof_words
u_8_4_32_1_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 8, 4, 32, 1, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len > g_in_nof_words, MOD /= 0
u_8_4_32_1_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 8, 4, 32, 1, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len > g_in_nof_words, MOD /= 0
u_8_4_32_1_len_11_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 8, 4, 32, 1, FALSE, c_nof_repeat, 11, 0); -- g_pkt_len > g_in_nof_words, MOD /= 0
u_8_4_32_1_len_12_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 8, 4, 32, 1, FALSE, c_nof_repeat, 12, 0); -- g_pkt_len > g_in_nof_words, MOD = 0
-- g_in_nof_words < g_pack_nof_words will apply backpressure, because the output stage needs to output more
u_act_act_32_1_8_4_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 32, 1, 8, 4, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len = g_in_nof_words
u_act_act_32_1_8_4_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 32, 1, 8, 4, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len > g_in_nof_words
u_act_act_32_1_8_4_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 32, 1, 8, 4, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len > g_in_nof_words
u_act_act_32_1_8_4_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 32, 1, 8, 4, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len > g_in_nof_words
u_act_act_32_1_8_4_len_11_gap_1 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 32, 1, 8, 4, FALSE, c_nof_repeat, 11, 1); -- g_pkt_gap > 0
u_32_1_8_4_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 32, 1, 8, 4, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len = g_in_nof_words
u_32_1_8_4_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 32, 1, 8, 4, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len > g_in_nof_words
u_32_1_8_4_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 32, 1, 8, 4, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len > g_in_nof_words
u_32_1_8_4_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 32, 1, 8, 4, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len > g_in_nof_words
u_32_1_8_4_len_11_gap_1 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 32, 1, 8, 4, FALSE, c_nof_repeat, 11, 1); -- g_pkt_gap > 0
-- g_in_nof_words > 1 and g_pack_nof_words > 1
--u_act_act_24_2_16_3_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 24, 2, 16, 3, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len < g_in_nof_words
u_act_act_24_2_16_3_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 24, 2, 16, 3, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len = g_in_nof_words
--u_act_act_24_2_16_3_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 24, 2, 16, 3, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len = fractional multiple of g_in_nof_words
u_act_act_24_2_16_3_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (e_active, e_active, 24, 2, 16, 3, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len = integer multiple of g_in_nof_words
--u_rnd_act_16_2_8_4_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP ( e_random, e_active, 16, 2, 8, 4, FALSE, c_nof_repeat, 4, 0);
--u_rnd_rnd_16_2_8_4_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP ( e_random, e_random, 16, 2, 8, 4, FALSE, c_nof_repeat, 6, 0);
--u_pls_pls_16_2_8_4_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP ( e_pulse, e_pulse, 16, 2, 8, 4, FALSE, c_nof_repeat, 8, 0);
-- u_in_2_len_11_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP ( e_active, e_active, 16, 2, 8, 4, FALSE, c_nof_repeat, 10, 0);
-- u_in_2_len_11_gap_2 : ENTITY work.tb_dp_repack_dev GENERIC MAP ( e_active, e_active, 16, 2, 8, 4, FALSE, c_nof_repeat, 11, 2);
u_24_2_16_3_len_1_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 24, 2, 16, 3, FALSE, c_nof_repeat, 1, 0); -- g_pkt_len < g_in_nof_words
u_24_2_16_3_len_2_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 24, 2, 16, 3, FALSE, c_nof_repeat, 2, 0); -- g_pkt_len = g_in_nof_words
u_24_2_16_3_len_3_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 24, 2, 16, 3, FALSE, c_nof_repeat, 3, 0); -- g_pkt_len = fractional multiple of g_in_nof_words
u_24_2_16_3_len_10_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 24, 2, 16, 3, FALSE, c_nof_repeat, 10, 0); -- g_pkt_len = integer multiple of g_in_nof_words
u_24_2_16_3_len_11_gap_0 : ENTITY work.tb_dp_repack_dev GENERIC MAP (c_flow(I), c_flow(I), 24, 2, 16, 3, FALSE, c_nof_repeat, 11, 0); -- g_pkt_len = fractional multiple of g_in_nof_words
END GENERATE;
END GENERATE;
END tb;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment