Amrutha
02-12-2008, 08:48 PM
Hi All,
I came across the following issue while using ovm_report_fatal to display message.
ovm_report_fatal didn't end the simulation when the class having fatal messages were instantiated using program block.It gave me following error
" ** Error: (vsim-8385) ../../src//base/ovm_component.sv(1385): fork..join_none statements in function 'do_exit_action' only allowed if the calling process originates in an initial block.".
It then proceeded with the simulation unless the class was instantiated in ovm_env.
I tried the following code
import ovm_pkg::*;
class my_env extends ovm_threaded_component;
function new(string name = "", ovm_component parent = null);
super.new(name, parent);
endfunction
task run();
$display("In run of env");
ovm_report_fatal("FATAL", "STARTED SIM");
#10;
ovm_report_info("FATAL", "oops: ovm_report_fatal does not work");
endtask
endclass
program test;
my_env env;
initial begin
env = new("ENV", null);
run_test();
end
endprogram
Every thing worked fine on replacing the program block with a module.
Is this a bug or expected behaviour since ovm implements ovm_test for writting testcases and not a program block?
Does this mean that program blocks used with system verilog env should not be used in OVM to implement test cases?
Regards,
Amrutha
I came across the following issue while using ovm_report_fatal to display message.
ovm_report_fatal didn't end the simulation when the class having fatal messages were instantiated using program block.It gave me following error
" ** Error: (vsim-8385) ../../src//base/ovm_component.sv(1385): fork..join_none statements in function 'do_exit_action' only allowed if the calling process originates in an initial block.".
It then proceeded with the simulation unless the class was instantiated in ovm_env.
I tried the following code
import ovm_pkg::*;
class my_env extends ovm_threaded_component;
function new(string name = "", ovm_component parent = null);
super.new(name, parent);
endfunction
task run();
$display("In run of env");
ovm_report_fatal("FATAL", "STARTED SIM");
#10;
ovm_report_info("FATAL", "oops: ovm_report_fatal does not work");
endtask
endclass
program test;
my_env env;
initial begin
env = new("ENV", null);
run_test();
end
endprogram
Every thing worked fine on replacing the program block with a module.
Is this a bug or expected behaviour since ovm implements ovm_test for writting testcases and not a program block?
Does this mean that program blocks used with system verilog env should not be used in OVM to implement test cases?
Regards,
Amrutha