mirror of
https://github.com/YosysHQ/sby.git
synced 2025-04-12 16:28:17 +00:00
Update remaining quickstart examples
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
45a11da8ea
commit
2fa29974dd
|
@ -5,8 +5,8 @@ mode cover
|
||||||
smtbmc
|
smtbmc
|
||||||
|
|
||||||
[script]
|
[script]
|
||||||
read_verilog -formal cover.v
|
read -formal cover.sv
|
||||||
prep -top top
|
prep -top top
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
cover.v
|
cover.sv
|
||||||
|
|
|
@ -8,6 +8,10 @@ module top (
|
||||||
state <= ((state << 5) + state) ^ din;
|
state <= ((state << 5) + state) ^ din;
|
||||||
end
|
end
|
||||||
|
|
||||||
cover property (state == 'd 12345678);
|
`ifdef FORMAL
|
||||||
cover property (state == 'h 12345678);
|
always @(posedge clk) begin
|
||||||
|
cover (state == 'd 12345678);
|
||||||
|
cover (state == 'h 12345678);
|
||||||
|
end
|
||||||
|
`endif
|
||||||
endmodule
|
endmodule
|
|
@ -7,8 +7,8 @@ expect fail
|
||||||
smtbmc boolector
|
smtbmc boolector
|
||||||
|
|
||||||
[script]
|
[script]
|
||||||
read_verilog -formal memory.v
|
read -formal memory.sv
|
||||||
prep -top testbench
|
prep -top testbench
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
memory.v
|
memory.sv
|
||||||
|
|
|
@ -12,7 +12,7 @@ module testbench (
|
||||||
.rdata(rdata)
|
.rdata(rdata)
|
||||||
);
|
);
|
||||||
|
|
||||||
wire [9:0] test_addr = $anyconst;
|
(* anyconst *) reg [9:0] test_addr;
|
||||||
reg test_data_valid = 0;
|
reg test_data_valid = 0;
|
||||||
reg [7:0] test_data;
|
reg [7:0] test_data;
|
||||||
|
|
|
@ -5,8 +5,8 @@ mode prove
|
||||||
smtbmc
|
smtbmc
|
||||||
|
|
||||||
[script]
|
[script]
|
||||||
read_verilog -formal prove.v
|
read -formal prove.sv
|
||||||
prep -top testbench
|
prep -top testbench
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
prove.v
|
prove.sv
|
||||||
|
|
|
@ -8,11 +8,15 @@ module testbench (
|
||||||
.clk (clk ),
|
.clk (clk ),
|
||||||
.reset(reset),
|
.reset(reset),
|
||||||
.din (din ),
|
.din (din ),
|
||||||
.dout (dout ),
|
.dout (dout )
|
||||||
);
|
);
|
||||||
|
|
||||||
initial assume (reset);
|
reg init = 1;
|
||||||
assert property (reset || !dout[1:0]);
|
always @(posedge clk) begin
|
||||||
|
if (init) assume (reset);
|
||||||
|
if (!reset) assert (!dout[1:0]);
|
||||||
|
init <= 0;
|
||||||
|
end
|
||||||
endmodule
|
endmodule
|
||||||
|
|
||||||
module demo (
|
module demo (
|
|
@ -190,7 +190,7 @@ also be a useful method for evaluating engines.)
|
||||||
|
|
||||||
Let's consider the following example:
|
Let's consider the following example:
|
||||||
|
|
||||||
.. literalinclude:: ../examples/quickstart/memory.v
|
.. literalinclude:: ../examples/quickstart/memory.sv
|
||||||
:language: systemverilog
|
:language: systemverilog
|
||||||
|
|
||||||
This example is expected to fail verification (see the BUG comment).
|
This example is expected to fail verification (see the BUG comment).
|
||||||
|
@ -224,7 +224,7 @@ Bounded model checks only prove that the safety properties hold for the first
|
||||||
and we need to prove that the safety properties hold forever, not just the first
|
and we need to prove that the safety properties hold forever, not just the first
|
||||||
*N* cycles. Let us consider the following example:
|
*N* cycles. Let us consider the following example:
|
||||||
|
|
||||||
.. literalinclude:: ../examples/quickstart/prove.v
|
.. literalinclude:: ../examples/quickstart/prove.sv
|
||||||
:language: systemverilog
|
:language: systemverilog
|
||||||
|
|
||||||
Proving this design in an unbounded manner can be achieved using the following
|
Proving this design in an unbounded manner can be achieved using the following
|
||||||
|
|
Loading…
Reference in a new issue