• 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. How to return from a SKILL procedure

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 144
  • Views 18215
  • 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

How to return from a SKILL procedure

LakshmanQual
LakshmanQual over 5 years ago

Hi all,

I am writing a SKILL script as mentioned below for some utility, Meanwhile i got some issues. Could you please give me the proper commands to use at the required place?

I want to exit/return from procedure. I tried to use 'return()', ipcCloseProcess(), ipckillAllProcesses(), ipcStopProcess(). But they are throwing evaluation errors. Could you please let me know how to use process ending functions and using the return values from dialog boxes to run another procedure..

procedure(proc_main()

;some definitions and  functions here

proc2(a)

proc3(b)

)

procedure(proc2(a)

a=b+c

x=y+z

if (x then

proc3(b)

else

-- I want to exit the main procedure with a dialogue box

hidisplayAppDBox(?name 'ERROR

                             ?dboxText "Error message")

;;;return command or some other dialog box for further process here.

) ; end if

) ; end proc2

  • Cancel
Parents
  • skillUser
    skillUser over 5 years ago

    Hi,

    The 'return' command must be used with a 'prog' block, and you would only use the IPC functions that you mention if you actually used another IPC command to start a process (an external process that can communicate with Virtuoso with inter-process communication, IPC).

    You don't need to explicitly return anything from an 'if' or procedure block (plus others, like cond, let ...) - the last thing done within such a block/group will be the return value.

    I'm not really clear on what you are wanting to do, proc_main calls proc2 and proc3, when proc2 completes it returns the value of the last command within the proc2 block, which currently is either the return value of proc3() or hiDisplayAppDBox() (side note your if logic is 'iffy', x appears to be a numeric value which will always be true because it is non-nil, you probably want to test the value against some bounds?). The procedure proc2 most likely won't return until after the dialog box is dismissed since the default mode for dialog boxes is 'modal - you can change this with ?dialogStyle 'modeless if you want it to return a value right away.

    Hopefully this helps, but if not provide more details so that we might help further.

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • LakshmanQual
    LakshmanQual over 5 years ago in reply to skillUser

    Hi Lawrence,

    I was little confused while writing the code as i am still learning SKILL. I want to execute commands based on the callback value of hiDisplayAppDBox(). 

    If call back return value is 'ok' okay, then i want to execute proc3(b), if callback return value is 'cancel' i want exit the proc2(a) by not executing the next commands after if condition..

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to LakshmanQual

    You'd typically either do all the further processing from the callback (i.e. what you specify with ?callback for hiDisplayAppDBox) - so selectively calling proc3(b) within that callback, or rather than using a callback just use the return value of hiDisplayAppDBox(). So something like:

    when(hiDisplayAppDBox(...)
      proc3(b)
    )

    It's quite hard (as Lawrence pointed out) to give you full details because it's pretty unclear as to what you're trying to do as your examples are a bit abstract.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to LakshmanQual

    You'd typically either do all the further processing from the callback (i.e. what you specify with ?callback for hiDisplayAppDBox) - so selectively calling proc3(b) within that callback, or rather than using a callback just use the return value of hiDisplayAppDBox(). So something like:

    when(hiDisplayAppDBox(...)
      proc3(b)
    )

    It's quite hard (as Lawrence pointed out) to give you full details because it's pretty unclear as to what you're trying to do as your examples are a bit abstract.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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