UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
7,390 Views
Registered: ‎04-19-2014

-testplusarg argument with the '=' character fails in xsim, Vivado 2014.1

As shown below, giving xsim a -testplusarg option with an argument including a '=' character results in error:

 

FAIL

> xsim work.main -testplusarg plusarg=1 --runall

ERROR: Problem with usage of option: too many positional options have been specified on
the command line. Please see the usage below.

 

PASS

> xsim work.main -testplusarg plusarg --runall


****** xsim v2014.1
  **** SW Build 881834 on Fri Apr 4 14:09:24 MDT 2014
  **** IP Build 877625 on Fri Mar 28 16:29:15 MDT 2014
    ** Copyright 1986-2014 Xilinx, Inc. All Rights Reserved.

 

source xsim.dir/work.main/xsim_script.tcl
# xsim {work.main} -maxdeltaid 10000 -testplusarg plusarg -runall
Vivado Simulator 2014.1
Time resolution is 1 ps
run -all

0 Kudos
5 Replies
Moderator
Moderator
7,368 Views
Registered: ‎04-17-2011

Re: -testplusarg argument with the '=' character fails in xsim, Vivado 2014.1

What happens if you use:
xsim work.main -testplusarg "plusarg=1" --runall

Also, can you post the underlying code where $test$plusargs is called?
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
7,356 Views
Registered: ‎04-19-2014

Re: -testplusarg argument with the '=' character fails in xsim, Vivado 2014.1

Hi Debraj,

 

I tried enclosing plusarg=1 and plusarg in double quotes, but the results were the same.

 

FAIL

> xsim work.main -testplusarg "plusarg=1" --runall

ERROR: Problem with usage of option: too many positional options have been specified on 
the command line. Please see the usage below.

 

PASS

> xsim work.main -testplusarg "plusarg" --runall


****** xsim v2014.1
  **** SW Build 881834 on Fri Apr 4 14:09:24 MDT 2014
  **** IP Build 877625 on Fri Mar 28 16:29:15 MDT 2014
    ** Copyright 1986-2014 Xilinx, Inc. All Rights Reserved.

 

source xsim.dir/work.main/xsim_script.tcl
# xsim {work.main} -maxdeltaid 10000 -testplusarg plusarg -runall
Vivado Simulator 2014.1
Time resolution is 1 ps
run -all

 

Regarding the Verilog code, I used a simple file which does not handle any plusargs,

but this must not be a problem.

 

module main;
    initial $display( "Hello, world!" );
endmodule // main

 

0 Kudos
Moderator
Moderator
7,348 Views
Registered: ‎04-17-2011

Re: -testplusarg argument with the '=' character fails in xsim, Vivado 2014.1

I tested plusargs at my end with a simple code:

module valuetest();

integer i;

initial
begin
if($value$plusargs("INTG=%d",i))
$display(" GOT INTEGER ");
$display(" Integer is %d ",i);
end

endmodule

 

And in xsim used: -testplusarg INTG=123

Output:

GOT INTEGER
Integer is 123

 

So it works perfectly fine in Vivado Simulator.

Try this out. If you dont have any values to pass then the tool wont take it.

Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
7,345 Views
Registered: ‎04-19-2014

Re: -testplusarg argument with the '=' character fails in xsim, Vivado 2014.1

Hi Debrajr,

 

Thank you for your information. Though I could not get the same result as you, your information implies that the error may not be caused by the simulator, but by my environment. I am invoking xsim directly from tcsh running on Cygwin 1.7, setting $PATH to /cygdrive/c/Xilinx/Vivado/2014.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin...

 

Regards,

 

0 Kudos
Moderator
Moderator
7,342 Views
Registered: ‎04-17-2011

Re: -testplusarg argument with the '=' character fails in xsim, Vivado 2014.1

Cygwin shell had few other issues so I would suggest you to use Windows or try it in Vivado GUI.
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos