system
form the IEEE:
as a function, it returns the return value of the call to system() with data type int. If $system is called with
no string argument, the C function system() will be called with the NULL string.
function system 有返回值,它的返回值就是system fork出來的子進程的結果值。
而linux system進程值的解釋如下:
-1 : 子進程fork fail
0 :子進程創建成功
>0: 子進程的返回值
example:
module top;
int id;
initial begin
id =
end
endmodule
此時id=0;
id =
id = 10
所以system的返回值就是子進程的返回值
這在程序中可以用於生成不受seed決定的real random 值