Hi,
I’m trying to create sparse memory for DDR3 simulation and depth could be vary from 128Mb to 64Gb.
In my simulation model Memory depth will vary as per MEM_SIZE = 128Mb to 64Gb, I want fill only some specific locations in memory like 2^10,2^17,2^4…etc.
But I’m not able to configure memory depth at simulation starting time,
Could anyone suggest me that how to create Sparse Memory.
I’m creating Sparse memory with associative array.
logic [`DATA_WIDTH-1:0] mem[*];
if(we)
begin
mem[addr] = data_in;
$display("\tNumber of entries of Memory%0d",mem.num());
$display("\tSize of Memory%0d",mem.size());
end
else data_out <= mem[addr];