Home > Community > Forums > Custom IC SKILL > Can we pass value as variable to enterpath function other than pathWidth

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: *

 Can we pass value as variable to enterpath function other than pathWidth 

Last post Tue, Apr 14 2009 10:22 PM by Infy1. 2 replies.
Started by Infy1 14 Apr 2009 02:10 AM. Topic has 2 replies and 1239 views
Page 1 of 1 (3 items)
Sort Posts:
  • Tue, Apr 14 2009 2:10 AM

    • Infy1
    • Not Ranked
    • Joined on Thu, Apr 9 2009
    • Posts 7
    • Points 95
    Can we pass value as variable to enterpath function other than pathWidth Reply

     Hi,

    Can we pass on a numerical value as a variable to enterPath function other than pathWidth .

     Regards,

    Roy

    • Post Points: 20
  • Tue, Apr 14 2009 9:29 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,567
    • Points 15,575
    Re: Can we pass value as variable to enterpath function other than pathWidth Reply

     Hi Roy,

     I'm not sure that I understand the question correctly. You want to pass a number to enterPath that is not for the path width argument? If so, what is this number for, what would it control or influence if not the path width?  Or are you asking if it is possible to use a variable for the pathWidth rather than a fixed numerical value?  In this case yes, a variable can certainly be used, for example:

    myWidth = 1.0

    procedure(myEPdone(win done pts)
     printf("DEBUG: win %L done %L pts %L\n" win done pts)
    )

    enterPath(
     ?prompts list("First point" "Next point")
     ?pathWidth myWidth
     ?doneProc "myEPdone")
     
     Here "myWidth" is a global variable though; one method to avoid creating too many global variables is to use the property list slot on an existing symbol, for example the symbol "myEPdone" is global because it is used to define a function.  A symbol has three slots available for use, a value slot (for use as variables), a function slot and a property list slot.  All three of these can co-exist on a symbol, so in this case, we could use the property list slot on myEPdone (or some other function name) for global storage that does not look global (at least SKILL Lint will not mark you down for it).  So the example could be changed slightly:
     
    myEPdone.width = 0.8
    enterPath(
     ?prompts list("First point" "Next point")
     ?pathWidth myEPdone.width
     ?doneProc "myEPdone")
     
    Not sure if it helps, if not, please clearly state what you are looking for.
     
    Regards,

    Lawrence.
     
    • Post Points: 20
  • Tue, Apr 14 2009 10:22 PM

    • Infy1
    • Not Ranked
    • Joined on Thu, Apr 9 2009
    • Posts 7
    • Points 95
    Re: Can we pass value as variable to enterpath function other than pathWidth Reply

     hi Lawrence,

             I was trying to create a bus structure program, for that I used  CCSslotMetal.il  pgm as blue print to accept width ,layer cyclic field and snap.In the main function which create a bus structure I wanted to control the number of wires to be accepted from user.So for this I tried sending that  through enterPath function.

    But  CCSmetBusCB function through which I was sending the number (variablefor controlling no of wires). There was an error i CIW stating that variable should be a list type template.So can u help me out.

    Below is my pgm ,which creates metalbus structure with 10 wires.

    *****************************************************************************************************************************************************

    procedure(CCSmetBus()
      let( (form)
     if(boundp('CCSmetBusForm) && CCSmetBusForm then
          form = CCSmetBusForm
        else
          form = CCScreateMetBusForm()
        ); if
        when(hiIsForm(form)
          enterPath(
            ?prompts        list("Enter points for Metal Bus path")
            ?form           form
            ?points         nil
            ?doneProc       "CCSmetBusDoneProc"
            ?addPointProc   "CCSmetBusPoints"
            ?delPointProc   "CCSmetBusPoints"
            ?pathWidth      form->width->value
           ;?acceptString  form->number->value
            ?alwaysMap      t
            ?cmdName        "CCSmetBus"
          ); enterPath
        ); when the form exists
      ); let
    ); procedure CCSmetBus

    procedure(CCScreateMetBusForm()
      let( (width number layer snap snapModes form cv techId)
        if(cv = geGetEditCellView(hiGetCurrentWindow()) then
          if(techId = techGetTechFile(cv) then
     width = hiCreateFloatField(
              ?name 'width
              ?prompt "Width"
              ?value 1.0
              ?range list(0.3 2.0)
              ?callback "CCSchangeMetBusWidth()"
              ); hiCreateFloatField
     number = hiCreateFloatField(
                ?name 'number
                ?prompt "Number"
                ?value 1.0
                ?range list(1.0 100.0)
                ?callback "CCSchangeMetBusNumber()"
                ); hiCreateFloatField
    snapModes = list("orthogonal" "L90XFirst" "L90YFirst")
            snap = hiCreateCyclicField(
              ?name 'snap
              ?choices      snapModes
              ?prompt       "Snap mode"
              ?value        car(member(envGetVal("layout" "snapMode")
                              snapModes)) || "orthogonal"
              ?callback     "CCSchangeMetBusSnap()"
            ); hiCreateCyclicField
    layer = hiCreateLayerCyclicField(
              techId
              "Layer"
              ""
              leGetValidLayerList(techId) || list(leGetEntryLayer(techId))
              leGetEntryLayer(techId)
              'layer
            ); hiCreateLayerCyclicField
     form = hiCreateAppForm(
              ?name 'CCSmetBusForm
              ?formTitle "Metal Bus"
              ?formType     'options
              ?buttonLayout 'HideCancelDef
              ?fields list( list(width 0:0 100:30 50)
                list(snap 120:0 100:30 70)
                list(number 0:30 200:30 50)
               list(layer 0:90 200:30 50))
            ); hiCreateAppForm
     leSetFormSnapMode(form->snap->value)
            CCSshieldMetalForm = form
          else
            error("Could not obtain technology information")
          ); if the technology information can be obtained
        else
          error("Shield metal functions require a cellview to be current")
        ); if a current cellview exists
      ); let
    ); procedure CCScreateMetBusForm

    procedure(CCSchangeMetBusWidth()
      let( (origWidth)
        when(boundp('CCSmetBusForm) && CCSmetBusForm
          origWidth = CCSmetBusForm->width->value
          CCSmetBusForm->width->value = origWidth
          unless(CCSmetBusForm->currentWidth == CCSmetBusForm->width->value
            CCSmetBusForm->currentWidth = CCSmetBusForm->width->value
          ); unless
          changeEnterFun(
            'enterPath
            ?pathWidth      CCSmetBusForm->width->value
            ;?acceptString     CCSmetBusForm->number->value
            ?doneProc       "CCSmetBusDoneProc"
            ?points         CCSmetBusForm->points
            ?addPointProc   "CCSmetBusPoints"
            ?delPointProc   "CCSmetBusPoints"
            ?prompts        list("Enter points for Metal Bus path")
            ?form           CCSmetBusForm
          ); changeEnterFun
        ); when the form exists
      ); let
    ); procedure CCSchangeMetBusWidth

    procedure(CCSchangeMetBusNumber()
      let( (defaultNumber)
        when(boundp('CCSmetBusForm) && CCSmetBusForm
          defaultNumber= CCSmetBusForm->number->value
          CCSmetBusForm->number->value = defaultNumber
          unless(CCSmetBusForm->currentNumber == CCSmetBusForm->number->value
            CCSmetBusForm->currentNumber = CCSmetBusForm->number->value
          ); unless
          changeEnterFun(
            'enterPath
            ?pathWidth      CCSmetBusForm->width->value
            ;?acceptString     CCSmetBusForm->number->value
            ?doneProc       "CCSmetBusDoneProc"
            ?points         CCSmetBusForm->points
            ?addPointProc   "CCSmetBusPoints"
            ?delPointProc   "CCSmetBusPoints"
            ?prompts        list("Enter points for Metal Bus path")
            ?form           CCSmetBusForm
          ); changeEnterFun
        ); when the form exists
      ); let
    ); procedure CCSchangeMetBusNumber

    procedure(CCSchangeMetBusSnap()
      when(boundp('CCSmetBusForm) && CCSmetBusForm
        CCSmetBusForm->origSnap =
          leSetFormSnapMode(CCSmetBusForm->snap->value)
      ); when the form exists
    ); procedure CCSchangeMetBusSnap

    procedure(CCSmetBusPoints(win points "wl")
      when(windowp(win)
        ;; keep track of the points for when the enterFunction is changed
        CCSmetBusForm->points = points
      )
    ); procedure CCSmetBusPoints

    procedure(CCSmetBusDoneProc(win done points "wgl")
      let( ( form )
        when(boundp('CCSmetBusForm) && CCSmetBusForm
          form   = CCSmetBusForm
          if(done then
            ;; reset the currentWidth variable stored on the form
            ;; and reset the points list stored on the form
            form->currentWidth = nil
            form->currentNumber = nil
            form->points = nil
            CCSmetBusCB(
              win->cellView
              form->width->value
    ;          form->number->value
              CCSgetLPPfromLayerCyclic(form->layer->value)
              points
            )
          else
            ;; put back the most recent previous snap mode
            when(CCSmetBusForm->origSnap
              leSetFormSnapMode(CCSmetBusForm->origSnap)
            ); when
          ); if done
        ); when form exists
      ); let
    ); procedure CCSmetBusDoneProc

    procedure(CCSmetBusCB(cv width  layer points  "dfll")
    if( (width >=  techGetSpacingRule(techGetTechFile(cv) "minWidth" layer)) then
    layerWidth = width
    );if
    layerSpace = techGetSpacingRule(techGetTechFile(cv) "minSpacing" layer)
    let((a b n)
    b = list()
    a = list()

    number = 10

    n = number
    for(i 0 n-2
    a= list(
                                ?layer      layer
                                ?justification "left"
                                ?width layerWidth
                                ?sep  ( layerSpace * (i+1)) + ( layerWidth * i)
                                ?choppable  t
                               )
    b = cons(a b)
    );for
    b = reverse(b)
    rodCreatePath(
          ?cvId             cv
          ?layer            layer
          ?width            layerWidth
          ?pts              points
          ?justification "center"
          ?choppable  t
          ?offsetSubPath    b
       ); rodCreatePath
      );let
    ); procedure CCSmetBusCB

    procedure(CCSgetLPPfromLayerCyclic(layCyc "l")
      parseString(
        buildString(
          parseString(cadddr(layCyc) "()")
          ""
        )
      )
    ); procedure CCSgetLPPfromLayerCyclic

    CCSmetBus()
    ************************************************************************************************************************************************************

    Thanks & Regards,

    Roy

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Infy1 at 14 Apr 2009 02:10 AM. Topic has 2 replies.