[dv] reorg usbuart bind & add CSR asserts
Signed-off-by: Srikrishna Iyer <sriyer@google.com>
diff --git a/hw/ip/usbuart/dv/tb/usbuart_bind.sv b/hw/ip/usbuart/dv/sva/usbuart_bind.sv
similarity index 62%
rename from hw/ip/usbuart/dv/tb/usbuart_bind.sv
rename to hw/ip/usbuart/dv/sva/usbuart_bind.sv
index 3d38796..0f0f7c0 100644
--- a/hw/ip/usbuart/dv/tb/usbuart_bind.sv
+++ b/hw/ip/usbuart/dv/sva/usbuart_bind.sv
@@ -13,4 +13,14 @@
.d2h (tl_o)
);
+ import usbuart_reg_pkg::*;
+ bind usbuart usbuart_csr_assert_fpv usbuart_csr_assert (
+ .clk_i,
+ .rst_ni,
+ .h2d (tl_i),
+ .d2h (tl_o),
+ .reg2hw (reg2hw),
+ .hw2reg (hw2reg)
+ );
+
endmodule
diff --git a/hw/ip/usbuart/dv/sva/usbuart_sva.core b/hw/ip/usbuart/dv/sva/usbuart_sva.core
new file mode 100644
index 0000000..c2f5b42
--- /dev/null
+++ b/hw/ip/usbuart/dv/sva/usbuart_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:usbuart_sva:0.1"
+description: "USBUART assertion modules and bind file."
+filesets:
+ files_dv:
+ depend:
+ - lowrisc:tlul:headers
+ - lowrisc:fpv:csr_assert_gen
+ files:
+ - usbuart_bind.sv
+ file_type: systemVerilogSource
+
+generate:
+ csr_assert_gen:
+ generator: csr_assert_gen
+ parameters:
+ spec: ../../data/usbuart.hjson
+ depend: lowrisc:ip:usbuart
+
+targets:
+ default:
+ filesets:
+ - files_dv
+ generate:
+ - csr_assert_gen