3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-02 12:37:53 +00:00

add tests

This commit is contained in:
N. Engelhardt 2025-10-14 15:48:16 +02:00
parent 1f11b2c529
commit 4513783a02
4 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,13 @@
module sub_rom (input clk, input [3:0] addr, output reg [7:0] data);
reg [7:0] mem [0:15];
always @(posedge clk)
data <= mem[addr];
endmodule
module top (input clk, input [3:0] addr, output [7:0] data, input [3:0] f_addr, input [7:0] f_data);
sub_rom u_sub_rom (clk, addr, data);
always @(posedge clk)
assume(u_sub_rom.mem[f_addr] == f_data);
endmodule