Skip to content

Commit

Permalink
[aes, dv] Fix cfg_error_type constraint resolution for aes_message_item
Browse files Browse the repository at this point in the history
Previously, the config_error_type setting of the test was not correctly
interpreted. Enabled config errors were disabled by the contraint.

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
  • Loading branch information
vogelpi committed Jul 14, 2023
1 parent 36992c6 commit cb90c98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hw/ip/aes/dv/env/aes_env_cfg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class aes_env_cfg extends cip_base_env_cfg #(.RAL_T(aes_reg_block));
// [2]: reseed error
// [1]: mode error
// [0]: key_len
cfg_error_type_t config_error_type = 3'b000;
cfg_error_type_t config_error_type = 3'b111;
int config_error_pct = 30;

// min and max wait (clk) before an error injection
Expand Down
6 changes: 3 additions & 3 deletions hw/ip/aes/dv/env/aes_message_item.sv
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ class aes_message_item extends uvm_sequence_item;
solve sideload_en before cfg_error_type;
if (has_config_error) {
cfg_error_type inside {[1:7]};
config_error_type_en[0] -> cfg_error_type[0] == 0;
config_error_type_en[1] -> cfg_error_type[1] == 0;
config_error_type_en[2] -> cfg_error_type[2] == 0;
config_error_type_en[0] == 0 -> cfg_error_type[0] == 0;
config_error_type_en[1] == 0 -> cfg_error_type[1] == 0;
config_error_type_en[2] == 0 -> cfg_error_type[2] == 0;
} else {
cfg_error_type == 3'b000;
}
Expand Down
1 change: 1 addition & 0 deletions hw/ip/aes/dv/tests/aes_config_error_test.sv
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class aes_config_error_test extends aes_base_test;

cfg.error_types = 4'b0001;
cfg.config_error_pct = 75;
cfg.config_error_type = 3'b111;
cfg.num_messages_min = 3;
cfg.num_messages_max = 10;
// message related knobs
Expand Down

0 comments on commit cb90c98

Please sign in to comment.