• 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. to set a bind key to show/hide dummy/odummy

Stats

  • Locked Locked
  • Replies 19
  • Subscribers 145
  • Views 8583
  • 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

to set a bind key to show/hide dummy/odummy

Weight66
Weight66 over 12 years ago
I'd  like to set a bind key to show/hide dummy/odummy, here is part of code:

procedure(ST_Lyt_ShowHide_Layers(Command PressedKey ShowDummy)       ;Available values for Command: >=1 to Add, <=1 to Remove and 0 to Hide all but selected one       ;Available values for ShowDummy: t to show dummy types and nil to keep dummy layers hidden       Lyt_Key_Layer_Assoc = '( ("0" 0) ("1" 1) ("2" 2) ("3" 3) ("4" 4) ("5" 5) ("6" 6) ("7" 7) ("8" 8) ("9" 9) ("`" 10) ("-" 11) )       Lyt_Sel_Layers = nth(nth(1 assoc(PressedKey Lyt_Key_Layer_Assoc)) Lyt_Layer_List)       Lyt_Show_Layer = nil       if((Command >= 0) then              leSetEntryLayer(list(nth(0 Lyt_Sel_Layers) nth(0 Lyt_Layer_Purposes)))              if((Command == 0) then                     leSetAllLayerVisible(nil)              )              foreach(Lyt_SLayer Lyt_Default_Layers                     foreach(Lyt_SPurpose Lyt_Layer_Purposes                           LytShowLayer = t                           if((Lyt_SPurpose == Lyt_Dummy_Purpose_Name) then                                  LytShowLayer = ShowDummy                           )                           leSetLayerVisible(list(Lyt_SLayer Lyt_SPurpose) LytShowLayer)                     )              )              Lyt_Show_Layer = t       )       if((Command >= -1) then              leSetEntryLayer(list(nth(0 Lyt_Default_Layers) nth(0 Lyt_Layer_Purposes)))       )       foreach(Lyt_SLayer Lyt_Sel_Layers              foreach(Lyt_SPurpose Lyt_Layer_Purposes                     LytShowLayer = Lyt_Show_Layer                     if((rexMatchp(strcat(".*" Lyt_Dummy_Purpose_Name ".*") Lyt_SPurpose) == t) then                           LytShowLayer = (ShowDummy && LytShowLayer)                     )                     leSetLayerVisible(list(Lyt_SLayer Lyt_SPurpose) LytShowLayer)              )       )       hiRedraw())

Thanks,
  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Apart from the fact that the formatting makes it very hard to read your code, what exactly is your problem? You have the code to show/hide the dummy (I assume that's what your code is doing), so what is the issue?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Weight66
    Weight66 over 12 years ago
    Hi Andrew,

    Yes, there is the feature to show/hide dummy, I try to show dummy layer
    hiSetBindKey("Layout" "CtrlShift<Key>0" "ST_Lyt_ShowHide_Layers(0 \"1\" t) ST_Lyt_ShowHide_Layers(-1 \".\" nil)")
    To hide dummy layer,
    hiSetBindKey("Layout" "Alt<Key>0" "ST_Lyt_ShowHide_Layers(-1 \"1\" t) ST_Lyt_ShowHide_Layers(1 \".\" nil)")

    but it doesn't work,

    Thanks,
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Which version are you using? If IC61, then Alt bindkeys can't be defined by default (because Alt is used for Menu accellerators), unless you use:

    envSetVal("ui" "enableMenuShortcuts" 'boolean nil)

    to turn that feature off. For the CtrlShift 0, I could define it using Ctrl<Key>) on my keyboard (I suggest using the bindkey editor, and then when you press the key combination it tells you the sequence).

    Of course, I'm assuming that this is the problem and not to do with the actual code you're using. If course you can check that by just running the functions directly. If not, maybe you can state the version you're using too?

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Weight66
    Weight66 over 12 years ago

    Sorry for late reply, It is IC615, I'm trying other keys,

    to show 

    hiSetBindKey("Layout" "<Key>["

    to hide

    hiSetBindKey("Layout" "<Key>]"

    but the function doesn't run properly,

    Thanks,

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago
    By "doesn't run properly" do you mean that it runs, but doesn't do what you want, or that it gives an error, or that it doesn't run at all?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Weight66
    Weight66 over 12 years ago

    yes, it runs, but doesn't do what I want, Thanks,

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

    In that case you'll need to fix the code (or global variables that it uses) to make it work. You know what you want it to do, and you've not enlightened anyone on the forum, so I'm not really sure what you're expecting.

    I went to the effort of tidying up the formatting of the code so I stood some chance of understanding it:

    procedure(ST_Lyt_ShowHide_Layers(Command PressedKey ShowDummy)
        ;Available values for Command: >=1 to Add, <=1 to Remove and 0 to Hide all but selected one      
        ;Available values for ShowDummy: t to show dummy types and nil to keep dummy layers hidden      
        Lyt_Key_Layer_Assoc = '( ("0" 0) ("1" 1) ("2" 2) ("3" 3) ("4" 4) ("5" 5) ("6" 6) ("7" 7) ("8" 8) ("9" 9) ("`" 10) ("-" 11) )      
        Lyt_Sel_Layers = nth(nth(1 assoc(PressedKey Lyt_Key_Layer_Assoc)) Lyt_Layer_List)
        Lyt_Show_Layer = nil
        if((Command >= 0) then             
            leSetEntryLayer(list(nth(0 Lyt_Sel_Layers) nth(0 Lyt_Layer_Purposes)))
            if((Command == 0) then                    
                leSetAllLayerVisible(nil)
            )
            foreach(Lyt_SLayer Lyt_Default_Layers                    
                foreach(Lyt_SPurpose Lyt_Layer_Purposes                          
                    LytShowLayer = t
                    if((Lyt_SPurpose == Lyt_Dummy_Purpose_Name) then                                 
                        LytShowLayer = ShowDummy                          
                    )
                    leSetLayerVisible(list(Lyt_SLayer Lyt_SPurpose) LytShowLayer)
                )
            )             
            Lyt_Show_Layer = t
        )
        if((Command >= -1) then             
            leSetEntryLayer(list(nth(0 Lyt_Default_Layers) nth(0 Lyt_Layer_Purposes)))
        )
        foreach(Lyt_SLayer Lyt_Sel_Layers             
            foreach(Lyt_SPurpose Lyt_Layer_Purposes                    
                LytShowLayer = Lyt_Show_Layer                    
                if((rexMatchp(strcat(".*" Lyt_Dummy_Purpose_Name ".*") Lyt_SPurpose) == t) then
                    LytShowLayer = (ShowDummy && LytShowLayer)
                )
                leSetLayerVisible(list(Lyt_SLayer Lyt_SPurpose) LytShowLayer)             
            )
        )
        hiRedraw()
    )

    And I can see from this that it uses four global variables. I tried setting these (based on some guess work) to match some settings in a gpdk technolog:

    Lyt_Layer_List='(("Metal1" "drawing") ( "Metal2" "drawing") ( "Metal3" "drawing") ( "Metal4" "drawing"))
    Lyt_Layer_Purposes='("drawing" "slot" "label" "pin" "net")
    Lyt_Default_Layers='("Poly" "Oxide")
    Lyt_Dummy_Purpose_Name="slot"

    But since I don't really understand what the code is trying to do (it seems rather strangely written, but maybe all would become clear if I knew what the global variables were supposed to look like), I couldn't really see what it was aiming at.

    Please be aware that readers of the forum (including myself) cannot read your mind - so please, please, explain yourself clearly otherwise nobody is going to be able to help you. I've already spent quite a bit of my time (note, it's my own time as I do this as a volunteer not as part of my job with Cadence) trying to fathom out what you're actually asking...

    Saying things like "it doesn't do what I want" doesn't really tell anyone what the problem is. In fact it doesn't even say that you want anything answered, so maybe you're happy already?

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Weight66
    Weight66 over 12 years ago

    Thanks Andrew,

    Here are global variables,

    Lyt_Layer_List = list(

            list("PO" "OD" "NP" "PP" "PW" "NW" "DNW" "VTH_P" "VTH_N" "UHVT_P" "UHVT_N" "VTL_P" "VTL_N" "VTUL_P" "VTUL_N" "OD_12" "OD_18" "OD_33")

           list("M1" "CO")

            list("M2" "VIA1")

            list("M3" "VIA2")

            list("M4" "VIA3")

            list("M5" "VIA4")

            list("M6" "VIA5")

            list("M7" "VIA6")

            list("M8" "VIA7")

            list("M9" "VIA8")

            list("prBoundary")

    )

    Lyt_Default_Layers = list("prBoundary")

    Lyt_Layer_Purposes = list("drawing" "dummy" "odummy" "pin" "boundary")

    Lyt_Dummy_Purpose_Name = list("dummy" "odummy")

    I set bind key to show dummy layers

    hiSetBindKey("Layout" "<Key>[" "ST_Lyt_ShowHide_Layers(0 \"1\" t) ST_Lyt_ShowHide_Layers(-1 \".\" nil)")

    to hide dummy

    hiSetBindKey("Layout" "<Key>]" "ST_Lyt_ShowHide_Layers(-1 \"1\" t) ST_Lyt_ShowHide_Layers(1 \".\" nil)")

    But it still doesn’t work, I don’t know why,

    Thanks, Wei

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 12 years ago

    Since you are in IC615, this is an opportunity to use the SKILL IDE to debug the problem.

    Bring up the SKILL IDE from the CIW->Tools menu.

    Open the file containing the code and load it through the IDE

    Set a breakpoint on the function. When you execute the function, it will stop at the start. 

    As you step through the function you can follow the logic as it executes. You can query the variable values by turning on the tooltips. 

    Note thaqt you have a large number of non declared variables which become global variables when the function is evaluated. Run Lint on the file to clean those up before testing your code as it will eliminate many potential problems.

    Ted

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • theopaone
    theopaone over 12 years ago

     Also, look at the following line:

     if((Lyt_SPurpose == Lyt_Dummy_Purpose_Name) then                   

    You set Lyt_Dummy_Purpose_Name to be a list. This will always fail in your code.

    Ted

    • 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