My knowledge on the subject is bare-bones. I created a .coe file and used Block Memory Generator to get an .mif file. I need to store the contents in the block memory and then use it. Following is my code:

reg [15:0] music [0:255];
initial
$readmemh("blk_mem_gen_1.mif", music); integer i; initial begin for(i=0; i<16; i=i+1)$display("music[%d] = %h", i, music[i]);
end
endmodule

As you can probably tell, I have no idea what I am doing. Please guide me through and point me to some resources if you happen to know some.

• This is just to test if I can read data successfully. With \$display I was hoping to get an output on Tcl console. My experience with Vivado is limited to 4-bit full adder using switches and LEDs. – Maxsash Oct 24 '19 at 3:38
• so what happened when you compiled this ... were correct values read ? (I assume your coe file has contents which you added correctly) – Mitu Raj Oct 24 '19 at 4:17
• @MituRaj No. There is no output in the console. Additionally from the Utilization report I can see that No Block RAM Tile is being utilized at all, which tells me I am doing something fundamentally wrong. – Maxsash Oct 24 '19 at 4:20
• Give the full path of .mif file in the code ... – Mitu Raj Oct 24 '19 at 4:25
• @MituRaj Thanks a lot! This seems to be working for now. Edit: I see output in the console now, though the Block RAM utilization is still zero. Any ideas? – Maxsash Oct 24 '19 at 4:41