3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-09-02 09:40:43 +00:00
sby/tests/intertask/killer.sby
Krystine Sherwin a153349ac8
Initial intertask cancellation
Taskloops store tasks_done, tasks can be cancelled, and if a task named "killer" is in tasks_done then any other tasks are cancelled.
2025-07-09 10:03:54 +12:00

39 lines
546 B
Text

[tasks]
killer
aborted
[options]
mode bmc
depth 100
expect fail,cancelled
[engines]
killer: btor btormc
aborted: smtbmc boolector
[script]
killer: read -define MAX=7
aborted: read -define MAX=14
read -formal demo.sv
prep -top demo
[file demo.sv]
module demo (
input clk,
output reg [5:0] counter
);
initial counter = 0;
always @(posedge clk) begin
if (counter == 15)
counter <= 0;
else
counter <= counter + 1;
end
`ifdef FORMAL
always @(posedge clk) begin
assert (counter < `MAX);
end
`endif
endmodule