mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-18 09:12:18 +00:00
More yosys-smtbmc smtc features
This commit is contained in:
parent
ee3e7a0e45
commit
ad56ad44c3
5 changed files with 97 additions and 20 deletions
18
examples/smtbmc/demo3.v
Normal file
18
examples/smtbmc/demo3.v
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Whatever the initial content of this memory is at reset, it will never change
|
||||
// see demo3.smtc for assumptions and assertions
|
||||
|
||||
module demo3(input clk, rst, input [15:0] addr, output reg [31:0] data);
|
||||
reg [31:0] mem [0:2**16-1];
|
||||
reg [15:0] addr_q;
|
||||
|
||||
always @(posedge clk) begin
|
||||
if (rst) begin
|
||||
data <= mem[0] ^ 123456789;
|
||||
addr_q <= 0;
|
||||
end else begin
|
||||
mem[addr_q] <= data ^ 123456789;
|
||||
data <= mem[addr] ^ 123456789;
|
||||
addr_q <= addr;
|
||||
end
|
||||
end
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue