• 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 Design
  3. Skill

Stats

  • Locked Locked
  • Replies 9
  • Subscribers 126
  • Views 15174
  • 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

Skill

SarathKumarG
SarathKumarG over 13 years ago

Hi guys,

I want to create streachable metal bus using skill code.Plz let me the the idea about how to create it.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    Use rodCreatePath. Here's an example of creating a bus with this:

    /* abCreateBus.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Mar 30, 1999 
    Modified   Mar 20, 2009 
    By         A.D.Beckett
    
    An example of creating a bus using ROD.
    
    The points could of course be specified by something like enterPath()
    in practice.
    
    Mar 20, 2009. Added new optional busPrefix to allow wires the be
    on named nets.
    
    ***************************************************
    
    SCCS Info: @(#) abCreateBus.il 03/20/09.12:59:54 1.2
    
    */
    
    /******************************************************************
    *                                                                 *
    *        abCreateBus(cv layer points numWires [busPrefix])        *
    *                                                                 *
    * Create a bus with given points, in the specified cellView, with *
    *                 the specified number of wires.                  *
    *                                                                 *
    ******************************************************************/
    
    procedure( abCreateBus(cv layer points numWires @optional busPrefix)
      let( (tfId layerWidth layerSpace offsetPaths)
        /* get technology file information */
        tfId = techGetTechFile(cv)
        layerWidth = techGetSpacingRule(tfId "minWidth" layer)
        layerSpace = techGetSpacingRule(tfId "minSpacing" layer)
        /* construct the list of sub paths */
        for(bit 1 numWires-1
          offsetPaths=tconc(offsetPaths
            list(
              ?netName when(busPrefix sprintf(nil "%s<%d>" busPrefix bit))
              ?layer layer
              ?justification "left"
              ?sep layerSpace*bit + layerWidth*(bit-1)
              )
            )
          )
        rodCreatePath(
    ;      ?name "bus"
          ?netName when(busPrefix sprintf(nil "%s<0>" busPrefix))
          ?layer layer
          ?pts points
          ?width layerWidth
          ?justification "center"
          ?cvId cv
          ?offsetSubPath car(offsetPaths)
          )
        ); let
      ); 
    
    
    

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kalikrishna
    kalikrishna over 13 years ago

     Hi,

          Thank you for your response. It is very helpfull for me.

    I have one doubt on above code. on that for net name you use 

     when(busPrefix sprintf(nil "%s<%d>" busPrefix bit)). I want to know, what is the use of this command?
    In this one disadvantage, we have to enter the points everytime.
    Is there any better solution? please let me know.. 
     
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    That line defines the net name for the bus wire. If ?busPrefix is passed to the function (e.g. as ?busPrefix "mybus"), each wire of the bus will get a net name of mybus<0>, mybus<1> etc. If you don't specify it using ?busPrefix, the wires will have no net assigned - they'll just be simple shapes.

    If you're asking about digitizing the points rather than typing them in, the comment at the top gives the hint. You could write something using the enterPath() function to collect the points before calling this function to create the bus.

    If using IC61 (e.g. IC615) there is a Create->Wiring->Bus command, so if that's what you want, no point reinventing the wheel. This allows you to interactively enter a bus, including changing layers and inserting vias, etc, etc.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kalikrishna
    kalikrishna over 13 years ago

    Thank you Andrew,

                                  By using this code, we can't draw BUS by clicking mouse as where we want like multi part path.

    plz let me know any suggestions

     

    Thank You

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    I explained how you could write something using enterPath() - if you search using the community search in this forum for "enterPath" you will find some examples of using this. I also explained how there's a built-in feature in IC61X. I could also have mentioned that in IC5141 you could use the "turbo toolbox" to provide this functionality - this is shipped as standard.

    So I'm not really sure what more suggestions I can give (other than writing the code for you, which I don't have time).

    I will even paste some code in here which shows enterPath being used for another purpose:

     

    /* abGuardRing.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Sep 13, 2002 
    Modified   
    By         
    
    This code defines two functions and a key-binding that allows the
    automatic creation of an arbitrary guard-ring structure.
    
    Could do with a few more comments...
    
    ***************************************************
    
    SCCS Info: @(#) abGuardRing.il 09/13/02.14:03:39 1.1
    
    */
    
    hiSetBindKey("Layout" "<Key>F10" "abCreateGuardring()")
    
    procedure(abCreateGuardring()
    
        unless(boundp('abCreateGuardringForm)
            abCreateGuardringOptionsForm()
            )
        enterPath(?prompts list("Enter points for guard ring")
            ?doneProc "abCreateGuardringDoneProc"
            ?points nil
            ?addPointProc "abCreateGuardringPointTracker"
            ?delPointProc "abCreateGuardringPointTracker"
            ?form abCreateGuardringForm
            ?alwaysMap t
            ?pathWidth abCreateGuardringForm->diffWidth->value
            )
    )
    
    procedure(abCreateGuardringOptionsForm()
        let((diffWidth)
            diffWidth=hiCreateFloatField(
                ?name 'diffWidth
                ?value 10.0
                ?callback "abChangeGuardringWidth()"
                ?prompt "Diffusion Width"
            )
            hiCreateAppForm(
                ?name 'abCreateGuardringForm
                ?formType 'options
                ?buttonLayout 'HideCancelDef
                ?fields list(
                    list(diffWidth 0:0 400:30 100)
                    )
            )
        )
    )
    
    
    procedure(abChangeGuardringWidth()
        ; need this to stop recursion (not sure why)
        unless(abCreateGuardringForm->currentWidth==
            abCreateGuardringForm->diffWidth->value
            abCreateGuardringForm->currentWidth=
                abCreateGuardringForm->diffWidth->value
            changeEnterFun(
                'enterPath
                ?pathWidth abCreateGuardringForm->diffWidth->value
                ?doneProc "abCreateGuardringDoneProc"
                ?points abCreateGuardringForm->points
                ?addPointProc "abCreateGuardringPointTracker"
                ?delPointProc "abCreateGuardringPointTracker"
                ?prompts list("Enter points for guard ring")
                ?form abCreateGuardringForm
            )
        )
    )
    
    procedure(abCreateGuardringPointTracker(win points)
        abCreateGuardringForm->points=points
    )
    
    procedure( abCreateGuardringDoneProc( win done points )
        let((
            (MPSDwid abCreateGuardringForm->diffWidth->value)
            (MPSDoverM1MT 0.7)
            (MPSDoverM1MC 1.30)
            (MPSDoverM1MCfuse 1.25)
            (MPSDoverMMOX 0.0)
            (MPSDoverMLOC 0.5)
            (MPSDoverSCE 0.9)
            (M1MCfuseWid 0.5)
            (M1MCspacing 0.5)
            (M1MCwidth 0.4)
            (cv geGetEditCellView())
            rowsOfConts availWid startOffset subRects
            )
            ; reset points for next invocation
            abCreateGuardringForm->points=nil
            abCreateGuardringForm->currentWidth=nil
            ;abChangeGuardringWidth()
            ; now compute...
            availWid=MPSDwid-2*MPSDoverM1MC+M1MCspacing
            rowsOfConts=fix(availWid/(M1MCfuseWid+M1MCspacing)+0.001)
            startOffset=(rowsOfConts*M1MCfuseWid+(rowsOfConts-1)*M1MCspacing)/2.0-
                M1MCfuseWid/2.0
            for(contRow 0 rowsOfConts-1
                subRects=cons(
                    list(
                        ?layer       '("M1MC" "bip2")
                        ?beginOffset -MPSDoverM1MC
                        ?space M1MCspacing+M1MCfuseWid-M1MCwidth
                        ?choppable t
                        ?sep -startOffset+contRow*(M1MCfuseWid+M1MCspacing)
                        ?gap 'minimum
                    )
                    subRects
                )
                subRects=cons(
                    list(
                        ?layer       '("M1MC" "fuse")
                        ?beginOffset -MPSDoverM1MCfuse
                        ?width M1MCfuseWid
                        ?choppable t
                        ?sep -startOffset+contRow*(M1MCfuseWid+M1MCspacing)
                        ?gap 'minimum
                    )
                    subRects
                )
            ) ; for
            when(done
                grfig = rodCreatePath(
                    ?cvId       cv
                    ?layer      '("MPSD" "bip")
                    ?width      MPSDwid
                    ?pts        points
                    ?choppable  nil
                    ?encSubPath list(
                        list(
                            ?layer     '("MMOX" "bip")
                            ?enclosure MPSDoverMMOX
                            ?choppable nil
                        )
                        list(
                            ?layer     '("MMOX" "CHK")
                            ?enclosure MPSDoverMMOX
                            ?choppable nil
                        )
                        list(
                            ?layer     '("MLOC" "bip")
                            ?enclosure MPSDoverMLOC
                            ?choppable nil
                        )
                        list(
                            ?layer     '("SCE" "bip")
                            ?enclosure MPSDoverSCE
                            ?choppable nil
                        )
                        list(
                            ?layer     '("M1MT" "bip")
                            ?enclosure MPSDoverM1MT
                            ?choppable t
                        )
                    )
                    ?subRect  subRects
                )
            )
        )
    )
    
    

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SarathKumarG
    SarathKumarG over 13 years ago

     Thanks Andrew,

                            I write sample programme for displaying GUI optionsform window.When i executing it shows    the ERROR "formStruct@0xd8ca808".plz let me know what is this error.Below is my programme

     hiSetBindKey("Layout" "<Key>F11" "bus()")
    procedure(bus()
    unless(boundp('busform)
            busform()
            ))
    procedure(busform()
     let((enterpoints)
    enterpoints=hiCreateFloatField(
                ?name 'enterpoints
                ?value  nil
                ?prompt "wantedpoints"
            )
            hiCreateAppForm(
                ?name 'busoptionsform
                ?formType 'options
                ?buttonLayout 'HideCancelDef
                ?fields list(
                    list(enterpoints 0:0 400:30 100)
                    )
            )
        )
    )

     

    Thank you.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    That's because nothing is displaying the form. If it's an options form, you'd have to reference the form object (busoptionsform) from the enterPath() call with a ?form argument - just as I did in the abCreateGuardring function. Alternatively, if you make the form a non-options form (?formType 'nonoptions and a suitable ?buttonLayout - the one you've picked is only relevant for options forms), you can then display it with hiDisplayForm(). 

    Right now, all you're doing is creating the form, and the function returns the last thing in the function, which is the return value of hiCreateAppForm, which is the handle to the form data structure.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • SarathKumarG
    SarathKumarG over 13 years ago

    Thanks Andrew,

                            I created the GUIform.But i dont know how to take the value entered in field ofGUI &how  to assign some variable to that value.Plz let me know any suggestions.

     

     

    Thank You.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    My first suggestion would be for you to show what you've done. Without that I'd have to give you every possible solution based on me guess as to how you might have implemented it.

    Please try to put yourself in the shoes of whoever is trying to help you out in the forum - do they have enough information to be able to answer you? Remember that this is a community forum, and we are all volunteers (including folks from Cadence who respond here - it's not part of our daily job to do this) and are responding in our free time. We're all busy people, so the more precise and complete the question, the more likely it is you'll get an answer.

    Andrew.

    • 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