FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > Verilog

Verilog comp.lang.verilog newsgroup / usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-18-2004, 04:43 AM
Mark W Brehob
Guest
 
Posts: n/a
Default VCS -- return value

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
Reply With Quote
  #2 (permalink)  
Old 09-19-2004, 01:02 PM
Petter Gustad
Guest
 
Posts: n/a
Default Re: VCS -- return value

Mark W Brehob <[email protected]> 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?
Reply With Quote
  #3 (permalink)  
Old 09-20-2004, 06:33 AM
Srinivasan Venkataramanan
Guest
 
Posts: n/a
Default Re: VCS -- return value

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" <[email protected]> wrote in message
news:8hN2d.39$[email protected]..
> 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



Reply With Quote
  #4 (permalink)  
Old 09-20-2004, 02:55 PM
Mark W Brehob
Guest
 
Posts: n/a
Default Re: VCS -- return value

Hi,
Thanks to Srinivasan I can now safely say it is due to the installation
here.

Thanks to all for the help!

Mark

Srinivasan Venkataramanan <[email protected]_spam.co.in> wrote:
> 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" <[email protected]> wrote in message
> news:8hN2d.39$[email protected]..
>> 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



Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return value for $fscanf on EOF. John Verilog 3 11-18-2003 07:37 PM
PLI system functions, size checking, return values and simulatordifferences Peter Riocreux Verilog 3 08-22-2003 02:32 AM


All times are GMT +1. The time now is 01:33 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved