System Verilog Functions. Verilog functions here.
In System Verilog, functions have added functionality. It now supports “void” function calls and also allow formal arguments. Lets discuss these enhanced features next.
VOID functions. What is a void
function? The system verilog functions are declared void when no return value is required. In our example we are calling function “testprint” to print a value passed as input integer.
function void testprint(int i); *** Non-void system verilog functions. Example code below: function [3:0] reverse_order (input[3:0] a, output[3:0] b ); integer i; // No need of begin/end in SystemVerilog for (i=0; i<4; i=i+1) b = a[3-i]; endfunction ***