• 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. Implementing flow control in rodCreatePath function

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 145
  • Views 20175
  • 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

Implementing flow control in rodCreatePath function

infy
infy over 16 years ago

Hi,

Can we Implement flow control structures like if,while in rodCreatepath function to control the number of offset subpaths.

Regards,

Roy

  • Cancel
Parents
  • Infy1
    Infy1 over 16 years ago

    Hi Andrew ,

    I tried in the method suggested by you  to create a metal bus form which accepts width of wires in bus structure and no of wires from user ,the form also has layer and snap mode cyclic fields.I used mostly 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()

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

    Regards,

    Roy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Infy1
    Infy1 over 16 years ago

    Hi Andrew ,

    I tried in the method suggested by you  to create a metal bus form which accepts width of wires in bus structure and no of wires from user ,the form also has layer and snap mode cyclic fields.I used mostly 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()

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

    Regards,

    Roy

    • 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