RVSCC/test/test_cache_memory.sv

30 lines
462 B
Systemverilog
Raw Normal View History

2023-02-26 23:26:11 +00:00
`timescale 1ns / 1ps
module test_cache_memory ();
logic [31:0] addr, write_data, read_data;
logic clk, rst, write_enable;
CacheMemory cache_memory (
.clk(clk),
.rst(rst),
write_enable,
write_data,
read_data
);
always #5 clk = ~clk;
initial begin
clk = 0;
rst = 1;
write_enable = 0;
#25 rst = 0;
addr = 'd7;
write_enable = 1;
write_data = 'd10;
#25 write_enable = 0;
end
endmodule