[dv/sram] add multiple_keys test
this PR is a follow-up to the smoke test PR, and adds the multiple_keys
test as specified in the testlist.
Signed-off-by: Udi Jonnalagadda <udij@google.com>
diff --git a/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_multiple_keys_vseq.sv b/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_multiple_keys_vseq.sv
new file mode 100644
index 0000000..12ffbdd
--- /dev/null
+++ b/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_multiple_keys_vseq.sv
@@ -0,0 +1,20 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+class sram_ctrl_multiple_keys_vseq extends sram_ctrl_smoke_vseq;
+
+ `uvm_object_utils(sram_ctrl_multiple_keys_vseq)
+ `uvm_object_new
+
+ // Use 2 as the low end since `num_trans == 1` is the default for the smoke test.
+ constraint num_trans_c {
+ num_trans dist {
+ [2 : 13] :/ 2,
+ [14 : 25] :/ 3,
+ [25 : 37] :/ 4,
+ [38 : 50] :/ 1
+ };
+ }
+
+endclass
diff --git a/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_vseq_list.sv b/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_vseq_list.sv
index 266402c..eb4cdfa 100644
--- a/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_vseq_list.sv
+++ b/hw/ip/sram_ctrl/dv/env/seq_lib/sram_ctrl_vseq_list.sv
@@ -5,3 +5,4 @@
`include "sram_ctrl_base_vseq.sv"
`include "sram_ctrl_smoke_vseq.sv"
`include "sram_ctrl_common_vseq.sv"
+`include "sram_ctrl_multiple_keys_vseq.sv"
diff --git a/hw/ip/sram_ctrl/dv/env/sram_ctrl_env.core b/hw/ip/sram_ctrl/dv/env/sram_ctrl_env.core
index da2022f..7b06775 100644
--- a/hw/ip/sram_ctrl/dv/env/sram_ctrl_env.core
+++ b/hw/ip/sram_ctrl/dv/env/sram_ctrl_env.core
@@ -22,6 +22,7 @@
- seq_lib/sram_ctrl_base_vseq.sv: {is_include_file: true}
- seq_lib/sram_ctrl_common_vseq.sv: {is_include_file: true}
- seq_lib/sram_ctrl_smoke_vseq.sv: {is_include_file: true}
+ - seq_lib/sram_ctrl_multiple_keys_vseq.sv: {is_include_file: true}
file_type: systemVerilogSource
generate:
diff --git a/hw/ip/sram_ctrl/dv/sram_ctrl_base_sim_cfg.hjson b/hw/ip/sram_ctrl/dv/sram_ctrl_base_sim_cfg.hjson
index 0da9022..10b3525 100644
--- a/hw/ip/sram_ctrl/dv/sram_ctrl_base_sim_cfg.hjson
+++ b/hw/ip/sram_ctrl/dv/sram_ctrl_base_sim_cfg.hjson
@@ -69,8 +69,10 @@
name: "{variant}_smoke"
uvm_test_seq: sram_ctrl_smoke_vseq
}
-
- // TODO: add more tests here
+ {
+ name: "{variant}_multiple_keys"
+ uvm_test_seq: sram_ctrl_multiple_keys_vseq
+ }
]
// List of regressions.