From 25db32f0632a5a3b5147ac9fefcec911069009c3 Mon Sep 17 00:00:00 2001 From: Ryszard Rozak Date: Mon, 13 Nov 2023 16:08:10 +0100 Subject: [PATCH] Move a check to a task Signed-off-by: Ryszard Rozak --- test_regress/t/t_fork_output_arg.v | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/test_regress/t/t_fork_output_arg.v b/test_regress/t/t_fork_output_arg.v index 290981ee96..e5c5169e5c 100644 --- a/test_regress/t/t_fork_output_arg.v +++ b/test_regress/t/t_fork_output_arg.v @@ -11,15 +11,18 @@ class Cls; endtask endclass -module t(); +task automatic test; + int o; Cls c = new; - initial begin - int o; - fork - c.get_x(o); - join_any - if (o != 100) $stop; + fork + c.get_x(o); + join_any + if (o != 100) $stop; +endtask +module t(); + initial begin + test(); $write("*-* All Finished *-*\n"); $finish; end