Last active
October 24, 2018 12:18
-
-
Save olofk/1850f1e9d2c0e475c4c184731b7d5b92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[options] | |
mode prove | |
depth 10 | |
[engines] | |
smtbmc | |
[script] | |
read_verilog -formal ror.v | |
prep -top ror | |
[files] | |
ror.v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`default_nettype none | |
module ror | |
( | |
input clk, | |
output reg [LEN-1:0] q = 'd1); | |
parameter LEN = 4; | |
always @(posedge clk) | |
q <= {q[0], q[LEN-1:1]}; | |
`ifdef FORMAL | |
reg [LEN-1:0] qvalid = 'd0; | |
always @(posedge clk) begin | |
qvalid <= {1'b1, qvalid[LEN-1:1]}; | |
cover(&(qvalid)); | |
if (&(qvalid)) | |
assert (q == $past(q, LEN)); | |
end | |
`endif | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment