Pause and IPC in SKILL

  • Thread starter Emil Hjalmarson
  • Start date
E

Emil Hjalmarson

Guest
Hi,

I would like my SKILL program to halt for a few seconds while I wait for
a MATLAB program to write some data to a file that are to be accessed by
the SKILL script. Currently I solve the task by letting the SKILL script
try to access the file continuously while the MATLAB program executes.
However, this is a dirty solution and it steals a lot of CPU time so
there must be some better solution. Any suggestions?

I also have a more general question. Is there a better way, than using
temporary files, to pass data between MATLAB and SKILL? I have looked
briefly at IPC in the manual. However, since the SKILL script is the
slave process I would like MATLAB to be in control of things I do not
want to start MATLAB as a child process to the SKILL script. Is there
some way to "hook-up" with a process that is already running?

Best regards,
Emil Hjalmarson
 
Emil Hjalmarson <emilh@isy.liu.se> writes:

I would like my SKILL program to halt for a few seconds while I wait
for a MATLAB program to write some data to a file that are to be
accessed by the SKILL script. Currently I solve the task by letting
the SKILL script try to access the file continuously while the
MATLAB program executes. However, this is a dirty solution and it
steals a lot of CPU time so there must be some better solution. Any
suggestions?
A possibility: make skill read a named pipe and MATLAB write to it.

Yours,

--
Jean-Marc
 
Emil Hjalmarson wrote:
Hi,

I would like my SKILL program to halt for a few seconds while I wait for
a MATLAB program to write some data to a file that are to be accessed by
the SKILL script. Currently I solve the task by letting the SKILL script
try to access the file continuously while the MATLAB program executes.
However, this is a dirty solution and it steals a lot of CPU time so
there must be some better solution. Any suggestions?
You could use sleep(), but that freezes up the tools

You could try writing a program which is just a pause, then using
ipcBeginProcess and ipcWait to halt your skill code, I'm not sure if
that would work though.

In the past I have used a C program launched with ipcSkillProcess to
periodically run a skill command, but I don't think that would be useful
here.

I also have a more general question. Is there a better way, than using
temporary files, to pass data between MATLAB and SKILL? I have looked
briefly at IPC in the manual. However, since the SKILL script is the
slave process I would like MATLAB to be in control of things I do not
want to start MATLAB as a child process to the SKILL script. Is there
some way to "hook-up" with a process that is already running?
You could try looking at a previous posting
(http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/4327bb077f9241b3/131e35149650fa90?q=simvision&rnum=1#131e35149650fa90)
Andrew's code there might be of use, if you can somehow implement the
tcl bits in MATLAB. I'm unsure whether it would be worth the effort though.

Hope this helps

Doug
 
On Mon, 08 Aug 2005 15:43:50 +0100, Doug <douglad3@cs.man.ac.uk> wrote:
You could try looking at a previous posting
(http://groups.google.com/group/comp.cad.cadence/browse_thread/thread/4327bb077f9241b3/131e35149650fa90?q=simvision&rnum=1#131e35149650fa90)
Andrew's code there might be of use, if you can somehow implement the
tcl bits in MATLAB. I'm unsure whether it would be worth the effort though.

Hope this helps

Doug
I was just about to post exactly the same thing!

You could of course use the Tcl code, and then fire off something from Matlab
which calls the skillClient command - so that would minimise the amount of
rewriting for Matlab - but it's a bit messy with extra scripts in the way.

Regards,

Andrew.
 

Welcome to EDABoard.com

Sponsor

Back
Top