VCS -- return value

M

Mark W Brehob

Guest
Hello all,
I'm doing some work with vcs and I've hit what seems like a very silly
problem. When vcs exits with a compile error, the vcs program is still
returning a zero. I've never seen any other tool or complier behave that
way on a Unix box.

Does anyone have any nice suggestions for automatically figuring out if vcs
failed? I realize I could parse the output from vcs, but that is somewhat
inconvenient (read would take me a few hours of changing other stuff).

Does vcs really behave that way? Is there any way to get it to actually
produce an error code when it actually hits an error?

Thanks for any thoughts or help.

Mark
 
Mark W Brehob <brehob@wildwood.eecs.umich.edu> writes:

Does anyone have any nice suggestions for automatically figuring out
if vcs failed? I realize I could parse the output from vcs, but that
is somewhat inconvenient (read would take me a few hours of changing
Do you mean from vcs to verify that the compilation has failed or from
vcs to verify if the simulation failed?

I usually treat these the same, in both cases the simulation has
failed. I "parse" the output from the simulation and I put great
effort into making my testbench self checking. Care should be made to
prevent false a false positive, e.g. grep'ing for the absence of error
is a bad thing to do. I make the testbench write out a unique string I
can search for where the name of the test and its pass/fail status is
written (if you reuse your simulation directory you will need a
timestamp too to check that the output is newer than your simulation
start time). Any absence of this unique string and a pass string means
that the test has failed, regardless if the reason was a syntax error,
license problem, disk full, pattern expect error, etc.

Petter
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Hi Mark,
I hope you are referring to the "return value" as seen by the shell
after vcs detects a compile error. If so, it seems to be working fine, it is
giving me 255 as the status. I use tcsh, vcs under Solaris.
I created a syntax error and tries:

vcs ../syntax_err.v
------ VCS output -----------
*** Using loader /usr/ccs/bin/ld instead of cc ...

Parsing design file '../syntax_err.v'
Error-[SE] Syntax error
"../syntax_err.v", 5: token is 'endmodule'
endmodule // ab
^
1 error
CPU time: 0 seconds to compile

--------------

Now I see the return value:

UNIX> echo $status
255

Thanks,
Srinivasan
"Mark W Brehob" <brehob@wildwood.eecs.umich.edu> wrote in message
news:8hN2d.39$IP1.12004@news.itd.umich.edu...
Hello all,
I'm doing some work with vcs and I've hit what seems like a very silly
problem. When vcs exits with a compile error, the vcs program is still
returning a zero. I've never seen any other tool or complier behave that
way on a Unix box.

Does anyone have any nice suggestions for automatically figuring out if
vcs
failed? I realize I could parse the output from vcs, but that is somewhat
inconvenient (read would take me a few hours of changing other stuff).

Does vcs really behave that way? Is there any way to get it to actually
produce an error code when it actually hits an error?

Thanks for any thoughts or help.

Mark
 

Welcome to EDABoard.com

Sponsor

Back
Top