How to use writememh in a sequence

Hi,

I wanted to randomise memory contents and dump it into a file which will be read using readmemh in other sequence.
I used writememh in the sequence to dump the randomized array bytes into a file.
Here the file was created and default comments were there, but the array bytes were not written into the file. How to use writememh from a sequence?
Do i have to import/include anything? Or is it not supported?

Note : I tried giving writememh from a system verilog module file, then it worked.
But i need it to be written from a sequence.

You probably declare the memory as static.

In reply to dave_59:

Ok Thanks. I will try that.

In reply to dave_59:

Thanks Dave. Making memory as static helps.