From: Martin W. <mai...@ma...> - 2010-04-21 22:21:54
|
Cary R. wrote: > We have a feature request to add the ability to call a system > function as a task. This only really makes sense for the > functions that return an error code (e.g. $rewind, etc.), but > to be consistent this would likely apply to all the system > functions. > > My first reaction is this should not be allowed, but I wanted > to get input from others and to see if SystemVerilog added > this capability. If we were to add this I think Icarus should > issue a warning that could not be disabled. The original > poster said ModelSim supports this syntax. Do other > simulators support it as well? > NC-Verilog doesn't allow this (even with the +sv option). > I can find nothing in the standard that would imply this is > acceptable behavior. > The formal syntax definition seems pretty explicit that this is not allowed. If you did decide to support this, I'd suggest using a -g option to enable it. But I'm not convinced it's worth the effort, or that it's a good idea to encourage users to write non-portable code. Martin |