3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-11-25 23:19:35 +00:00

tests/memfile: Test dump_meminit

Change tests/memfile to a mktest, moving the prior run-test.sh contents into a new read_dir.sh.
Add dump.ys (and friends) for testing dump_meminit.
This commit is contained in:
Krystine Sherwin 2025-11-14 11:47:40 +13:00
parent 7d79c11ca9
commit 3787ea19cd
No known key found for this signature in database
7 changed files with 152 additions and 49 deletions

19
tests/memfile/dump_gate.v Normal file
View file

@ -0,0 +1,19 @@
module gate (
input clk, wen,
input [2:0] addr,
input [3:0] wdata,
output [3:0] rdata
);
reg [3:0] m [7:0];
initial
$readmemh("gold.m.mem", m);
always @(posedge clk) begin
if (wen)
m[addr] <= wdata;
else
rdata <= m[addr];
end
endmodule