I have simulated the Block Memory Generator 8.0 example design and I wish to view the contents of the block RAM, however it always appears to be undefined, "0xUU".
Is it possible to view the contents?
In the simulation model generated by the Block Memory Generator core, "blk_mem_gen_v8_0.vhd", the signal "memory_i" is declared as a 2-dimensional array to the memory content when DEBUG = 1.
See the following lines:
Manually changing the DEBUG constant to '1' and running the simulation will allow you to view the block RAM contents.
For ModelSim, there is a Memory List Window, or you can use the "mem_display" command to print the memory contents of the specified instance to the Transcript window.
mem_display -startaddress 0 -endaddress 5 /blk_mem_gen_0_tb/blk_mem_gen_0_synth_inst/BMG_PORT/bmg0/U0/native_mem_module/mem_module
This command displays the memory contents of the instance /blk_mem_gen_0_tb/blk_mem_gen_0_synth_inst/BMG_PORT/bmg0/U0/native_mem_module/mem_module, addresses 0 to 5.