• 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. Help on creating a Bus.

Stats

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

Help on creating a Bus.

venuuuuu
venuuuuu over 13 years ago

hi guys,

I have a code that creats  Bus(group of methals) in my layout. When i call it then it shows widow box & It has options width(for metal width), number(for no. of metals), layer( for layer selection), snap mode. Now problem is number of metals doesnot get what i entered in that window box. Code is below.

 procedure(bus()
  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("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()
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) "()")
      ""
    )
  )
);

;and then i add it as menu item. 

procedure(AmitAddMenu(_args)
  let( (item1 item2 item3)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "labels"
              ?callback "labels()"
            );labels() is a procedure which ididn't shown here

    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "Bus"
              ?callback "bus()"
            )


       item2 = hiCreateMenuItem( ?name 'item3 ?itemText "Setlsw"
              ?callback "venu()"
            )venu() is a procedure which i did not shown here
    ;; create a menu that includes the menu items and return a list of the
    ;; pulldown menus
    list(hiCreatePulldownMenu('AmitMenu "FPS" list(item1 item2 item3)))
  );let
); procedure
;; create a userMenuTrigger trigger that automatically adds the menu
deRegUserTriggers("maskLayout" nil 'AmitAddMenu)

please help me to do it
  • Cancel
Parents
  • venuuuuu
    venuuuuu over 13 years ago

     hi Andrew,

    Thank you very much. I done it with all your  help.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • venuuuuu
    venuuuuu over 13 years ago

     hi Andrew,

    Thank you very much. I done it with all your  help.

    • 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