• 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 Design
  3. SKILL code to get user input from the CIW

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 125
  • Views 20802
  • 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

SKILL code to get user input from the CIW

thomas1000
thomas1000 over 11 years ago

This should be the easiest thing to do but I cannot find it in the documentation.  What command(s) are needed to prompt and receive user keyboard input from the CIW from a SKILL routine?  I am not looking for a custom user form - more on the order of one line of code or two at the most.  I don't want to get the input from a file - I want to enter it with the keyboard.

  • Cancel
Parents
  • skillUser
    skillUser over 11 years ago

    Hi Thomas,

    Here's a quick and dirty example of creating a simple form to get the user input:

    
    ;; this is an example of using the input value
    procedure(CCFuseNum(form) printf("You entered: %L\n" form->CCFGetNumFloatField->value))
    
    ;; this is the simple form to get the number
    hiDisplayForm(
      hiCreateAppForm(?name 'CCFGetNum 
        ?fields    list( list(
                     hiCreateFloatField(?name 'CCFGetNumFloatField ?prompt "Enter number:")
                     0:0 130:30 80
                     )
                   )
        ?formTitle "Get Num"
        ?callback  'CCFuseNum
        ?dialogStyle 'modal)
    )

    There are more arguments to the hiCreateAppForm() function to control the appearance of the form etc.
    I've made the form "modal" so that the user has to interact with the form (OK/Cancel) before moving on
    to the next task.  The form structure is global, so you can access it any time after it was called, e.g.
      CCFGetNum->CCFGetNumFloatField->value
    so you do not have to use the form callback if you do not want to.

    I hope this helps you.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 11 years ago

    Hi Thomas,

    Here's a quick and dirty example of creating a simple form to get the user input:

    
    ;; this is an example of using the input value
    procedure(CCFuseNum(form) printf("You entered: %L\n" form->CCFGetNumFloatField->value))
    
    ;; this is the simple form to get the number
    hiDisplayForm(
      hiCreateAppForm(?name 'CCFGetNum 
        ?fields    list( list(
                     hiCreateFloatField(?name 'CCFGetNumFloatField ?prompt "Enter number:")
                     0:0 130:30 80
                     )
                   )
        ?formTitle "Get Num"
        ?callback  'CCFuseNum
        ?dialogStyle 'modal)
    )

    There are more arguments to the hiCreateAppForm() function to control the appearance of the form etc.
    I've made the form "modal" so that the user has to interact with the form (OK/Cancel) before moving on
    to the next task.  The form structure is global, so you can access it any time after it was called, e.g.
      CCFGetNum->CCFGetNumFloatField->value
    so you do not have to use the form callback if you do not want to.

    I hope this helps you.

    Regards,

    Lawrence.

    • 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