verilator/test_regress/t/t_assert_procedural_clk_bad.v

30 lines
636 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2023 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
module t (
input clk
);
integer cyc;
initial cyc = 1;
wire [7:0] cyc_copy = cyc[7:0];
always @(posedge clk) begin
if (cyc != 0) begin
cyc <= cyc + 1;
if (cyc == 9) begin
assume property (@(posedge clk) cyc == 9);
assume property (@(negedge clk) cyc == 9);
end
if (cyc == 10) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
end
endmodule