The default value of the dynamic array argument in SystemVerilog

According to SystemVerilog LRM 3.1a (p. 38), you can pass a dynamic array as an argument to function tasks:

 task foo( string arr[] );

Is it possible to assign a default value to this argument (an array of zero size)? Most likely, we can do with other arguments:

task foo2(int i = -1, byte z = 0); 
+4
source share
1 answer
Finally found the answer. You can execute a C-like init array during declaration. It looks like:
task foo ( byte bar[] = '{} );

By the way, it seems that there is no mention of this feature in LRM.

+3
source

All Articles