• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. pass data between perl and skill

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14352
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pass data between perl and skill

Meny Lea
Meny Lea over 12 years ago

Hello all,

 

Im trying to use the ipcbeginprocess command to pass data between skill and perl. it works , but I do get some issues.

Im doing the next :

procedure( MLultraSimPerlGui() 

lunching the perl script from a button in my schematic with  the next skill script :

 msgHandler = lambda( (cid data) printf("\n[CCSbla bla: %s]\n%s" cid data))

errHandler = lambda( (cid data) printf("\n[CCSbla1 bla2: %s]\n%s" cid data))
PinList = nil
cid= ipcBeginProcess( "/home/menyl/UltraSimPerl.pl" "" msgHandler errHandler)
ipcWaitForProcess(cid 5 )
)
MLultraSimPerlGui()

 

 than the perl script pop up a gui with buttons, and a press on one of the buttosn shoud print to the CIW the data from the perl 

script, along with the ipc id ( should be ipc:xx \n  hello meny)  . the thing is that  it doesnt happen , no matter how many times I press

on the button. i tried to ipcReadProcess the cid. I got: " ".  the only I get the data on the CIW is when I close the perl GUI - than I see exactly the string Im expecting , and in the same number of times I press the button - so the work get done, but from some reason the data transfer get blocked . or maybe I just dont use the ipc protocol right.

thx

 

Meny 

 

  • Cancel
  • skillUser
    skillUser over 12 years ago
    Hi Meny,

    Presumably the button press in the Perl GUI causes the line to be
    printed right away?
    My guess is that the script output is stuck in a buffer...
    Does your output string from the Perl script have a carriage return
    (\n) after it?
    Does the Perl GUI buffer the output data as in file I/O buffering?
    (In Tcl, for example there is a line buffering mode, I would guess
    that Perl has the same? Or you can
    forcibly flush the buffer perhaps?)

    Hope this helps,

    Lawrence.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

     Meny,

    The easiest way to do this in perl is to set the $| variable:

    $|=1;
    print "now you see it...\n";
    sleep 10;
    print "now you don't...\n";

    If you run this perl script as "perl example.pl > test.out" and do a "tail -f test.out" you'll see the two lines appear, one at a time. Without the $| setting, you'll only see both lines appear as the program finishes, because of output buffering.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Meny Lea
    Meny Lea over 12 years ago

    Lawrence, Anderw,

    Thank you. that was the case indeed. it works fine now.

    I do have one more question. if the perl script ( that was launced from skill with ipcbeginProcess)  should launce a skill script, instaed of just print "hello meny", ( for example a script that read all schematic pins/terminals), should it be also launced with ipcbeginprocess that contain data handler and err handler ? assuming the the pin list needs to be delevier back to perl.

     thx

    meny

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information