How to monitor a process in system call

H

Howard

Hi All,

I am using Perl to automatic my regression flow with ASIC
verification. I use system() to call VCS to compile and run the
simulation. I don't have any problem when the compile and run
successfully. However, I got a scenario that I really don't know how
to handle.

When I submit the task using system (vcs ...), sometime simulation
could not finish and stops at cli> and give back the control to unix.
It waits for user input at this point. Normally people types in quit
to let it exit from vcs and keep the regression going.

However, I don't how to do this in Perl to know it sits on cli> and
type in quit and let it keep going.

Any advice?
 
J

Jürgen Exner

Howard said:
Hi All,

I am using Perl to automatic my regression flow with ASIC
verification. I use system() to call VCS to compile and run the
simulation. I don't have any problem when the compile and run
successfully. However, I got a scenario that I really don't know how
to handle.

When I submit the task using system (vcs ...), sometime simulation
could not finish and stops at cli> and give back the control to unix.
It waits for user input at this point. Normally people types in quit
to let it exit from vcs and keep the regression going.

However, I don't how to do this in Perl to know it sits on cli> and
type in quit and let it keep going.

I think you are looking for the Expect module.

jue
 
B

Ben Morrow

Quoth "Jürgen Exner said:
I think you are looking for the Expect module.

Alternatively, and more simply, I would be surprised if your 'vcs'
program doesn't have a batch mode switch that causes it to abort on
error rather than prompting; or you could try redirecting stdin (for the
vcs process) from /dev/null, as it may switch to batch mode if it's not
on a terminal.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top