shaiko
Advanced Member level 5
Hello,
I came across this Systemverilog code online:
As you can see - it outputs the integer 'z' and at the same time returns x*y.
Questions:
1.How can we call the function to get the value of 'z' ?
2.What's the purpose/use case of having an output and a return value.
I came across this Systemverilog code online:
Code:
function mul (input int x, y, output int z);
z = x*y + 1;
return x * y;
endfunction
Questions:
1.How can we call the function to get the value of 'z' ?
2.What's the purpose/use case of having an output and a return value.