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:
parent
2ee136fab3
commit
a153349ac8
2 changed files with 59 additions and 3 deletions
39
tests/intertask/killer.sby
Normal file
39
tests/intertask/killer.sby
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue