3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-04-11 00:13:33 +00:00

Merge pull request from jix/const_clocks

Test uninitialized FFs with constant clocks and fix btor script for this
This commit is contained in:
Jannis Harder 2022-07-04 17:47:16 +02:00 committed by GitHub
commit ab98938faa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 1 deletions
sbysrc
tests/regression

View file

@ -653,7 +653,7 @@ class SbyTask(SbyConfig):
print("abc", file=f)
print("opt_clean", file=f)
else:
print("opt -fast", file=f)
print("opt -fast -keepdc", file=f)
print("delete -output", file=f)
print("dffunmap", file=f)
print("stat", file=f)

View file

@ -0,0 +1,43 @@
[tasks]
btor
smt
btor_m btor multiclock
smt_m smt multiclock
[options]
mode bmc
multiclock: multiclock on
[engines]
#smtbmc
btor: btor btormc
smt: smtbmc boolector
[script]
read_verilog -formal const_clocks.sv
prep -flatten -top top
[file const_clocks.sv]
module top(
input clk,
input [7:0] d
);
(* keep *)
wire [7:0] some_const = $anyconst;
wire [7:0] q;
ff ff1(.clk(1'b0), .d(d), .q(q));
initial assume (some_const == q);
initial assume (q != 0);
always @(posedge clk) assert(some_const == q);
endmodule
module ff(input clk, input [7:0] d, (* keep *) output reg [7:0] q);
always @(posedge clk) q <= d;
endmodule