3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-08-31 08:44:57 +00:00

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.
This commit is contained in:
Krystine Sherwin 2025-07-09 10:03:54 +12:00
parent 2ee136fab3
commit a153349ac8
No known key found for this signature in database
2 changed files with 59 additions and 3 deletions

View file

@ -0,0 +1,39 @@
[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