How to control the running of NC-Sim and Xilinx ISE under Unix?

Started by uvbaz November 13, 2006
hi,  everyone,

I want to run

ncvlog
ncvhdl
ncelab
ncsim
xst
ngdbuild
.....
under Unix.
I've write a script for this, but with no control statement. How can i
control the running flow, namely:

if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING....

or

if (XST ERROR) then ERROR REPORT and STOP THE RUNNING....

Thanks,
Cheng

uvbaz wrote:
> hi, everyone, > > I want to run > > ncvlog > ncvhdl > ncelab > ncsim > xst > ngdbuild > ..... > under Unix. > I've write a script for this, but with no control statement. How can i > control the running flow, namely: > > if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING.... > > or > > if (XST ERROR) then ERROR REPORT and STOP THE RUNNING....
http://tldp.org/LDP/abs/html/part2.html Cheers, Jon
Thanks, Jon

The problem is, i dont know how to get the value e.g. ncvlog returns.

Regard,
Cheng


Jon Beniston schrieb:

> uvbaz wrote: > > hi, everyone, > > > > I want to run > > > > ncvlog > > ncvhdl > > ncelab > > ncsim > > xst > > ngdbuild > > ..... > > under Unix. > > I've write a script for this, but with no control statement. How can i > > control the running flow, namely: > > > > if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING.... > > > > or > > > > if (XST ERROR) then ERROR REPORT and STOP THE RUNNING.... > > > http://tldp.org/LDP/abs/html/part2.html > > Cheers, > Jon
You may want to use a Makefile for this. You can find an example
Makefile for ISE tools here:
http://home.comcast.net/~jimwu88/tools/

HTH,
Jim



uvbaz wrote:
> hi, everyone, > > I want to run > > ncvlog > ncvhdl > ncelab > ncsim > xst > ngdbuild > ..... > under Unix. > I've write a script for this, but with no control statement. How can i > control the running flow, namely: > > if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING.... > > or > > if (XST ERROR) then ERROR REPORT and STOP THE RUNNING.... > > Thanks, > Cheng
Thanks Jim,

They are very useful tools

Regard,
Cheng

Jim Wu schrieb:

> You may want to use a Makefile for this. You can find an example > Makefile for ISE tools here: > http://home.comcast.net/~jimwu88/tools/ > > HTH, > Jim > > > > uvbaz wrote: > > hi, everyone, > > > > I want to run > > > > ncvlog > > ncvhdl > > ncelab > > ncsim > > xst > > ngdbuild > > ..... > > under Unix. > > I've write a script for this, but with no control statement. How can i > > control the running flow, namely: > > > > if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING.... > > > > or > > > > if (XST ERROR) then ERROR REPORT and STOP THE RUNNING.... > > > > Thanks, > > Cheng
uvbaz wrote:
> I've write a script for this, but with no control statement. How can i > control the running flow, namely: > > if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING....
ncvlog and ncelab return an exit status, like many executables under UNIX. I don't know about the other tools you mentioned. With csh, you can test this with something like ncvlog -f ncvlog.args if ($status != 0) then echo "ncvlog failed" exit endif Other UNIX shells may use different mechanisms, but they should all provide access to the exit status.
Ok, understand.

Thanks, sharp.
Cheng

sharp@cadence.com schrieb:

> uvbaz wrote: > > I've write a script for this, but with no control statement. How can i > > control the running flow, namely: > > > > if (NCVLOG ERROR) then ERROR REPORT and STOP THE RUNNING.... > > ncvlog and ncelab return an exit status, like many executables under > UNIX. I don't know about the other tools you mentioned. > > With csh, you can test this with something like > > ncvlog -f ncvlog.args > if ($status != 0) then > echo "ncvlog failed" > exit > endif > > Other UNIX shells may use different mechanisms, but they should all > provide access to the exit status.