Reading from file, File is updating at runtime

In reply to dave_59:

My C-Reference model is running parallel with RTL.

From my SV testbench I am forwarding transaction (ex WRITE: Data and (x,y) Location) to RTL using dedicated interface and also at same time C Model is also getting same transaction using DPI connection. Now based (x,y) location value, both RTL and C Model are calculating Address and updating their MEMORY.

Now my main goal is, RTL is calculating and updating correct memory or not. C Model is giving me one file in which it is providing me Address and Data and based on that address I will reading RTL memory (backdoor access). And by the help of this file provided by golden C Reference model I can compare the data based on the address.

I can also check this after run_phase, but I need to know that Is it possible to fetch the data during file is still updating from other source? If it is possible then I will definitely go ahead with this approach.