Commit f5ac0178 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Merge branch '201-rx-buffer-functional-coverage' into 'master'

Resolve "RX Buffer functional coverage"

Closes #201

See merge request !220
parents 9674787f be07b6c4
Pipeline #6340 passed with stages
in 15 minutes and 1 second
...@@ -972,5 +972,106 @@ begin ...@@ -972,5 +972,106 @@ begin
end if; end if;
-- pragma translate_on -- pragma translate_on
end process; end process;
end architecture;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Functional coverage
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- psl default clock is rising_edge(clk_sys);
--
-- psl rx_buf_empty_cov :
-- cover (rx_empty = '1');
--
-- psl rx_buf_not_empty_to_empty_cov :
-- cover {rx_empty = '0'; rx_empty = '1'};
--
-- psl rx_buf_rx_full_cov :
-- cover (rx_full = '1');
--
-- psl rx_buf_rx_full_to_not_full_cov :
-- cover {(rx_full = '1'); (rx_full = '0')};
--
-- psl rx_buf_overrun_cov :
-- cover (overrun_condition = true);
--
-- psl rx_buf_commit_overrun_abort_cov :
-- cover (commit_overrun_abort = '1');
--
-- psl rx_buf_overrun_flags_cov :
-- cover (data_overrun_int = '1' and data_overrun_r = '1');
--
-- psl rx_buf_overrun_clear_cov :
-- cover (drv_clr_ovr = '1');
--
-- psl rx_buf_write_extra_ts_cov :
-- cover (write_extra_ts = '1');
--
-- psl rx_buf_release_receive_buffer_cov :
-- cover (drv_erase_rx = '1');
--
-- psl rx_buf_commit_and_read_cov :
-- cover (read_increment = '1' and commit_rx_frame = '1');
--
-- psl rx_buf_commit_after_read_cov :
-- cover {read_increment = '1'; commit_rx_frame = '1'};
--
-- psl rx_buf_read_after_commit_cov :
-- cover {commit_rx_frame = '1'; read_increment = '1'};
--
-- psl rx_buf_write_and_read_cov :
-- cover (write_raw_intent = '1' and read_increment = '1');
--
-- psl rx_buf_read_after_write_cov :
-- cover {write_raw_intent = '1'; read_increment = '1'};
--
-- psl rx_buf_write_after_read_cov :
-- cover {read_increment = '1'; write_raw_intent = '1'};
--
-- psl rx_buf_sof_timestamp :
-- cover (drv_rtsopt = RTS_BEG and commit_rx_frame = '1');
--
-- psl rx_buf_eof_timestamp :
-- cover (drv_rtsopt = RTS_END and commit_rx_frame = '1');
--
-- psl rx_buf_burst_read_short_cov :
-- cover {(read_increment = '1')[*4]};
--
-- psl rx_buf_burst_read_max_cov :
-- cover {(read_increment = '1')[*20]};
--
-- psl rx_buf_frame_abort_cov :
-- cover (rec_abort = '1');
--
-- psl rx_buf_store_rtr_cov :
-- cover (rec_is_rtr = '1' and commit_rx_frame = '1');
--
-- psl rx_buf_store_empty_frame_cov :
-- cover (rec_dlc_in = "0000" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_1_byte_frame_cov :
-- cover (rec_dlc_in = "0001" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_2_byte_frame_cov :
-- cover (rec_dlc_in = "0010" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_3_byte_frame_cov :
-- cover (rec_dlc_in = "0011" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_4_byte_frame_cov :
-- cover (rec_dlc_in = "0100" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_5_byte_frame_cov :
-- cover (rec_dlc_in = "0101" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_8_byte_frame_cov :
-- cover (rec_dlc_in = "1000" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_64_byte_frame_cov :
-- cover (rec_dlc_in = "1111" and rec_is_rtr = '0' and commit_rx_frame = '1');
--
-- psl rx_buf_store_abort_cov :
-- cover (rec_abort = '1');
end architecture;
\ No newline at end of file
...@@ -379,5 +379,32 @@ begin ...@@ -379,5 +379,32 @@ begin
begin begin
read_pointer_inc_1_int <= (read_pointer_int + 1) mod buff_size; read_pointer_inc_1_int <= (read_pointer_int + 1) mod buff_size;
end process; end process;
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Functional coverage
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-- psl default clock is rising_edge(clk_sys);
--
-- psl rx_no_raw_mem_free_cov :
-- cover (rx_mem_free_raw = 0);
--
-- psl rx_all_raw_mem_free_cov :
-- cover (rx_mem_free_raw = buff_size);
--
-- psl rx_no_int_mem_free_cov :
-- cover (rx_mem_free_int = 0);
--
-- psl rx_all_int_mem_free_cov :
-- cover (rx_mem_free_int = buff_size);
--
-- psl rx_write_ptr_higher_than_read_ptr_cov :
-- cover (write_pointer_int > read_pointer_int);
--
-- psl rx_read_ptr_higher_than_write_ptr_cov :
-- cover (read_pointer_int > write_pointer_int);
end architecture; end architecture;
...@@ -120,7 +120,7 @@ package body txt_buffer_hazard_feature is ...@@ -120,7 +120,7 @@ package body txt_buffer_hazard_feature is
CAN_insert_TX_frame(CAN_frame, 1, ID_1, mem_bus(1)); CAN_insert_TX_frame(CAN_frame, 1, ID_1, mem_bus(1));
-- Repeat test several times -- Repeat test several times
for i in 1 to 100 loop for i in 1 to 150 loop
-- Give "Set ready" command to the buffer -- Give "Set ready" command to the buffer
send_TXT_buf_cmd(buf_set_ready, 1, ID_1, mem_bus(1)); send_TXT_buf_cmd(buf_set_ready, 1, ID_1, mem_bus(1));
......
...@@ -414,7 +414,8 @@ def create_psl_report(psl_by_files, psl_orig): ...@@ -414,7 +414,8 @@ def create_psl_report(psl_by_files, psl_orig):
if __name__ == "__main__": if __name__ == "__main__":
dut_top = "can_top_level" #dut_top = "can_top_level"
dut_top = "."
# Merge PSL coverage files from all Testcases # Merge PSL coverage files from all Testcases
merge_psl_coverage_files("merged_psl.json", "psl_cov") merge_psl_coverage_files("merged_psl.json", "psl_cov")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment