Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I am trying this code for reading a text file. but when i simulate it, my output at Mem is XXXXXXXXXX . can any1 help me whr i am rong??
module readmemh_demo;
reg [31:0] Mem [0:11];
initial $readmemh("data.txt",Mem);
integer k;
initial begin
#10;
$display("Contents of Mem after reading data file:");
for (k=0; k<6; k=k+1) $display("%d:%h",k,Mem[k]);
end
endmodule
EXAMPLE: data.txt file
234ac
23ca5
b3c34
23a4a
234ca
b3234