refine test name and format

This commit is contained in:
Yilou Wang 2026-06-17 12:00:30 +02:00
parent 3113af1f31
commit ca4e7ff92f
4 changed files with 7 additions and 13 deletions

View File

@ -4,9 +4,8 @@
// SPDX-FileCopyrightText: 2026 PlanV GmbH
// SPDX-License-Identifier: CC0-1.0
// verilog_format: off
module t (
input clk
input clk
);
int unsigned crc = 32'h1;
bit a, b;
@ -14,20 +13,19 @@ module t (
int fails_single = 0;
int fails_multi = 0;
// Single-cycle clocked sequence body (IEEE 1800-2023 16.7).
// verilog_format: off // verible does not support clocking events inside sequence declarations
sequence s_single;
@(posedge clk) a;
endsequence
// Multi-cycle clocked sequence body.
sequence s_multi;
@(posedge clk) (a ##1 b);
endsequence
// Declared but never referenced; must not reach codegen.
sequence s_unused;
@(posedge clk) b;
endsequence
// verilog_format: on
ap_single: assert property (s_single) else fails_single = fails_single + 1;
ap_multi: assert property (s_multi) else fails_multi = fails_multi + 1;

View File

@ -4,13 +4,13 @@
// SPDX-FileCopyrightText: 2026 PlanV GmbH
// SPDX-License-Identifier: CC0-1.0
// verilog_format: off
module t (
input clk,
input clk2
input clk,
input clk2
);
logic a, b;
// verilog_format: off
sequence s_multi;
@(posedge clk) a;
endsequence
@ -22,14 +22,10 @@ module t (
sequence s_level;
@clk a;
endsequence
// verilog_format: on
// Multiclocked: explicit assertion clock differs from the sequence clock.
assert property (@(posedge clk2) s_multi);
// Clocking event nested inside a larger sequence expression.
assert property (s_nest ##1 a);
// Non-edge clocking event on a sequence.
assert property (s_level);
endmodule