Re: $readmemb
If you know the hierarchical path to the memory storage array to your memory model, you can write a simple verilog routines like the following to use in initializing your memory.
task write_mem_backdoor;
input [13:0] addr;
input [23:0] data;
begin
dut.eGigatron.egig_prcsr.ltl_tb_u0.inst.memory[addr] = data;
end
endtask
task read_mem_backdoor;
input [13:0] addr;
output[23:0] data;
begin
data = dut.eGigatron.egig_prcsr.ltl_tb_u0.inst.memory[addr];
end
endtask
initial begin
for (i = 0; i < 14'h3fff; i = i + 1) begin
write_mem_backdoor(i, 0); // initial all mem locations to 0
end
end