VCS MX生成的simv可执行文件在出现错误,致命错误和断言失败时返回非零值。simv可执行文件返回错误,致命错误和断言值的值为:
0(无指示)
1(如运行时崩溃或系统崩溃)
2(错误)
3(致命)
场景 | 返回数值 |
$fatal/UVM_FATAL/OVM_FATAL/VMM_FATAL | 3 |
$error/UVM_ERROR/ OVM_ERROR/ VMM_ERROR/ Errors promoted from warning messages to errors | 2 |
Assertion failure Verilog | 2 |
$warning /UVM_WARNING/ OVM_WARNING/ VMM_WARNING | 0 |
Unique/priority RT warnings | 0 |
-xzcheck | 0 |
使用时,只需在simv命令后,添加-exitstatus选项即可,命令如下:
%> simv -exitstatus
%> echo $status