J
Jonathan Bromley
Guest
On 12 Jul 2004 16:30:20 -0700, rbingham@dotcast.com (Raymond Bingham)
wrote:
called, simply pass it in the argument list. The "parameter"
is then an input argument of the task, and therefore a local
register of the task, so you have to be careful to avoid
writing to it inadvertently.
If you want a value that's different for some instances of the
task, but fixed for each and every call of a given instance of
the task, then you need to put the task in a module and
parameterise each instance of the module.
Parameters inside a task are fine, and you can "defparam" them
from outside the task by using the task name as part of
a hierarchical name (but that's not synthesisable, of course).
Such parameters, like any others, get a fixed value when the
simulation is elaborated, and can't be changed during simulation.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services
Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
wrote:
If you want a value that's different every time the task isAnyone out there know how to pass verilog parameters to a verilog
task? Synopsys and Cadence both compile okay with parameters in the
task function, but I don't know how to change them. Can you?
called, simply pass it in the argument list. The "parameter"
is then an input argument of the task, and therefore a local
register of the task, so you have to be careful to avoid
writing to it inadvertently.
If you want a value that's different for some instances of the
task, but fixed for each and every call of a given instance of
the task, then you need to put the task in a module and
parameterise each instance of the module.
Parameters inside a task are fine, and you can "defparam" them
from outside the task by using the task name as part of
a hierarchical name (but that's not synthesisable, of course).
Such parameters, like any others, get a fixed value when the
simulation is elaborated, and can't be changed during simulation.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services
Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:jonathan.bromley@doulos.com
Fax: +44 (0)1425 471573 Web: http://www.doulos.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.