Fix WITH_KEY branching in DDS Entities

This commit is contained in:
Greek 2021-11-19 18:24:32 +01:00
parent 4830645a5a
commit 385257e271
2 changed files with 87 additions and 66 deletions

View File

@ -1663,7 +1663,7 @@ begin
-- Wait for Instance Search to finish -- Wait for Instance Search to finish
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_STATUS_FLAG or IMF_IGNORE_DEADLINE_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_STATUS_FLAG or IMF_IGNORE_DEADLINE_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG)) severity FAILURE;
-- Instance Found -- Instance Found
if (not WITH_KEY or inst_addr_base /= INSTANCE_MEMORY_MAX_ADDRESS) then if (not WITH_KEY or inst_addr_base /= INSTANCE_MEMORY_MAX_ADDRESS) then
@ -1945,10 +1945,16 @@ begin
-- Memory Flow Control Guard -- Memory Flow Control Guard
if (sample_ready_in = '1') then if (sample_ready_in = '1') then
if (WITH_KEY) then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
else
cnt_next <= cnt + 2; -- Skip next Stage
end if;
end if; end if;
-- GET Instance Pointer -- GET Instance Pointer
when 3 => when 3 =>
-- Synthesis Guard
if (WITH_KEY) then
sample_valid_in <= '1'; sample_valid_in <= '1';
sample_addr <= cur_sample + SMF_INSTANCE_ADDR_OFFSET; sample_addr <= cur_sample + SMF_INSTANCE_ADDR_OFFSET;
sample_read <= '1'; sample_read <= '1';
@ -1957,6 +1963,7 @@ begin
if (sample_ready_in = '1') then if (sample_ready_in = '1') then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
end if; end if;
end if;
-- READ Timestamp 1/2 -- READ Timestamp 1/2
when 4 => when 4 =>
sample_ready_out <= '1'; sample_ready_out <= '1';
@ -2001,10 +2008,16 @@ begin
-- Memory Flow Control Guard -- Memory Flow Control Guard
if (sample_valid_out = '1') then if (sample_valid_out = '1') then
prev_sample_next <= resize(unsigned(sample_read_data),SAMPLE_MEMORY_ADDR_WIDTH); prev_sample_next <= resize(unsigned(sample_read_data),SAMPLE_MEMORY_ADDR_WIDTH);
if (WITH_KEY) then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
else
cnt_next <= cnt + 2; -- Skip next stage
end if;
end if; end if;
-- READ Instance Poiner -- READ Instance Poiner
when 7 => when 7 =>
-- Synthesis Guard
if (WITH_KEY) then
sample_ready_out <= '1'; sample_ready_out <= '1';
-- Memory Flow Control Guard -- Memory Flow Control Guard
@ -2049,6 +2062,7 @@ begin
end if; end if;
end if; end if;
end if; end if;
end if;
-- GET Disposed Generation Count -- GET Disposed Generation Count
when 8 => when 8 =>
sample_valid_in <= '1'; sample_valid_in <= '1';
@ -2106,7 +2120,7 @@ begin
-- Memory Operation Guard -- Memory Operation Guard
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_STATUS_FLAG or IMF_WRITER_BITMAP_FLAG or IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_IGNORE_DEADLINE_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_STATUS_FLAG or IMF_WRITER_BITMAP_FLAG or IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_IGNORE_DEADLINE_FLAG)) severity FAILURE;
-- DEFAULT STATUS INFO (LIVELINESS) -- DEFAULT STATUS INFO (LIVELINESS)
if (WITH_KEY) then if (WITH_KEY) then
@ -2345,7 +2359,7 @@ begin
-- Wait for instance Update to Complete -- Wait for instance Update to Complete
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG)) severity FAILURE;
case (cnt) is case (cnt) is
-- SET Disposed Generation Counter -- SET Disposed Generation Counter
@ -2554,7 +2568,7 @@ begin
-- Wait for Instane Data -- Wait for Instane Data
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_DISPOSED_CNT_FLAG or IMF_NO_WRITERS_CNT_FLAG)) severity FAILURE;
case (cnt) is case (cnt) is
-- GET Next Sample (Empty List) -- GET Next Sample (Empty List)
@ -2625,10 +2639,16 @@ begin
-- Memory Flow Control Guard -- Memory Flow Control Guard
if (sample_ready_in = '1') then if (sample_ready_in = '1') then
if (WITH_KEY) then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
else
cnt_next <= cnt + 2; -- Skip next Stage
end if;
end if; end if;
-- SET Instance Pointer -- SET Instance Pointer
when 7 => when 7 =>
-- Synthesis Guard
if (WITH_KEY) then
sample_valid_in <= '1'; sample_valid_in <= '1';
sample_addr <= cur_sample + SMF_INSTANCE_ADDR_OFFSET; sample_addr <= cur_sample + SMF_INSTANCE_ADDR_OFFSET;
sample_write_data <= std_logic_vector(resize(cur_inst,WORD_WIDTH)); sample_write_data <= std_logic_vector(resize(cur_inst,WORD_WIDTH));
@ -2637,6 +2657,7 @@ begin
if (sample_ready_in = '1') then if (sample_ready_in = '1') then
cnt_next <= cnt + 1; cnt_next <= cnt + 1;
end if; end if;
end if;
-- SET Disposed Generation Count -- SET Disposed Generation Count
when 8 => when 8 =>
sample_valid_in <= '1'; sample_valid_in <= '1';
@ -3036,7 +3057,7 @@ begin
-- Memory Operation Guard -- Memory Operation Guard
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_SAMPLE_CNT_FLAG or IMF_WRITER_BITMAP_FLAG or IMF_STATUS_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_SAMPLE_CNT_FLAG or IMF_WRITER_BITMAP_FLAG or IMF_STATUS_FLAG)) severity FAILURE;
-- Synthesis Guard -- Synthesis Guard
if (WITH_KEY) then if (WITH_KEY) then
@ -3440,8 +3461,8 @@ begin
when 7 => when 7 =>
-- Wait for Instance Data -- Wait for Instance Data
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_STATUS_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_STATUS_FLAG)) severity FAILURE;
assert (next_inst = inst_addr_base) severity FAILURE; assert (not WITH_KEY or next_inst = inst_addr_base) severity FAILURE;
-- DEFAULT -- DEFAULT
tmp_bool := TRUE; tmp_bool := TRUE;
@ -4036,7 +4057,7 @@ begin
when 2 => when 2 =>
-- Memory Operation Guard -- Memory Operation Guard
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_STATUS_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_STATUS_FLAG)) severity FAILURE;
-- NOTE: If we have a presentation of consecutive same instance samples of multiple instances, we have to -- NOTE: If we have a presentation of consecutive same instance samples of multiple instances, we have to
-- mark the instances we have already handled, in order to prevent the GET_NEXT_SAMPLE state to -- mark the instances we have already handled, in order to prevent the GET_NEXT_SAMPLE state to
-- re-process them. -- re-process them.

