Skip to content

Instantly share code, notes, and snippets.

@thotypous
Last active February 18, 2025 11:57
Show Gist options
  • Save thotypous/30b6a5092a659856061cf1070fa328eb to your computer and use it in GitHub Desktop.
Save thotypous/30b6a5092a659856061cf1070fa328eb to your computer and use it in GitHub Desktop.
symbiyosys and yosys-smtbmc simple example (sby -f top.sby)
[options]
mode cover
depth 20
[engines]
smtbmc yices
[script]
read -formal top.v
prep -top top
[files]
top.v
module top(input clk);
reg [31:0] i;
reg [31:0] j;
initial begin
i = 0;
// if we do not set an initial value for j, the tool will find a value such that the cover statement below is SAT
end
always @(posedge clk) begin
i <= i + 1;
j <= j + j;
cover (i == 3 && j == 32);
end
endmodule
@thotypous
Copy link
Author

According to YosysHQ/oss-cad-suite-build#87 (comment), yices is currently the fastest engine for use with smtbmc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment