• 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. bindkeys in IC1.6.5

Stats

  • Locked Locked
  • Replies 13
  • Subscribers 129
  • Views 19338
  • 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

bindkeys in IC1.6.5

AlexGolberg
AlexGolberg over 14 years ago

I want to create set of bindkeys for managing work with layers.

For example, select layer, make layer visible/unvisible, make all layers visible/unvisible etc.,

that is to work with layers using bindkeys instead of Palette.

The  bindkeys i used in previous versions don't work with IC1.6.5

So, how to set bindkeys for layers in IC1.6.5?
  • Cancel
Parents
  • dmay
    dmay over 13 years ago

    Here is some code that will help you setup bindkeys to do this. I had to find some help on Source Link so that I could programmatically turn off the "Used Layers Only" on the layer palette. When this is on, if a layer like M2 is not used, we can't make it valid. So the pte commands below I pulled from Sourcelink.

    You'll setup bindkeys like this:
    hiSetBindKey("Layout" "<Key>1" "adjustLayers(1)")
    hiSetBindKey("Layout" "<Key>2" "adjustLayers(2)")

    You'll need to put together the list of layers you want for each setting.

    procedure(adjustLayers(key)
      let((tfId layers lp)
        tfId = techGetTechFile(geGetEditCellView()~>lib)
        case(key
            (1   layers = list("con" "metal1" "via1"))
            (2   layers = list("via1" "metal2" "via2"))
            (3   layers = list("via2" "metal3"))
        )
        ;Turn off the "used layers" so that unused layers can appear in the list
        pteShowUsedLayers(nil)
        ;Set the metal layer valid and as the entry layer
        leSetLayerValid(list(cadr(layers) "drawing") t)
        leSetEntryLayer(list(cadr(layers) "drawing"))
        ;Make all other layers invisible
        leSetAllLayerVisible(nil)
        foreach(layer layers
            lp = techFindLayer(tfId "metal1")
            ;ensure the layer is valid
            foreach(purpose lp~>lps~>purpose
                leSetLayerValid(list(layer purpose) t)
                leSetLayerVisible(list(layer purpose) t)
            )
        )
        ;Turn on System layers for schematics (this includes text drawing)
        foreach(l setof(lyr tfId~>lps lyr~>number >= 207) 
            l~>visible = t
        )
        t
      ) ;let
    ) ;proc

    procedure(pteShowUsedLayers(show @optional (swin hiGetSessionWindow(hiGetCurrentWindow())))
        _pteHiLayerShowUsedLPP(pteGetLayersWindow() nil)
    ) ;proc

    ;The following code was found on Sourcelink
    ;http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11711618;searchHash=94940eb4f4671f56ac55a49dba5988d8
    procedure(pteGetWindowList(@optional (name "") (swin hiGetSessionWindow(hiGetCurrentWindow())))
      let(((handle strcat("pte" name)) lst )
        foreach(dwin reverse(hiGetWindowList('dockable))
            when(((hiGetSessionWindow(dwin) == swin) && eqv(0
                        strncmp(sprintf(nil "%L"
                                (dwin->hiHandle)
                            ) handle
                            strlen(handle)
                        )
                    ))
                lst = cons(dwin lst)
            )
        )
        lst
      )
    )

    procedure(pteGetLayersWindow(@optional (swin hiGetSessionWindow(hiGetCurrentWindow())))
      let(((dwins pteGetWindowList("Layer" swin)))
            if(dwins car(dwins) nil)
      )
    )

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 13 years ago

    Here is some code that will help you setup bindkeys to do this. I had to find some help on Source Link so that I could programmatically turn off the "Used Layers Only" on the layer palette. When this is on, if a layer like M2 is not used, we can't make it valid. So the pte commands below I pulled from Sourcelink.

    You'll setup bindkeys like this:
    hiSetBindKey("Layout" "<Key>1" "adjustLayers(1)")
    hiSetBindKey("Layout" "<Key>2" "adjustLayers(2)")

    You'll need to put together the list of layers you want for each setting.

    procedure(adjustLayers(key)
      let((tfId layers lp)
        tfId = techGetTechFile(geGetEditCellView()~>lib)
        case(key
            (1   layers = list("con" "metal1" "via1"))
            (2   layers = list("via1" "metal2" "via2"))
            (3   layers = list("via2" "metal3"))
        )
        ;Turn off the "used layers" so that unused layers can appear in the list
        pteShowUsedLayers(nil)
        ;Set the metal layer valid and as the entry layer
        leSetLayerValid(list(cadr(layers) "drawing") t)
        leSetEntryLayer(list(cadr(layers) "drawing"))
        ;Make all other layers invisible
        leSetAllLayerVisible(nil)
        foreach(layer layers
            lp = techFindLayer(tfId "metal1")
            ;ensure the layer is valid
            foreach(purpose lp~>lps~>purpose
                leSetLayerValid(list(layer purpose) t)
                leSetLayerVisible(list(layer purpose) t)
            )
        )
        ;Turn on System layers for schematics (this includes text drawing)
        foreach(l setof(lyr tfId~>lps lyr~>number >= 207) 
            l~>visible = t
        )
        t
      ) ;let
    ) ;proc

    procedure(pteShowUsedLayers(show @optional (swin hiGetSessionWindow(hiGetCurrentWindow())))
        _pteHiLayerShowUsedLPP(pteGetLayersWindow() nil)
    ) ;proc

    ;The following code was found on Sourcelink
    ;http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11711618;searchHash=94940eb4f4671f56ac55a49dba5988d8
    procedure(pteGetWindowList(@optional (name "") (swin hiGetSessionWindow(hiGetCurrentWindow())))
      let(((handle strcat("pte" name)) lst )
        foreach(dwin reverse(hiGetWindowList('dockable))
            when(((hiGetSessionWindow(dwin) == swin) && eqv(0
                        strncmp(sprintf(nil "%L"
                                (dwin->hiHandle)
                            ) handle
                            strlen(handle)
                        )
                    ))
                lst = cons(dwin lst)
            )
        )
        lst
      )
    )

    procedure(pteGetLayersWindow(@optional (swin hiGetSessionWindow(hiGetCurrentWindow())))
      let(((dwins pteGetWindowList("Layer" swin)))
            if(dwins car(dwins) nil)
      )
    )

    Derek

    • 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