• 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. Can we pass value as variable to enterpath function other...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 13400
  • 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

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

Infy1
Infy1 over 16 years ago

 Hi,

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

 Regards,

Roy

  • Cancel
  • skillUser
    skillUser over 16 years ago

     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.
     
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Infy1
    Infy1 over 16 years ago

     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

    • 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