Path command

Discussion in 'Cadence' started by eric.d.fitzsimmons, Feb 19, 2009.

  1. I have two skill code programs to work with the Create Path
    command. One starts the path command with the metal layer "biased"
    or set for me. So, if I want to start a path in metal 1, I press
    ctrl and 1. The second skill code I have is to "transition" from
    metal to metal. If I have a path started on Metal 1 and want to go
    to Metal 2, I press Alt and 2. Skill is below.

    I would like to combine these. Is there a way to "see" if the path
    command is activated or in use? That way if I press ctrl and 2 and
    the path command is active, I am asking for a transition else start
    the command "biased" to metal two. So, I think I just need to know
    how to "know" if the path command is started and use a conditional
    statement.

    I am new to skill programming, if I said something stupid let me
    know :)

    Thank you in advance for any help,
    Eric


    =======================
    ;bias skill


    procedure(m3bias()
    hiReplayFile("/home/fitzsied/c05hma_atran/m3bias.rec")
    )
    procedure(m2bias()
    hiReplayFile("/home/fitzsied/c05hma_atran/m2bias.rec")
    )
    procedure(m1bias()
    hiReplayFile("/home/fitzsied/c05hma_atran/m1bias.rec")
    )



    hiSetBindKeys( "Layout" list(
    list("Ctrl<Key>1" "m1bias()");
    list("Ctrl<Key>2" "m2bias()");
    list("Ctrl<Key>3" "m3bias()");
    ))

    =================================
    ;transition skill

    procedure(ABlayerChange(layer)
    le0PathForm->changePathLayer->value =
    car(
    hiMakeLPChoiceList(
    techGetTechFile(geGetEditCellView())
    list(list(layer "drawing"))
    )
    )
    )

    procedure(m3trans()
    ABlayerChange("metal3")
    )

    procedure(m2trans()
    ABlayerChange("metal2")
    )

    procedure(m1trans()
    ABlayerChange("metal1")
    )

    procedure(m0trans()
    ABlayerChange("poly")
    )

    hiSetBindKeys( "Layout" list(
    list("Alt<Key>0" "m0trans()");
    list("Alt<Key>1" "m1trans()");
    list("Alt<Key>2" "m2trans()");
    list("Alt<Key>3" "m3trans()");
    ))
     
    eric.d.fitzsimmons, Feb 19, 2009
    #1
  2. eric.d.fitzsimmons

    Dennis Guest

    hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
     
    Dennis, Feb 20, 2009
    #2
  3. That worked great! Now I can start a path "biased" on the metal
    layer I want and can transition using the same keys. The only thing
    that is truly icky is the use of the replay file. Does anyone see a
    way around this?


    This is all I have in the replay files that I use
    \a leiMouseSetEntryLayer(11);selects metal3 in the LSW window.
    \a leHiCreatePath();starts path

    Can I do this another way perhaps?

    Below is what I have so far and it works, just don't like the replay
    file. Any feedback from "real" skill programmers is appreciated!

    Thank you,
    Eric




    =======================
    ;bias skill


    procedure(m3bias()
    hiReplayFile("/home/fitzsied/c05hma_atran/m3bias.rec")
    )
    procedure(m2bias()
    hiReplayFile("/home/fitzsied/c05hma_atran/m2bias.rec")
    )
    procedure(m1bias()
    hiReplayFile("/home/fitzsied/c05hma_atran/m1bias.rec")
    )

    =================================
    ;transition skill


    procedure(ABlayerChange(layer)
    le0PathForm->changePathLayer->value =
    car(
    hiMakeLPChoiceList(
    techGetTechFile(geGetEditCellView())
    list(list(layer "drawing"))
    )
    )
    )


    procedure(m3trans()
    ABlayerChange("metal3")
    )


    procedure(m2trans()
    ABlayerChange("metal2")
    )


    procedure(m1trans()
    ABlayerChange("metal1")
    )


    ;procedure to decide if path form is up or no.

    procedure(ABPathOrTransitionM1()
    if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
    then m1trans()
    else m1bias()
    );if then
    );procedure

    procedure(ABPathOrTransitionM2()
    if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
    then m2trans()
    else m2bias()
    );if then
    );procedure


    procedure(ABPathOrTransitionM3()
    if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
    then m3trans()
    else m3bias()
    );if then
    );procedure



    hiSetBindKeys( "Layout" list(
    list("Ctrl<Key>1" "ABPathOrTransitionM1()");
    list("Ctrl<Key>2" "ABPathOrTransitionM2()");
    list("Ctrl<Key>3" "ABPathOrTransitionM3()");
    ))
     
    eric.d.fitzsimmons, Feb 23, 2009
    #3
  4. Why not make your bindkeys do:

    leSetEntryLayer('("Metal3" "drawing")) leHiCreatePath()

    Then you won't need a replay file.

    Regards,

    Andrew.
     
    Andrew Beckett, Feb 24, 2009
    #4

  5. Andrew,

    That worked perfectly and I appreciate all your help even though I
    suck at Skill ;)

    I have posted the final code in case someone wants to use it.

    Have a nice day,
    Eric

    =======================
    ;bias skill


    procedure(m3bias()
    leSetEntryLayer('("metal3" "drawing")) leHiCreatePath()
    )
    procedure(m2bias()
    leSetEntryLayer('("metal2" "drawing")) leHiCreatePath()
    )
    procedure(m1bias()
    leSetEntryLayer('("metal1" "drawing")) leHiCreatePath()
    )

    =================================
    ;transition skill


    procedure(ABlayerChange(layer)
    le0PathForm->changePathLayer->value =
    car(
    hiMakeLPChoiceList(
    techGetTechFile(geGetEditCellView())
    list(list(layer "drawing"))
    )
    )
    )


    procedure(m3trans()
    ABlayerChange("metal3")
    )


    procedure(m2trans()
    ABlayerChange("metal2")
    )


    procedure(m1trans()
    ABlayerChange("metal1")
    )


    ;procedure to decide if path form is up or no.

    procedure(ABPathOrTransitionM1()
    if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
    then m1trans()
    else m1bias()
    );if then
    );procedure

    procedure(ABPathOrTransitionM2()
    if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
    then m2trans()
    else m2bias()
    );if then
    );procedure


    procedure(ABPathOrTransitionM3()
    if(hiGetCurrentCmd(hiGetCurrentWindow()) == "Path"
    then m3trans()
    else m3bias()
    );if then
    );procedure



    hiSetBindKeys( "Layout" list(
    list("Ctrl<Key>1" "ABPathOrTransitionM1()");
    list("Ctrl<Key>2" "ABPathOrTransitionM2()");
    list("Ctrl<Key>3" "ABPathOrTransitionM3()");
    ))
     
    eric.d.fitzsimmons, Feb 24, 2009
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.