
passing filename at runtime to synopsys vcs
What the error message is saying is that you are calling a function like a
task, i.e. you need to do
reg rReturnValue;
rReturnValue = $value$plusargs("MYSTR=%S",string);
I've done this sort of stuff before with vcs, but not with this particular
pli. One thing you should be careful about is that not all of the functions
will work with "reg strings." For example,
reg [16*8-1:0] MYSTR;
MYSTR = "filename.mem";
FD = $fopen(MYSTR);
may not work, where as
FD = $fopen("filename.mem"); will work.
You need to test to see if the calls you are trying to make will work.
I can't remember which, but there was a call that didn't handle leading 0's
of "reg strings" properly. So I had to replace all leading 0's with
.//////( that's a dot followed by slashes which refers to the directory
where simv is). I think it may have been $readmemh that I needed to this to.
Hope this helps.
Quote:
> hi all
> I am trying to pass a filename at the commandline
> which has to be read into a memory.
> eg :
> vcs <verilog filename> -P pli.tab pli.c
> simv <file to be read into the memory using readmemh>
> i tried the $value$plusargs pli from chris spears webpage but it gives the
> follg error message
> Error-[FIWTE] System function invoked where a system task was expected
> '$value$plusargs' is a function, not a task
> "tst.v", 5: token is ','
> $value$plusargs("MYSTR=%S",string) ;
> TIA
> -kiran
> *******************************
> Kiran Puttaswamy
> Georgia Institute of Technology,
> Atlanta Georgia, 30332
> *******************************