$writememh

E

ekilada

Guest
Hi all,
I need to dump some memory contents into a file using $writememh
e.g.,
$writememh("file.dat",driver.top.mem);
Unfortunately I got the following warning in modelsim:

** Warning: (vsim-PLI-3003)
[TOFD] - System task or function '$writememh' is not defined.

Can u help in this please?
Are there any alternatives to writememh ?


Best Regards,
Eliyah
 
It is pretty easy to write Verilog code to dump the contents of a
memory into a file, though you do need to know the starting and ending
addresses of the memory:

integer fp, i;
....
fp = $fopen("file.dat");
for (i = start_addr; i <= end_addr; i = i + 1)
$fdisplayh(fp, driver.top.mem);
$fclose(fp);
 
SystemVerilog has it in language, perhaps try compiling with SV switch
with vlog command. Not sure if MTI supports it though.

Another option would be to take the Open source implementation of
writememh from icarus and add it to Modelsim.

Ajeetha
www.noveldv.com
 

Welcome to EDABoard.com

Sponsor

Back
Top