[dv] reorg hmac_bind & add CSR asserts
Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/hw/ip/hmac/dv/hmac_sim.core b/hw/ip/hmac/dv/hmac_sim.core
index 5caa2af..456b25e 100644
--- a/hw/ip/hmac/dv/hmac_sim.core
+++ b/hw/ip/hmac/dv/hmac_sim.core
@@ -8,13 +8,11 @@
files_rtl:
depend:
- lowrisc:ip:hmac:0.1
- files:
- - tb/hmac_bind.sv
- file_type: systemVerilogSource
files_dv:
depend:
- lowrisc:dv:hmac_test
+ - lowrisc:dv:hmac_sva
files:
- tb/tb.sv
file_type: systemVerilogSource
diff --git a/hw/ip/hmac/dv/tb/hmac_bind.sv b/hw/ip/hmac/dv/sva/hmac_bind.sv
similarity index 63%
rename from hw/ip/hmac/dv/tb/hmac_bind.sv
rename to hw/ip/hmac/dv/sva/hmac_bind.sv
index fc7ef4c..d84c2e4 100644
--- a/hw/ip/hmac/dv/tb/hmac_bind.sv
+++ b/hw/ip/hmac/dv/sva/hmac_bind.sv
@@ -13,5 +13,14 @@
.d2h (tl_o)
);
+ import hmac_reg_pkg::*;
+ bind hmac hmac_csr_assert_fpv hmac_csr_assert (
+ .clk_i,
+ .rst_ni,
+ .h2d (tl_i),
+ .d2h (tl_o),
+ .reg2hw (reg2hw),
+ .hw2reg (hw2reg)
+ );
endmodule
diff --git a/hw/ip/hmac/dv/sva/hmac_sva.core b/hw/ip/hmac/dv/sva/hmac_sva.core
new file mode 100644
index 0000000..a7b4b98
--- /dev/null
+++ b/hw/ip/hmac/dv/sva/hmac_sva.core
@@ -0,0 +1,28 @@
+CAPI=2:
+# Copyright lowRISC contributors.
+# Licensed under the Apache License, Version 2.0, see LICENSE for details.
+# SPDX-License-Identifier: Apache-2.0
+name: "lowrisc:dv:hmac_sva:0.1"
+description: "HMAC assertion modules and bind file."
+filesets:
+ files_dv:
+ depend:
+ - lowrisc:tlul:headers
+ - lowrisc:fpv:csr_assert_gen
+ files:
+ - hmac_bind.sv
+ file_type: systemVerilogSource
+
+generate:
+ csr_assert_gen:
+ generator: csr_assert_gen
+ parameters:
+ spec: ../../data/hmac.hjson
+ depend: lowrisc:ip:hmac
+
+targets:
+ default:
+ filesets:
+ - files_dv
+ generate:
+ - csr_assert_gen