• 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. combobox dependent on another combobox virtuoso skill

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 12324
  • 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

combobox dependent on another combobox virtuoso skill

saurabh96
saurabh96 over 4 years ago

Hi,
I have created two combo box 1 and 2, respectively. Combo box contains tech nodes like 40nm or 60 nm. Combo box2 contains rules like rule1,2.
now When I select 40nm from the combo box, i should only see rule 1 and three ..same wise when I select 60nm, rule3 and four select, and others should not be visible.
How to get this using skill code?

  • Cancel
Parents
  • mbracht
    mbracht over 4 years ago

    Hi,

    You need to set up the callback of the nodes combo box so as it repopulates the choices of the rules combo box:

    (let (techNodes rules theForm)
     
       techNodes = (hiCreateCyclicField
                      ?name 'techNodes
                      ?prompt     "Tech Nodes"
                      ?choices    (list "40nm" "60nm")
                      ?callback   (lambda (fld form node)
                                     (println node)
                                     (case node
                                        ("40nm"
                                           theForm->rules->choices = (list "Rule1" "Rule2" "Rule3"))
                                        ("60nm"
                                           theForm->rules->choices = (list "Rule1" "Rule4")))))

       rules = (hiCreateCyclicField
                      ?name 'rules
                      ?prompt     "Rules"
                      ?choices    (list "Rule1" "Rule2" "Rule3"))

       theForm = (hiCreateAppForm
          ?name 'myForm
          ?formTitle "Just playing..."
          ?fields (list techNodes rules))
     
       (hiDisplayForm theForm)
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 4 years ago in reply to mbracht

    Thanks mbracht,
    I got the flow..one more thing , I have to ask to suppose if I have to define it for 20+ tech nodes and the same as more than 20+rules...how we can define it in as code length will be much longer if I pick each node and define the rule in front of them...How can we list and define by that?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 4 years ago in reply to saurabh96

    I'm not sure whether I understand what you mean - so I'm just guessing.  I take it that you have a long list of nodes and each one has their own rules and you don't want to hard code that in the case statement in the callback - am I correct? In that case I would accomodate the node/rule relation ship in a SKILL table which is essentially a hash table.

    rules = (makeTable 'nodesTbl nil)
    rules("40nm") = (list "rule1" "rule2" ...)
    rules("60nm") = (list "rule1" "rule4" ...)
    .....

    ...and then in the callback replace the entire case statement against:

    theForm->rules->choices = rules[node]

    But maybe I just don't understand your problem.

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 4 years ago in reply to mbracht

    Thanks Max for quick reply,

    you guess it partially right..let me elaborate you.

    Suppose i have long list of nodes as well as long list of rules...so if i define different rule in each single node then runtime and syntax length  will be more?I have tried this way..pls correct where am wrong.

    (let (techNodes rules theForm)

    techNodes = (hiCreateCyclicField
    ?name 'techNodes
    ?prompt "Tech Nodes"
    ?choices (list "40nm" "60nm")
    ?callback (lambda (fld form node)
    (println node)
    theForm->rules->choices = rules[node]))

    rules = (makeTable 'nodesTbl nil)
    rules("40nm"  "80nm" "120nm" "100nm"  "150nm" "140nm"= (list "rule3 "rule2" "rule7"...)
    rules("60nm" "50nm" "90nm" "110nm"  "130nm" "180nm") = (list "rule1" "rule4"  "rule9"...)

    theForm = (hiCreateAppForm
    ?name 'myForm
    ?formTitle "Just playing..."
    ?fields (list techNodes rules))

    (hiDisplayForm theForm)
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 4 years ago in reply to saurabh96

    The way you assign key/value pairs to the table in your code is not valid SKILL syntax. I assume what you wanted to do is this:

    rules["60nm"] = rules["50nm"] = ... = rules["90nm"]  = (list "rule1" "rule4"  "rule9"...)

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 4 years ago in reply to mbracht

    ok...

    here is correction i have done

    (let (techNodes rules theForm)

    techNodes = (hiCreateCyclicField
    ?name 'techNodes
    ?prompt "Tech Nodes"
    ?choices (list "40nm" "60nm" "50nm" "90nm" "10nm" "80nm" )
    ?callback (lambda (fld form node)
    (println node)
    theForm->rules->choices = rules[node]))

    rules = (makeTable 'nodesTbl nil)
    rules["60nm"] = rules["50nm"] =rules["90nm"] = (list "rule7" "rule2" "rule9")
    rules("10nm") = rules["40nm"] =rules["80nm"] = (list "rule1" "rule4")

    theForm = (hiCreateAppForm
    ?name 'myForm
    ?formTitle "Just playing..."
    ?fields (list techNodes rules))

    (hiDisplayForm theForm)
    )

    While running above file in CIW window am getting an error of -

    *Error* putprop: argument #3 should be either a string or a symbol (type template = "ggS") - nil

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 4 years ago in reply to saurabh96

    You have two problems in your code - for one you create just one of the two combo boxes and then in hiCreateAppForm() you are adding the SKILL table as a field. Here's a working example:

    (let (techNodes rules rulesTbl)

       rulesTbl = (makeTable 'rulesTbl nil)
       rulesTbl["60nm"] = rulesTbl["50nm"] =rulesTbl["90nm"] = (list "rule7" "rule2" "rule9")
       rulesTbl["10nm"] = rulesTbl["40nm"] =rulesTbl["80nm"] = (list "rule1" "rule4")

       techNodes = (hiCreateCyclicField
                      ?name 'techNodes
                      ?prompt     "Tech Nodes"
                      ?choices    (list "10nm" "40nm" "50nm" "60nm" "80nm" "90nm")
                      ?callback   (lambda (fld form node)
                                     theForm->rules->choices = rulesTbl[node]))

       rules = (hiCreateCyclicField
                      ?name 'rules
                      ?prompt     "Rules"
                      ?choices    (list "rule1" "rule4"))

       theForm = (hiCreateAppForm
          ?name 'myForm
          ?formTitle "Just playing..."
          ?fields (list techNodes rules))

       (hiDisplayForm theForm)
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • mbracht
    mbracht over 4 years ago in reply to saurabh96

    You have two problems in your code - for one you create just one of the two combo boxes and then in hiCreateAppForm() you are adding the SKILL table as a field. Here's a working example:

    (let (techNodes rules rulesTbl)

       rulesTbl = (makeTable 'rulesTbl nil)
       rulesTbl["60nm"] = rulesTbl["50nm"] =rulesTbl["90nm"] = (list "rule7" "rule2" "rule9")
       rulesTbl["10nm"] = rulesTbl["40nm"] =rulesTbl["80nm"] = (list "rule1" "rule4")

       techNodes = (hiCreateCyclicField
                      ?name 'techNodes
                      ?prompt     "Tech Nodes"
                      ?choices    (list "10nm" "40nm" "50nm" "60nm" "80nm" "90nm")
                      ?callback   (lambda (fld form node)
                                     theForm->rules->choices = rulesTbl[node]))

       rules = (hiCreateCyclicField
                      ?name 'rules
                      ?prompt     "Rules"
                      ?choices    (list "rule1" "rule4"))

       theForm = (hiCreateAppForm
          ?name 'myForm
          ?formTitle "Just playing..."
          ?fields (list techNodes rules))

       (hiDisplayForm theForm)
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • saurabh96
    saurabh96 over 4 years ago in reply to mbracht

    Thanks alot Max ...i got the flow

    • 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