From aa998335808b6a72ff8897ecd903df73eeb7644d Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 18 Feb 2021 19:20:43 -0500 Subject: [PATCH] Tests: Show (non-)per-instance coverage --- test_regress/t/t_assert_cover.v | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test_regress/t/t_assert_cover.v b/test_regress/t/t_assert_cover.v index dd90d552e..b80282802 100644 --- a/test_regress/t/t_assert_cover.v +++ b/test_regress/t/t_assert_cover.v @@ -19,6 +19,9 @@ module t (/*AUTOARG*/ .toggle (toggle), .cyc (cyc[31:0])); + Sub sub1 (.*); + Sub sub2 (.*); + always @ (posedge clk) begin if (cyc!=0) begin cyc <= cyc + 1; @@ -142,3 +145,14 @@ module Test `endif endmodule + +module Sub + ( + input clk, + input integer cyc + ); + + // Simple cover, per-instance + pi_sub: + cover property (@(posedge clk) cyc == 3); +endmodule