shaiko
Advanced Member level 5
- Joined
- Aug 20, 2011
- Messages
- 2,644
- Helped
- 303
- Reputation
- 608
- Reaction score
- 297
- Trophy points
- 1,363
- Activity points
- 18,302
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.