mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-12 16:28:17 +00:00
Merge branch 'master' into fifo_example
Abbreviates additional btor instructions.
This commit is contained in:
commit
a808a0738c
|
@ -47,9 +47,9 @@ module top (
|
||||||
(* gclk *) reg gclk;
|
(* gclk *) reg gclk;
|
||||||
|
|
||||||
always @(posedge gclk) begin
|
always @(posedge gclk) begin
|
||||||
assume ($stable(rc) || $stable(wc));
|
|
||||||
|
|
||||||
if (!init) begin
|
if (!init) begin
|
||||||
|
assume ($stable(rc) || $stable(wc));
|
||||||
|
|
||||||
if ($rose(rc) && shadow_valid && shadow_addr == $past(ra)) begin
|
if ($rose(rc) && shadow_valid && shadow_addr == $past(ra)) begin
|
||||||
assert (shadow_data == rd);
|
assert (shadow_data == rd);
|
||||||
end
|
end
|
||||||
|
|
|
@ -117,3 +117,6 @@ Boolector
|
||||||
http://fmv.jku.at/boolector/
|
http://fmv.jku.at/boolector/
|
||||||
|
|
||||||
https://github.com/boolector/boolector
|
https://github.com/boolector/boolector
|
||||||
|
|
||||||
|
To use the ``btor`` engine you additionally need a newer version of btorsim
|
||||||
|
than the boolector setup script builds: https://github.com/boolector/btor2tools
|
||||||
|
|
45
tests/unsorted/floor_divmod.sby
Normal file
45
tests/unsorted/floor_divmod.sby
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
[options]
|
||||||
|
mode bmc
|
||||||
|
depth 1
|
||||||
|
|
||||||
|
[engines]
|
||||||
|
smtbmc
|
||||||
|
|
||||||
|
[script]
|
||||||
|
read_verilog -icells -formal test.v
|
||||||
|
prep -top top
|
||||||
|
|
||||||
|
[file test.v]
|
||||||
|
module top;
|
||||||
|
wire [7:0] a = $anyconst, b = $anyconst, fdiv, fmod, a2;
|
||||||
|
assign a2 = b * fdiv + fmod;
|
||||||
|
|
||||||
|
\$divfloor #(
|
||||||
|
.A_WIDTH(8),
|
||||||
|
.B_WIDTH(8),
|
||||||
|
.A_SIGNED(1),
|
||||||
|
.B_SIGNED(1),
|
||||||
|
.Y_WIDTH(8),
|
||||||
|
) fdiv_m (
|
||||||
|
.A(a),
|
||||||
|
.B(b),
|
||||||
|
.Y(fdiv)
|
||||||
|
);
|
||||||
|
|
||||||
|
\$modfloor #(
|
||||||
|
.A_WIDTH(8),
|
||||||
|
.B_WIDTH(8),
|
||||||
|
.A_SIGNED(1),
|
||||||
|
.B_SIGNED(1),
|
||||||
|
.Y_WIDTH(8),
|
||||||
|
) fmod_m (
|
||||||
|
.A(a),
|
||||||
|
.B(b),
|
||||||
|
.Y(fmod)
|
||||||
|
);
|
||||||
|
|
||||||
|
always @* begin
|
||||||
|
assume(b != 0);
|
||||||
|
assert(a == a2);
|
||||||
|
end
|
||||||
|
endmodule
|
Loading…
Reference in a new issue