Skip to content

Commit

Permalink
Coverage file fixes for keyvault changes (#636)
Browse files Browse the repository at this point in the history
* updating keyvault coverage with reduced num keys

updated uvmf kf to handle reduced kv entries

* MICROSOFT AUTOMATED PIPELINE: Stamp 'user/dev/michnorris/cov_fix' with updated timestamp and hash after successful run

* MICROSOFT AUTOMATED PIPELINE: Stamp 'user/dev/michnorris/cov_fix' with updated timestamp and hash after successful run

---------

Co-authored-by: Caleb Whitehead <[email protected]>
  • Loading branch information
Nitsirks and calebofearth authored Nov 18, 2024
1 parent aa362ea commit 227b1d5
Show file tree
Hide file tree
Showing 50 changed files with 263 additions and 258 deletions.
2 changes: 1 addition & 1 deletion .github/workflow_metadata/pr_hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
df42838de9b502d7686784b11be0148d4a5932afe2b90a3fa20298b52582ba414864b171cff5c7f53658351e67fbde06
fa1eb0583cba1d002083811627ac6aa3cc5abec5b97928888a2b12b4cd8b15e8437d996c3bc459941be6c28c4b5ab5c3
2 changes: 1 addition & 1 deletion .github/workflow_metadata/pr_timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1731692225
1731724731
30 changes: 15 additions & 15 deletions src/keyvault/coverage/keyvault_cov_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -71,25 +71,25 @@ interface keyvault_cov_if
//in UVM reg coverage. This coverpoint bins the 32-bit lock/clear bus so that
//they can be used to cross with other signals
lock_wr: coverpoint key_ctrl_lock_wr {
bins bin0 = {[0:'hFFFF]};
bins bin1 = {['h1_0000:'hF_FFFF]};
bins bin2 = {['h10_0000:'hFF_FFFF]};
bins bin3 = {['h100_0000:'hFFF_FFFF]};
bins bin4 = {['h1000_0000: 'hFFFF_FFFF]};
bins bin0 = {[0:'hFF]};
bins bin1 = {['h100:'hFFF]};
bins bin2 = {['h1000:'hFFFF]};
bins bin3 = {['h1_0000:'hF_FFFF]};
bins bin4 = {['h10_0000: 'hFF_FFFF]};
}
lock_use: coverpoint key_ctrl_lock_use {
bins bin0 = {[0:'hFFFF]};
bins bin1 = {['h1_0000:'hF_FFFF]};
bins bin2 = {['h10_0000:'hFF_FFFF]};
bins bin3 = {['h100_0000:'hFFF_FFFF]};
bins bin4 = {['h1000_0000: 'hFFFF_FFFF]};
bins bin0 = {[0:'hFF]};
bins bin1 = {['h100:'hFFF]};
bins bin2 = {['h1000:'hFFFF]};
bins bin3 = {['h1_0000:'hF_FFFF]};
bins bin4 = {['h10_0000: 'hFF_FFFF]};
}
clear: coverpoint key_ctrl_clear {
bins bin0 = {[0:'hFFFF]};
bins bin1 = {['h1_0000:'hF_FFFF]};
bins bin2 = {['h10_0000:'hFF_FFFF]};
bins bin3 = {['h100_0000:'hFFF_FFFF]};
bins bin4 = {['h1000_0000: 'hFFFF_FFFF]};
bins bin0 = {[0:'hFF]};
bins bin1 = {['h100:'hFFF]};
bins bin2 = {['h1000:'hFFFF]};
bins bin3 = {['h1_0000:'hF_FFFF]};
bins bin4 = {['h10_0000: 'hFF_FFFF]};
}
cp_clear_secrets_sel: coverpoint clear_secrets_sel;
cp_clear_secrets_wr : coverpoint clear_secrets_wr;
Expand Down
4 changes: 1 addition & 3 deletions src/keyvault/rtl/kv_reg_covergroups.svh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
dest_valid_cp : coverpoint dest_valid {
illegal_bins dest_valid_bit5to7 = {['d32:'d255]};
}
last_dword_cp : coverpoint last_dword {
illegal_bins last_dword_12to15 = {['d12:'d15]};
}
last_dword_cp : coverpoint last_dword;
wrXuseXclear: cross lock_wr_cp, lock_use_cp, clear_cp;

endgroup
Expand Down
4 changes: 1 addition & 3 deletions src/keyvault/uvmf_kv/kv_bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ uvmf:
########## WRITE Agents ##########
- bfm_name: kv_hmac_write_agent
value: ACTIVE
- bfm_name: kv_sha512_write_agent
value: ACTIVE
- bfm_name: kv_ecc_write_agent
value: ACTIVE
- bfm_name: kv_doe_write_agent
Expand All @@ -19,7 +17,7 @@ uvmf:
value: ACTIVE
- bfm_name: kv_hmac_block_read_agent
value: ACTIVE
- bfm_name: kv_sha512_block_read_agent
- bfm_name: kv_mldsa_key_read_agent
value: ACTIVE
- bfm_name: kv_ecc_privkey_read_agent
value: ACTIVE
Expand Down
7 changes: 2 additions & 5 deletions src/keyvault/uvmf_kv/kv_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ uvmf:
- name: kv_hmac_write_agent
type: kv_write
initiator_responder: "INITIATOR"
- name: kv_sha512_write_agent
type: kv_write
initiator_responder: "INITIATOR"
- name: kv_ecc_write_agent
type: kv_write
initiator_responder: "INITIATOR"
Expand All @@ -26,7 +23,7 @@ uvmf:
- name: kv_hmac_block_read_agent
type: kv_read
initiator_responder: "INITIATOR"
- name: kv_sha512_block_read_agent
- name: kv_mldsa_key_read_agent
type: kv_read
initiator_responder: "INITIATOR"
- name: kv_ecc_privkey_read_agent
Expand Down Expand Up @@ -84,7 +81,7 @@ uvmf:
receiver: kv_sb.actual_analysis_export #
- driver: kv_hmac_block_read_agent.monitored_ap #
receiver: kv_sb.actual_analysis_export #
- driver: kv_sha512_block_read_agent.monitored_ap #
- driver: kv_mldsa_key_read_agent.monitored_ap #
receiver: kv_sb.actual_analysis_export #
- driver: kv_ecc_privkey_read_agent.monitored_ap #
receiver: kv_sb.actual_analysis_export #
Expand Down
6 changes: 3 additions & 3 deletions src/keyvault/uvmf_kv/kv_interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ uvmf:
parameters:
- name: "KV_WRITE_REQUESTOR"
type: "string"
# Can be HMAC, ECC, DOE, SHA512
# Can be HMAC, ECC, DOE, MLDSA
value: '"HMAC"'

ports:
Expand All @@ -94,7 +94,7 @@ uvmf:
transaction_constraints:
- name: dest_valid_c
# TODO correlate the actual values
value: '{ if (KV_WRITE_REQUESTOR inside {"ECC", "HMAC", "DOE", "SHA512"}) write_dest_valid == 63; }'
value: '{ if (KV_WRITE_REQUESTOR inside {"ECC", "HMAC", "DOE", "MLDSA"}) write_dest_valid == 63; }'

transaction_vars:
# KV Write
Expand Down Expand Up @@ -141,7 +141,7 @@ uvmf:
parameters:
- name: "KV_READ_REQUESTOR"
type: "string"
# Can be HMAC_KEY, HMAC_BLOCK, SHA512_BLOCK, ECC_PRIVKEY, ECC_SEED
# Can be HMAC_KEY, HMAC_BLOCK, MLDSA_KEY, ECC_PRIVKEY, ECC_SEED
value: '"HMAC_KEY"'

ports:
Expand Down
4 changes: 1 addition & 3 deletions src/keyvault/uvmf_kv/kv_util_comp_predictor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ uvmf:
# Writes
- name: kv_hmac_write_agent_ae
type: 'kv_write_transaction'
- name: kv_sha512_write_agent_ae
type: 'kv_write_transaction'
- name: kv_ecc_write_agent_ae
type: 'kv_write_transaction'
- name: kv_doe_write_agent_ae
Expand All @@ -20,7 +18,7 @@ uvmf:
type: 'kv_read_transaction'
- name: kv_hmac_block_read_agent_ae
type: 'kv_read_transaction'
- name: kv_sha512_block_read_agent_ae
- name: kv_mldsa_key_read_agent_ae
type: 'kv_read_transaction'
- name: kv_ecc_privkey_read_agent_ae
type: 'kv_read_transaction'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kv_ecc_write_agent, kv_write_driver_bfm kv_write_monitor_bfm, kv_write_transacti
kv_doe_write_agent, kv_write_driver_bfm kv_write_monitor_bfm, kv_write_transaction, kv_write_pkg_kv_doe_write_agent_BFM,
kv_hmac_key_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_hmac_key_read_agent_BFM,
kv_hmac_block_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_hmac_block_read_agent_BFM,
kv_sha512_block_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_sha512_block_read_agent_BFM,
kv_mldsa_key_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_mldsa_key_read_agent_BFM,
kv_ecc_privkey_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_ecc_privkey_read_agent_BFM,
kv_ecc_seed_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_ecc_seed_read_agent_BFM,
kv_ecc_msg_read_agent, kv_read_driver_bfm kv_read_monitor_bfm, kv_read_transaction, kv_read_pkg_kv_ecc_msg_read_agent_BFM,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ wave group kv_hmac_block_read_agent_bus
wave add -group kv_hmac_block_read_agent_bus hdl_top.kv_hmac_block_read_agent_bus.* -radix hexadecimal -tag F0
wave group kv_hmac_block_read_agent_bus -collapse
wave insertion [expr [wave index insertpoint] +1]
wave spacer -backgroundcolor Salmon { kv_sha512_block_read_agent }
wave add uvm_test_top.environment.kv_sha512_block_read_agent.kv_sha512_block_read_agent_monitor.txn_stream -radix string -tag F0
wave group kv_sha512_block_read_agent_bus
wave add -group kv_sha512_block_read_agent_bus hdl_top.kv_sha512_block_read_agent_bus.* -radix hexadecimal -tag F0
wave group kv_sha512_block_read_agent_bus -collapse
wave spacer -backgroundcolor Salmon { kv_mldsa_key_read_agent }
wave add uvm_test_top.environment.kv_mldsa_key_read_agent.kv_mldsa_key_read_agent_monitor.txn_stream -radix string -tag F0
wave group kv_mldsa_key_read_agent_bus
wave add -group kv_mldsa_key_read_agent_bus hdl_top.kv_mldsa_key_read_agent_bus.* -radix hexadecimal -tag F0
wave group kv_mldsa_key_read_agent_bus -collapse
wave insertion [expr [wave index insertpoint] +1]
wave spacer -backgroundcolor Salmon { kv_ecc_privkey_read_agent }
wave add uvm_test_top.environment.kv_ecc_privkey_read_agent.kv_ecc_privkey_read_agent_monitor.txn_stream -radix string -tag F0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ add wave -noupdate -group kv_hmac_key_read_agent_bus /hdl_top/kv_hmac_key_read_a
add wave -noupdate -divider kv_hmac_block_read_agent
add wave -noupdate /uvm_root/uvm_test_top/environment/kv_hmac_block_read_agent/kv_hmac_block_read_agent_monitor/txn_stream
add wave -noupdate -group kv_hmac_block_read_agent_bus /hdl_top/kv_hmac_block_read_agent_bus/*
add wave -noupdate -divider kv_sha512_block_read_agent
add wave -noupdate /uvm_root/uvm_test_top/environment/kv_sha512_block_read_agent/kv_sha512_block_read_agent_monitor/txn_stream
add wave -noupdate -group kv_sha512_block_read_agent_bus /hdl_top/kv_sha512_block_read_agent_bus/*
add wave -noupdate -divider kv_mldsa_key_read_agent
add wave -noupdate /uvm_root/uvm_test_top/environment/kv_mldsa_key_read_agent/kv_mldsa_key_read_agent_monitor/txn_stream
add wave -noupdate -group kv_mldsa_key_read_agent_bus /hdl_top/kv_mldsa_key_read_agent_bus/*
add wave -noupdate -divider kv_ecc_privkey_read_agent
add wave -noupdate /uvm_root/uvm_test_top/environment/kv_ecc_privkey_read_agent/kv_ecc_privkey_read_agent_monitor/txn_stream
add wave -noupdate -group kv_ecc_privkey_read_agent_bus /hdl_top/kv_ecc_privkey_read_agent_bus/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ package kv_parameters_pkg;
parameter string kv_doe_write_agent_BFM = "kv_doe_write_agent_BFM"; /* [5] */
parameter string kv_hmac_key_read_agent_BFM = "kv_hmac_key_read_agent_BFM"; /* [6] */
parameter string kv_hmac_block_read_agent_BFM = "kv_hmac_block_read_agent_BFM"; /* [7] */
parameter string kv_sha512_block_read_agent_BFM = "kv_sha512_block_read_agent_BFM"; /* [8] */
parameter string kv_mldsa_key_read_agent_BFM = "kv_mldsa_key_read_agent_BFM"; /* [8] */
parameter string kv_ecc_privkey_read_agent_BFM = "kv_ecc_privkey_read_agent_BFM"; /* [9] */
parameter string kv_ecc_seed_read_agent_BFM = "kv_ecc_seed_read_agent_BFM"; /* [10] */
parameter string kv_ecc_msg_read_agent_BFM = "kv_ecc_msg_read_agent_BFM"; /* [11] */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ rand kv_env_sequence_base_t kv_env_seq;
kv_hmac_key_read_agent_random_seq_t kv_hmac_key_read_agent_random_seq;
typedef kv_read_random_sequence kv_hmac_block_read_agent_random_seq_t;
kv_hmac_block_read_agent_random_seq_t kv_hmac_block_read_agent_random_seq;
typedef kv_read_random_sequence kv_sha512_block_read_agent_random_seq_t;
kv_sha512_block_read_agent_random_seq_t kv_sha512_block_read_agent_random_seq;
typedef kv_read_random_sequence kv_mldsa_key_read_agent_random_seq_t;
kv_mldsa_key_read_agent_random_seq_t kv_mldsa_key_read_agent_random_seq;
typedef kv_read_random_sequence kv_ecc_privkey_read_agent_random_seq_t;
kv_ecc_privkey_read_agent_random_seq_t kv_ecc_privkey_read_agent_random_seq;
typedef kv_read_random_sequence kv_ecc_seed_read_agent_random_seq_t;
Expand All @@ -85,8 +85,8 @@ rand kv_env_sequence_base_t kv_env_seq;
uvm_sequencer #(kv_hmac_key_read_agent_transaction_t) kv_hmac_key_read_agent_sequencer;
typedef kv_read_transaction kv_hmac_block_read_agent_transaction_t;
uvm_sequencer #(kv_hmac_block_read_agent_transaction_t) kv_hmac_block_read_agent_sequencer;
typedef kv_read_transaction kv_sha512_block_read_agent_transaction_t;
uvm_sequencer #(kv_sha512_block_read_agent_transaction_t) kv_sha512_block_read_agent_sequencer;
typedef kv_read_transaction kv_mldsa_key_read_agent_transaction_t;
uvm_sequencer #(kv_mldsa_key_read_agent_transaction_t) kv_mldsa_key_read_agent_sequencer;
typedef kv_read_transaction kv_ecc_privkey_read_agent_transaction_t;
uvm_sequencer #(kv_ecc_privkey_read_agent_transaction_t) kv_ecc_privkey_read_agent_sequencer;
typedef kv_read_transaction kv_ecc_seed_read_agent_transaction_t;
Expand All @@ -106,7 +106,7 @@ rand kv_env_sequence_base_t kv_env_seq;
kv_write_configuration kv_doe_write_agent_config;
kv_read_configuration kv_hmac_key_read_agent_config;
kv_read_configuration kv_hmac_block_read_agent_config;
kv_read_configuration kv_sha512_block_read_agent_config;
kv_read_configuration kv_mldsa_key_read_agent_config;
kv_read_configuration kv_ecc_privkey_read_agent_config;
kv_read_configuration kv_ecc_seed_read_agent_config;
// Local handle to register model for convenience
Expand Down Expand Up @@ -142,8 +142,8 @@ rand kv_env_sequence_base_t kv_env_seq;
`uvm_fatal("CFG" , "uvm_config_db #( kv_read_configuration )::get cannot find resource kv_hmac_key_read_agent_BFM" )
if( !uvm_config_db #( kv_read_configuration )::get( null , UVMF_CONFIGURATIONS , kv_hmac_block_read_agent_BFM , kv_hmac_block_read_agent_config ) )
`uvm_fatal("CFG" , "uvm_config_db #( kv_read_configuration )::get cannot find resource kv_hmac_block_read_agent_BFM" )
if( !uvm_config_db #( kv_read_configuration )::get( null , UVMF_CONFIGURATIONS , kv_sha512_block_read_agent_BFM , kv_sha512_block_read_agent_config ) )
`uvm_fatal("CFG" , "uvm_config_db #( kv_read_configuration )::get cannot find resource kv_sha512_block_read_agent_BFM" )
if( !uvm_config_db #( kv_read_configuration )::get( null , UVMF_CONFIGURATIONS , kv_mldsa_key_read_agent_BFM , kv_mldsa_key_read_agent_config ) )
`uvm_fatal("CFG" , "uvm_config_db #( kv_read_configuration )::get cannot find resource kv_mldsa_key_read_agent_BFM" )
if( !uvm_config_db #( kv_read_configuration )::get( null , UVMF_CONFIGURATIONS , kv_ecc_privkey_read_agent_BFM , kv_ecc_privkey_read_agent_config ) )
`uvm_fatal("CFG" , "uvm_config_db #( kv_read_configuration )::get cannot find resource kv_ecc_privkey_read_agent_BFM" )
if( !uvm_config_db #( kv_read_configuration )::get( null , UVMF_CONFIGURATIONS , kv_ecc_seed_read_agent_BFM , kv_ecc_seed_read_agent_config ) )
Expand All @@ -157,7 +157,7 @@ rand kv_env_sequence_base_t kv_env_seq;
kv_doe_write_agent_sequencer = kv_doe_write_agent_config.get_sequencer();
kv_hmac_key_read_agent_sequencer = kv_hmac_key_read_agent_config.get_sequencer();
kv_hmac_block_read_agent_sequencer = kv_hmac_block_read_agent_config.get_sequencer();
kv_sha512_block_read_agent_sequencer = kv_sha512_block_read_agent_config.get_sequencer();
kv_mldsa_key_read_agent_sequencer = kv_mldsa_key_read_agent_config.get_sequencer();
kv_ecc_privkey_read_agent_sequencer = kv_ecc_privkey_read_agent_config.get_sequencer();
kv_ecc_seed_read_agent_sequencer = kv_ecc_seed_read_agent_config.get_sequencer();

Expand Down Expand Up @@ -187,7 +187,7 @@ rand kv_env_sequence_base_t kv_env_seq;
kv_doe_write_agent_random_seq = kv_doe_write_agent_random_seq_t::type_id::create("kv_doe_write_agent_random_seq");
kv_hmac_key_read_agent_random_seq = kv_hmac_key_read_agent_random_seq_t::type_id::create("kv_hmac_key_read_agent_random_seq");
kv_hmac_block_read_agent_random_seq = kv_hmac_block_read_agent_random_seq_t::type_id::create("kv_hmac_block_read_agent_random_seq");
kv_sha512_block_read_agent_random_seq = kv_sha512_block_read_agent_random_seq_t::type_id::create("kv_sha512_block_read_agent_random_seq");
kv_mldsa_key_read_agent_random_seq = kv_mldsa_key_read_agent_random_seq_t::type_id::create("kv_mldsa_key_read_agent_random_seq");
kv_ecc_privkey_read_agent_random_seq = kv_ecc_privkey_read_agent_random_seq_t::type_id::create("kv_ecc_privkey_read_agent_random_seq");
kv_ecc_seed_read_agent_random_seq = kv_ecc_seed_read_agent_random_seq_t::type_id::create("kv_ecc_seed_read_agent_random_seq");

Expand All @@ -199,7 +199,7 @@ rand kv_env_sequence_base_t kv_env_seq;
kv_doe_write_agent_config.wait_for_reset();
kv_hmac_key_read_agent_config.wait_for_reset();
kv_hmac_block_read_agent_config.wait_for_reset();
kv_sha512_block_read_agent_config.wait_for_reset();
kv_mldsa_key_read_agent_config.wait_for_reset();
kv_ecc_privkey_read_agent_config.wait_for_reset();
kv_ecc_seed_read_agent_config.wait_for_reset();
join
Expand All @@ -216,7 +216,7 @@ rand kv_env_sequence_base_t kv_env_seq;
repeat (25) kv_doe_write_agent_random_seq.start(kv_doe_write_agent_sequencer);
repeat (25) kv_hmac_key_read_agent_random_seq.start(kv_hmac_key_read_agent_sequencer);
repeat (25) kv_hmac_block_read_agent_random_seq.start(kv_hmac_block_read_agent_sequencer);
repeat (25) kv_sha512_block_read_agent_random_seq.start(kv_sha512_block_read_agent_sequencer);
repeat (25) kv_mldsa_key_read_agent_random_seq.start(kv_mldsa_key_read_agent_sequencer);
repeat (25) kv_ecc_privkey_read_agent_random_seq.start(kv_ecc_privkey_read_agent_sequencer);
repeat (25) kv_ecc_seed_read_agent_random_seq.start(kv_ecc_seed_read_agent_sequencer);
join
Expand All @@ -234,7 +234,7 @@ kv_env_seq.start(top_configuration.vsqr);
kv_doe_write_agent_config.wait_for_num_clocks(400);
kv_hmac_key_read_agent_config.wait_for_num_clocks(400);
kv_hmac_block_read_agent_config.wait_for_num_clocks(400);
kv_sha512_block_read_agent_config.wait_for_num_clocks(400);
kv_mldsa_key_read_agent_config.wait_for_num_clocks(400);
kv_ecc_privkey_read_agent_config.wait_for_num_clocks(400);
kv_ecc_seed_read_agent_config.wait_for_num_clocks(400);
join
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class register_test_sequence extends kv_bench_sequence_base;
kv_doe_write_agent_config.wait_for_reset();
kv_hmac_key_read_agent_config.wait_for_reset();
kv_hmac_block_read_agent_config.wait_for_reset();
kv_sha512_block_read_agent_config.wait_for_reset();
kv_mldsa_key_read_agent_config.wait_for_reset();
kv_ecc_privkey_read_agent_config.wait_for_reset();
kv_ecc_seed_read_agent_config.wait_for_reset();
// pragma uvmf custom register_test_reset end
Expand Down
Loading

0 comments on commit 227b1d5

Please sign in to comment.