• 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. Timeout a procedure within SKILL

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 13680
  • 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

Timeout a procedure within SKILL

mp133786
mp133786 over 9 years ago

Hi,

Within a SKILL procedureA, I am calling another SKILL procedureB.  In a normal scenario, procedureB should finish within 20-30 seconds.  If I want to terminate the procedure execution after X minutes, how would I do that?  IpcBeginProcess starts a new process and I don't want that.  Is there a timeout type feature for a skill procedure call?  Thank you.

procedure( myProcedureA()

   myProcedureB() ; <<<< want to terminate the procedure if not done within some time limit.

) ; end myProcedureA

procedure( myProcedureB()

   ;; do bunch of stuff

   ;; stuff should be done within 20-30 seconds

   ;; Terminate the procedure if not done within some time limit.

) ; end myProcedureB

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago
    No, SKILL is single threaded, so this can't be done (currently). You'd have to get the code to monitor its own time and abort itself if it was taking too long.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 9 years ago
    I have done this before in a procedure that had a while loop. In some cases it would be run on large sets of data and needed to stop. Basically I put a check in my loop to see if a pre-defined time limit had been exceeded.

    timeLimit = 30 ; seconds

    while( ...
    curTime=stringToTime(getCurrentTime())
    elapsedTime=curTime-startTime
    when(elapsedTime > timeLimit
    code to quit
    OR
    code to prompt user if they want to continue
    )
    )

    Since the above code takes a few small processing cycles, I actually only did that check once every 50 times through the loop using a counter and the modulus command.
    j=0 ; outside the loop

    j++ ; inside the loop
    when(integerp(timeLimit) && mod(j 50)==0
    myExceedTimeLimitCheck()

    I hope this helps.

    Derek
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Derek,

    That's precisely the kind of approach I was suggesting - the code being well behaved and checking itself rather than being controlled from outside. It's a bit like collaborative multi-tasking rather than preemptive multi-tasking (sort of).

    Andrew.

    • 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