Returning error from Modelsim to bash script

Status
Not open for further replies.

braam7

Newbie level 2
Joined
May 10, 2020
Messages
2
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
12
I'm having trouble returning an error code from VSIM.

Modelsim is running a SystemVerilog testbench which either $finishes (PASS) or gets an $error (FAIL). I'd like to be able to interpret the error from VSIM in my bash script.

Currently the run.do file looks like this:

Code:
onerror {quit -code 400}
run -all

and is run with
Code:
 vsim tb -novopt -do run.do -quiet -c

If I run
Code:
 echo $?
after the vsim command and just get a 0 back.


Any ideas what I'm doing wrong?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…