mirror of
https://github.com/verilator/verilator.git
synced 2025-02-02 03:34:05 +00:00
Tests: Show (non-)per-instance coverage
This commit is contained in:
parent
120322df3e
commit
aa99833580
@ -19,6 +19,9 @@ module t (/*AUTOARG*/
|
|||||||
.toggle (toggle),
|
.toggle (toggle),
|
||||||
.cyc (cyc[31:0]));
|
.cyc (cyc[31:0]));
|
||||||
|
|
||||||
|
Sub sub1 (.*);
|
||||||
|
Sub sub2 (.*);
|
||||||
|
|
||||||
always @ (posedge clk) begin
|
always @ (posedge clk) begin
|
||||||
if (cyc!=0) begin
|
if (cyc!=0) begin
|
||||||
cyc <= cyc + 1;
|
cyc <= cyc + 1;
|
||||||
@ -142,3 +145,14 @@ module Test
|
|||||||
`endif
|
`endif
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
|
module Sub
|
||||||
|
(
|
||||||
|
input clk,
|
||||||
|
input integer cyc
|
||||||
|
);
|
||||||
|
|
||||||
|
// Simple cover, per-instance
|
||||||
|
pi_sub:
|
||||||
|
cover property (@(posedge clk) cyc == 3);
|
||||||
|
endmodule
|
||||||
|
Loading…
Reference in New Issue
Block a user