hi i have a hex file like below format
Addr1 data1 //comment
i want to use addr data or each line and load into memory for that i have written a code something like this.
while (!$feof(addr_data_file)) begin
scan_file = $fscanf(addr_data_file, "%h %h", addr,data);
agent.slave[0].slave_mem.write(addr, data); // write data to slave memory
read_data = agent.slave[0].slave_mem.read(addr); // read if the data is written in to the memory or not
$display("my data read through backdoor addr= %0h : data= %0h",addr, read_data);
end
its only loading first data again and again. i know the issue is coming because of comments because when i remove them its working fine but i need to keep the comments. any solution for the same ??