View File

@ -1625,7 +1625,7 @@ begin
-- Wait for Instance Search to finish -- Wait for Instance Search to finish
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_SAMPLE_CNT_FLAG or IMF_ACK_CNT_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_SAMPLE_CNT_FLAG or IMF_ACK_CNT_FLAG)) severity FAILURE;
-- Instance Found -- Instance Found
if (not WITH_KEY or inst_addr_base /= INSTANCE_MEMORY_MAX_ADDRESS) then if (not WITH_KEY or inst_addr_base /= INSTANCE_MEMORY_MAX_ADDRESS) then
@ -1834,7 +1834,7 @@ begin
-- Memory Operation Guard -- Memory Operation Guard
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_STATUS_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_ACK_CNT_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_STATUS_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_ACK_CNT_FLAG)) severity FAILURE;
-- Synthesis Guard -- Synthesis Guard
if (WITH_KEY) then if (WITH_KEY) then
@ -2536,7 +2536,7 @@ begin
-- Memory Operation Guard -- Memory Operation Guard
if (not WITH_KEY or inst_op_done = '1') then if (not WITH_KEY or inst_op_done = '1') then
assert check_mask(current_imf, IMF_STATUS_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_ACK_CNT_FLAG) severity FAILURE; assert (not WITH_KEY or check_mask(current_imf, IMF_STATUS_FLAG or IMF_SAMPLE_CNT_FLAG or IMF_ACK_CNT_FLAG)) severity FAILURE;
-- Synthesis Guard -- Synthesis Guard
if (WITH_KEY) then if (WITH_KEY) then