| 1 |
// Author : Vivek Prasad |
| 2 |
// Date : 18 Sep 2006 |
| 3 |
module ptr_c_sv(); |
| 4 |
int res; |
| 5 |
|
| 6 |
import
"DPI"
context passArray = function int pA();
|
| 7 |
export
"DPI"
dV = function disVal;
|
| 8 |
|
| 9 |
function int disVal(input int xyz); |
| 10 |
$display(
"Array Value: %0d\n"
,xyz);
|
| 11 |
return -1; |
| 12 |
endfunction |
| 13 |
|
| 14 |
initial begin |
| 15 |
|
#5 res = pA(); |
| 16 |
|
$display(
"Returned: %0d\n"
,res);
|
| 17 |
|
$display(
"Array Passing Over.\n"
);
|
| 18 |
end |
| 19 |
|
| 20 |
endmodule |