3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-15 07:15:28 +00:00

Added $anyconst support to yosys-smtbmc

This commit is contained in:
Clifford Wolf 2016-08-30 19:27:42 +02:00
parent 6f41e5277d
commit aa25a4cec6
7 changed files with 58 additions and 2 deletions

18
examples/smtbmc/demo5.v Normal file
View file

@ -0,0 +1,18 @@
// Demo for $anyconst
module demo5 (input clk);
wire [7:0] step_size = $anyconst;
reg [7:0] state = 0, count = 0;
reg [31:0] hash = 0;
always @(posedge clk) begin
count <= count + 1;
hash <= ((hash << 5) + hash) ^ state;
state <= state + step_size;
end
always @* begin
if (count == 42)
assert(hash == 32'h A18FAC0A);
end
endmodule