Home > Community > Forums > Custom IC SKILL > to set a bind key to show/hide dummy/odummy

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Thu, Feb 28 2013 11:52 AM by theopaone. 19 replies.
Started by Weight66 18 Feb 2013 12:07 PM. Topic has 19 replies and 2707 views
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts:
  • Mon, Feb 18 2013 12:07 PM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    to set a bind key to show/hide dummy/odummy Reply
    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,
    Filed under: ,
    • Post Points: 35
  • Mon, Feb 18 2013 12:24 PM

    Re: to set a bind key to show/hide dummy/odummy Reply

    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.

    • Post Points: 20
  • Mon, Feb 18 2013 1:12 PM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    Re: to set a bind key to show/hide dummy/odummy Reply
    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,
    • Post Points: 20
  • Tue, Feb 19 2013 2:11 AM

    Re: to set a bind key to show/hide dummy/odummy Reply

    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

    • Post Points: 20
  • Sat, Feb 23 2013 11:25 AM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    Re: to set a bind key to show/hide dummy/odummy Reply

    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,

    • Post Points: 20
  • Sat, Feb 23 2013 11:51 AM

    Re: to set a bind key to show/hide dummy/odummy Reply
    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?
    • Post Points: 20
  • Sat, Feb 23 2013 12:31 PM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    Re: to set a bind key to show/hide dummy/odummy Reply

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

    • Post Points: 20
  • Sun, Feb 24 2013 5:10 AM

    Re: to set a bind key to show/hide dummy/odummy Reply

    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.

    • Post Points: 20
  • Tue, Feb 26 2013 6:52 AM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    Re: to set a bind key to show/hide dummy/odummy Reply

    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

     

    • Post Points: 20
  • Tue, Feb 26 2013 8:05 AM

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 120
    • Points 1,760
    Re: to set a bind key to show/hide dummy/odummy Reply

    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

    • Post Points: 20
  • Tue, Feb 26 2013 8:10 AM

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 120
    • Points 1,760
    Re: to set a bind key to show/hide dummy/odummy Reply

     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

    • Post Points: 20
  • Tue, Feb 26 2013 8:22 AM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    Re: to set a bind key to show/hide dummy/odummy Reply

    Hi Ted,

    I got the massage "no licence to run SKILL Develpoment", Thanks, Wei

    • Post Points: 20
  • Tue, Feb 26 2013 8:28 AM

    • theopaone
    • Top 75 Contributor
    • Joined on Tue, Feb 12 2013
    • Cedar Park, TX
    • Posts 120
    • Points 1,760
    Re: to set a bind key to show/hide dummy/odummy Reply

     Check with you CAD group to see if you have a license. You may have to check it out manually.

    Otherwise, put printf statements in your code to check the values.

    Ted

    • Post Points: 5
  • Tue, Feb 26 2013 8:53 AM

    • Weight66
    • Not Ranked
    • Joined on Mon, Feb 18 2013
    • Posts 7
    • Points 155
    Re: to set a bind key to show/hide dummy/odummy Reply

    Hi Ted,

    Is it OK to do

    Lyt_Dummy_Purpose_Name = ("dummy" "odummy")

    Thanks,

    • Post Points: 20
  • Tue, Feb 26 2013 9:12 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,587
    • Points 15,915
    Re: to set a bind key to show/hide dummy/odummy Reply

    You will need either a single quote or the function "list" before the open parentesis otherwise you will get a syntax or run-time error:

    '("dummy" "odummy") or list("dummy" "odummy")

    Regards,

    Lawrence.

    • Post Points: 20
Page 1 of 2 (20 items) 1 2 Next >
Sort Posts:
Started by Weight66 at 18 Feb 2013 12:07 PM. Topic has 19 replies.