From df28d570238eb3de324761d3ff55781a891ae1c7 Mon Sep 17 00:00:00 2001 From: Kristine Dosvik Date: Mon, 25 Sep 2023 14:05:45 +0200 Subject: [PATCH 1/4] exclude rest of xsecure code Signed-off-by: Kristine Dosvik --- ...v32e40s.manual_expression_cov_todo.vRefine | 335 ++++++++++-------- 1 file changed, 184 insertions(+), 151 deletions(-) diff --git a/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine b/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine index 1a5d0be46d..a8d3ce2e43 100644 --- a/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine +++ b/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine @@ -1,164 +1,197 @@ - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 64fefe1845f2f77acf5ba6e314e84a6b0612311c Mon Sep 17 00:00:00 2001 From: Kristine Dosvik Date: Wed, 27 Sep 2023 15:32:10 +0200 Subject: [PATCH 2/4] seperate code cover expression for xsecure and triggers, remove unnecessary signal from assert Signed-off-by: Kristine Dosvik --- .../some_xsecure_trigger_express_cov.vRefine | 281 ++++++++++++++++++ ...s_xsecure_bus_protocol_hardening_assert.sv | 7 +- 2 files changed, 282 insertions(+), 6 deletions(-) create mode 100644 cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine diff --git a/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine b/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine new file mode 100644 index 0000000000..1277c3bb65 --- /dev/null +++ b/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cv32e40s/tb/uvmt/uvmt_cv32e40s_xsecure_assert/uvmt_cv32e40s_xsecure_bus_protocol_hardening_assert.sv b/cv32e40s/tb/uvmt/uvmt_cv32e40s_xsecure_assert/uvmt_cv32e40s_xsecure_bus_protocol_hardening_assert.sv index ab6b0a9c03..d6c94f3db9 100644 --- a/cv32e40s/tb/uvmt/uvmt_cv32e40s_xsecure_assert/uvmt_cv32e40s_xsecure_bus_protocol_hardening_assert.sv +++ b/cv32e40s/tb/uvmt/uvmt_cv32e40s_xsecure_assert/uvmt_cv32e40s_xsecure_bus_protocol_hardening_assert.sv @@ -127,12 +127,11 @@ module uvmt_cv32e40s_xsecure_bus_protocol_hardening_assert //Verify that major alert is set when there is a response packet even though there are no outstanding requests, in the following OBI protocols - property p_resp_no_outstanding_req(obi_rvalid, resp_ph_cont, v_addr_ph_cnt); + property p_resp_no_outstanding_req(obi_rvalid, v_addr_ph_cnt); //If there has already been a bus protpcol fault the there will be an underflow error and the system acts strangely !bus_protocol_hardening_glitch_sticky && obi_rvalid - && !resp_ph_cont && v_addr_ph_cnt == 0 |=> alert_major; @@ -141,28 +140,24 @@ module uvmt_cv32e40s_xsecure_bus_protocol_hardening_assert a_glitch_xsecure_bus_hardening_no_outstanding_obi_instr_trans: assert property ( p_resp_no_outstanding_req( obi_instr_rvalid, - support_if.instr_bus_resp_ph_cont, support_if.instr_bus_v_addr_ph_cnt) ) else `uvm_error(info_tag_glitch, "A response before a request in the OBI instruction bus handshake, but the alert major is not set.\n"); a_glitch_xsecure_bus_hardening_no_outstanding_obi_data_trans: assert property ( p_resp_no_outstanding_req( obi_data_rvalid, - support_if.data_bus_resp_ph_cont, support_if.data_bus_v_addr_ph_cnt) ) else `uvm_error(info_tag_glitch, "A response before a request in the OBI data bus handshake, but the alert major is not set.\n"); a_glitch_xsecure_bus_hardening_alignment_buff_receive_instr_if_mpu_resp: assert property ( p_resp_no_outstanding_req( instr_if_mpu_resp, - support_if.alignment_buff_resp_ph_cont, support_if.alignment_buff_addr_ph_cnt) ) else `uvm_error(info_tag_glitch, "The alignment buffer does not have outstanding requests but receives a response from the instruction interface MPU, but the alert major is not set.\n"); a_glitch_xsecure_bus_hardening_lsu_receive_lsu_mpu_resp: assert property ( p_resp_no_outstanding_req( lsu_mpu_resp, - support_if.lsu_resp_ph_cont, support_if.lsu_addr_ph_cnt) ) else `uvm_error(info_tag_glitch, "The load-store unit does not have outstanding requests but receives a response from the load-store unit MPU, but the alert major is not set.\n"); From 15290a0b6b7bf8e0ec3a439d579e361bbf5dcb03 Mon Sep 17 00:00:00 2001 From: Kristine Dosvik Date: Thu, 28 Sep 2023 10:07:35 +0200 Subject: [PATCH 3/4] changed comment about nmi integrity bit Signed-off-by: Kristine Dosvik --- .../some_xsecure_trigger_express_cov.vRefine | 414 +++++++----------- 1 file changed, 156 insertions(+), 258 deletions(-) diff --git a/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine b/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine index 1277c3bb65..bc1bc137da 100644 --- a/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine +++ b/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine @@ -1,281 +1,179 @@ - + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + - + - + - + - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +proof that code is unreachable assertion set = uvmt_cv32e40s_xsecure_interface_integrity_assert.."> + + + + + \ No newline at end of file From 3129e23ce47598884133fb1c50c6f64614044983 Mon Sep 17 00:00:00 2001 From: Kristine Dosvik Date: Thu, 28 Sep 2023 15:10:34 +0200 Subject: [PATCH 4/4] Use naming convention, undo changes also stored in the xsecure_trigger_express_cov file Signed-off-by: Kristine Dosvik --- ...v32e40s.manual_expression_cov_todo.vRefine | 335 ++++++++---------- ...2e40s.xsecure_trigger_express_cov.vRefine} | 0 2 files changed, 151 insertions(+), 184 deletions(-) rename cv32e40s/sim/tools/xrun/{some_xsecure_trigger_express_cov.vRefine => cv32e40s.xsecure_trigger_express_cov.vRefine} (100%) diff --git a/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine b/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine index a8d3ce2e43..1a5d0be46d 100644 --- a/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine +++ b/cv32e40s/sim/tools/xrun/cv32e40s.manual_expression_cov_todo.vRefine @@ -1,197 +1,164 @@ - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine b/cv32e40s/sim/tools/xrun/cv32e40s.xsecure_trigger_express_cov.vRefine similarity index 100% rename from cv32e40s/sim/tools/xrun/some_xsecure_trigger_express_cov.vRefine rename to cv32e40s/sim/tools/xrun/cv32e40s.xsecure_trigger_express_cov.vRefine