M
mel
Guest
Hi pips!
I'm currently using a serial fprom model with a reference to a memory
file. Looks something like this:
module memory_access();
parameter initfile="../../../../m25p20/memory.txt";
...
...
...
$readmemh(initfile, mem_array);
endmodule
When I run a simulation test, this works out just fine. However, if
the sfprom model is used
by a larger module and I run a simulation at a different directory
location, it will produce a warning stating that the memory.txt file
can not be open for reading. To fix this problem, I modified it to
use an absolute path rather than a relative path. I used,
parameter initfile = "$asic_home/m25p20/memory.txt";
My problem is: the "$" sign is a keyword, and the compiler treats
anything after it as a system task. Is there any other way to define
the absolute path for the $readmemh()
system task?
tnx.. =)
I'm currently using a serial fprom model with a reference to a memory
file. Looks something like this:
module memory_access();
parameter initfile="../../../../m25p20/memory.txt";
...
...
...
$readmemh(initfile, mem_array);
endmodule
When I run a simulation test, this works out just fine. However, if
the sfprom model is used
by a larger module and I run a simulation at a different directory
location, it will produce a warning stating that the memory.txt file
can not be open for reading. To fix this problem, I modified it to
use an absolute path rather than a relative path. I used,
parameter initfile = "$asic_home/m25p20/memory.txt";
My problem is: the "$" sign is a keyword, and the compiler treats
anything after it as a system task. Is there any other way to define
the absolute path for the $readmemh()
system task?
tnx.. =)