passing filename at runtime to synopsys vcs 
Author Message
 passing filename at runtime to synopsys vcs

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

*******************************



Thu, 01 Jan 2004 23:35:29 GMT  
 passing filename at runtime to synopsys vcs
Hi Kiran,
      Can you show us your tst.v file? I guess you are calling the
$value$plusargs outside a procedural block (inital/always). For a
similar example see:

http://www.asicmentor.com/aa/building.htm

Here you will find a similar PLI routine $get_plus_args_call

HTH,
Srini

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

> *******************************



Fri, 02 Jan 2004 16:20:31 GMT  
 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

> *******************************



Sat, 03 Jan 2004 01:19:23 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Passing filename to $dumpfile with VCS

2. NC-Verilog (by Cadens) or VCS (by Synopsys)?

3. vcs -i command_file runtime option?

4. How to pass a string from PLI to verilog/vcs

5. How to pass a string from PLI to verilog/vcs

6. FileName as Runtime Variable not working for .tps files

7. Runtime DOS Filename

8. Bug in Beta 5 and Found Solution to Runtime DOS Filename Problem

9. Help on VCS + VirSim (GUI for VCS)

10. command line parms and assigning filenames at runtime

11. getting line number and filename at runtime

12. TclTk script filenames causing runtime errors !!!!!!!!!

 

 
Powered by phpBB® Forum Software