extern

classのtask/functionは、class定義の中に記述しなくてもいいです。

この場合は、task/functionを次のようにtask/functionの前にexternを付けます。

class sample_a;

extern task task_a( int a, int b);

extern function void func_b( int a, int b );

endclass : sample_a

実際のtask/functionの実装は、次のように記述します。

各task/function名の前にクラス名と"::"を付けるだけです。

task sample_a::task_a( int a, int b);

...

endtask : task_a

function sample_a::func_b( int a, int b);

...

endfunction : func_b

実装部は、class定義と同じファイルに記述されていてもいいのですが、

別のファイルに記述されていても問題ありません。