Code

R

rsk

Guest
Hi Friends,

Can you please kindly explain me what does the following code says in
detail.

if ($test$plusargs("variable="))
plusargs_status=$value$plusargs("variable=%d", enable); else enable =
1'b0;


Thanks in advance.
 
On Fri, 25 May 2007 03:14:23 -0400, "rsk" <krs_1980@yahoo.co.in>
wrote:

Hi Friends,

Can you please kindly explain me what does the following code says in
detail.

if ($test$plusargs("variable="))
plusargs_status=$value$plusargs("variable=%d", enable); else enable =
1'b0;
It allows you to use a command-line option, such as

verilog ...... +variable=1 .....

and the value of the "+variable=" option will automatically set
your Verilog variable "enable". If your user does not provide
the +variable= argument, then $test$plusargs returns "false"
and your Verilog variable "enable" is defaulted to 1'b0.

////////

Just a thought for the future: The subject line "Code" is not
very informative. Something like "What does $test$plusargs mean?"
would have been easier to understand...
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top