Home > Community > Forums > Custom IC SKILL > Can we draw mutlipath different width and spacing at the same time?

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 draw mutlipath different width and spacing at the same time? 

Last post Thu, May 29 2014 9:16 AM by skillUser. 13 replies.
Started by Manu81 10 Mar 2009 10:53 PM. Topic has 13 replies and 3999 views
Page 1 of 1 (14 items)
Sort Posts:
  • Tue, Mar 10 2009 10:53 PM

    • Manu81
    • Top 500 Contributor
    • Joined on Fri, Mar 6 2009
    • Posts 16
    • Points 260
    Can we draw mutlipath different width and spacing at the same time? Reply
    Can we draw mutlipath different width and spacing at the same time?
    • Post Points: 20
  • Wed, Mar 11 2009 8:15 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,567
    • Points 15,575
    Re: Can we draw mutlipath different width and spacing at the same time? Reply
    Hi,

    Yes, with a multipart path the "offset sub paths" can certainly have different widths and separation from the master path.  Here is a brief section from the documentation on the rodCreatePath() SKILL function that you use to create a multi-part path:

    rodCreatePath(
            [?name              S_name]
            ?layer              txl_layer
            [?width             n_width]
            [?pts               l_pts]
            [?justification     S_justification]
            [?offset            n_offset]
            [?endType           S_endType]
            [?beginExt          n_beginExt]
            [?endExt            n_endExt]
            [?choppable         g_choppable]
            [?cvId              d_cvId]
            [?fromObj           Rl_fromObj]
            [?size              txf_size]
            [?startHandle       l_startHandle]
            [?endHandle         l_endHandle]
            [?prop              l_prop]
    
            [?offsetSubPath     l_offsetSubpathArgs...]
            ;l_offsetSubpathArgs Offset Subpath Arguments
            list(
                    list(
                            ?layer            txl_layer
                            [?width           n_width]
                            [?sep             n_sep]
                            [?justification   S_justification]
                            [?beginOffset     n_beginOffset]
                            [?endOffset       n_endOffset]
                            [?choppable       g_choppable]
                            [?prop            l_prop]
                            ;Repeat ROD Connectivity Arguments here
                            ) ;End of first offset subpath list
                            ...
                    ) ;End of offset subpath lists
            ;End of l_offsetSubpathArgs
    
    ) ; end rodCreatePath
    => R_rodObj | nil
    

     I have included the arguments for the ?offsetSubPath keyword of rodCreatePath so that you can see how they are specified. It is a list of lists structure, each sublist refers to one offset sub path, but there can be multiple offset subpaths.

    I hope that this answers your question.

    Regards,

    Lawrence.

    • Post Points: 65
  • Wed, Mar 11 2009 9:19 PM

    • Manu81
    • Top 500 Contributor
    • Joined on Fri, Mar 6 2009
    • Posts 16
    • Points 260
    Re: Can we draw mutlipath different width and spacing at the same time? Reply
    Thanks Lawerence, tere is one sample code given for shielding in Virtuoso® Relative Object Design User Guide. Will refer there too.Regards, Manu
    • Post Points: 5
  • Thu, Mar 12 2009 4:07 AM

    • Manu81
    • Top 500 Contributor
    • Joined on Fri, Mar 6 2009
    • Posts 16
    • Points 260
    Re: Can we draw mutlipath different width and spacing at the same time? Reply
    this is what I have written...: ; create a shielded path
    procedure( shielded()
    cv=geGetEditCellView()
    errset(
    (let (cv layer purpose list_draw_layer tech width1 tfId)
    cv= geGetEditCellView()
    layer = car(leGetEntryLayer()) ;displays layer on LSW is taken
    purpose = cadr(leGetEntryLayer()); displays drawing or pin on the selected lsw
    list_draw_layer =list( layer purpose )
    tech = techGetTechFile(geGetWindowCellView()); rule deck file id is stored in tech
    width1 = techGetSpacingRule(tech "minWidth" layer) ; the minimum width is stored in width1

     rodCreatePath(
      ?name "shielded"
      ?layer list( layer purpose )
      ?pts list(2:-15 2:-5 15:-5 15:-5)
      ?width .12
      ?justification "center"
      ?cvId cv
      ?offsetSubPath
      list(list(
         list(
             ?layer list( layer purpose )
             ?justification "left"
             ?sep .16
             ?width .16
             ) ;end of offset sublist1
       list(
             ?layer list( layer purpose )
             ?justification "right"
             ?sep .16
             ?width .16

    ) ;end of offset sublist2
    ) ;end of offset list of lists
    ) ;end of rodCreatePath
    ) ; end of let
    t
    ) ; end of errset
    ) ; end of procedure

    what else needs to be done so that instead of the predefined values of metal layers and the width, spacing can be changed....
    • Post Points: 5
  • Thu, Mar 12 2009 4:18 AM

    • Manu81
    • Top 500 Contributor
    • Joined on Fri, Mar 6 2009
    • Posts 16
    • Points 260
    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    Hi Lawerence,

    Request you to please see the code:

    ; create a shielded path
    procedure( shielded()
    cv=geGetEditCellView()
    errset(
    (let (cv layer purpose list_draw_layer tech width1 tfId)
    cv= geGetEditCellView()
    layer = car(leGetEntryLayer()) ;displays layer on LSW is taken
    purpose = cadr(leGetEntryLayer()); displays drawing or pin on the selected lsw
    list_draw_layer =list( layer purpose )
    tech = techGetTechFile(geGetWindowCellView()); rule deck file id is stored in tech
    width1 = techGetSpacingRule(tech "minWidth" layer) ; the minimum width is stored in width1

     rodCreatePath(
      ?name "shielded"
      ?layer list( layer purpose )
      ?pts list(2:-15 2:-5 15:-5 15:-5)
      ?width .12
      ?justification "center"
      ?cvId cv
      ?offsetSubPath
      list(
         list(
             ?layer list( layer purpose )
             ?justification "left"
             ?sep .16
             ?width .16
             ) ;end of offset sublist1
       list(
             ?layer list( layer purpose )
             ?justification "right"
             ?sep .16
             ?width .16

    ) ;end of offset sublist2
    ) ;end of offset list of lists
    ) ;end of rodCreatePath
    ) ; end of let
    t
    ) ; end of errset
    ) ; end of procedure

    I want to take the values from the from the user. Therefore, I have created form and passing the values to the variables. Now, wrt to the above programme, can you please tell me what changes I need to make in order to have user defined width and spacing.

     Regards,

    Manu

    • Post Points: 20
  • Thu, Mar 12 2009 6:48 AM

    • dmay
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • Allen, TX
    • Posts 393
    • Points 7,415
    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    If you add two arguments to your procedure and use them in place of the .16 values in your rodCreatePath, then your form can call this command with the user's width and space.

    procedure( shielded(width space)
    . . .
    ?sep space
    ?width width
    . . .

    I hope this helps.

    Derek

    • Post Points: 5
  • Sun, May 25 2014 10:26 PM

    • rajput
    • Not Ranked
    • Joined on Mon, May 26 2014
    • Posts 4
    • Points 80
    Re: Can we draw mutlipath different width and spacing at the same time? Reply

     Hi Lawrence,

             Actually i want as many, master path for coaxial shielding required by user but using the rodCreatePath i am not able to do so.

    secondally my GND lines & Master path should not be of same width.so is there is any way to do this ???

    Regards

    pankaj

    • Post Points: 20
  • Sun, May 25 2014 11:28 PM

    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    You can only have a single master path, but there is nothing to stop you having one of the tracks as the master, and others (and the shield) as being offset sub-paths. Examples above show how to have different width for different offset subpaths.

    So I'm not sure what you can't do...

    Regards,

    Andrew 

    • Post Points: 20
  • Tue, May 27 2014 5:38 AM

    • rajput
    • Not Ranked
    • Joined on Mon, May 26 2014
    • Posts 4
    • Points 80
    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    Hi Andrew

       Actually i am writing script for coaxial shielding & i am shielding multiple paths at a time. suppose  five metal 2 paths to be coaxiallly shielded.then the gnd line of metal 2 lines should be sideways & for metal1 & metal3 it should be at top & bottom.

    1        i am using rodcreatepath to so. & i am using offsetSubPath for sideways & top & bottom metal layer to do so. But the problem i  am facing is how map top & bottom layer with middle layer as it is relative to  masterpath ..even i triedthe argument justification...

    2.  i have also used encSubPathfor top & bottom layers  & used enclosure argument but it is taking same enclosure all the sides which i dont want .please have a look on attached snapshot....

     

     


          


    • Post Points: 20
  • Tue, May 27 2014 7:00 AM

    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    I think this should do what you want (it would have helped if your picture showed what you want, rather than what you're getting, so I had to guess that this was indeed what you want). I've attached two pictures (merged together) showing the original multipart path at the bottom, and then after reshape and stretch. It has Metal1 on the bottom, Metal3 on the top, a strap of via1 and via2 on the gnd at the upper and lower edge, and then 4 tracks in the middle.

    cvId=geGetEditCellView()
    points=list(0:0 40:0)
    mainWidth=1
    mainSpacing=1
    gndWidth=2.0
    gndSpacing=1.5
    nTracks=4
    mainLayer="Metal2"
    bottomLayer="Metal1"
    topLayer="Metal3"
    viaLayer1="Via1"
    viaLayer2="Via2"
    viaWidth=0.5
    viaSpacing=0.5
    
    offsetPaths=nil
    for(i 1 nTracks-1
        offsetPaths=
            cons(
                list(
                    ?layer mainLayer
                    ?width mainWidth
                    ?sep -i*(mainWidth+mainSpacing)
                )
                offsetPaths
            )
    )
    offsetPaths=constar(
        list(
            ?layer mainLayer
            ?width gndWidth
            ?sep mainWidth/2.0+gndSpacing+gndWidth/2.0
        )
        list(
            ?layer mainLayer
            ?width gndWidth
            ?sep -(nTracks-1)*(mainWidth+mainSpacing)-mainWidth/2.0-gndSpacing-gndWidth/2.0
        )
        offsetPaths
    )
    
    subRects=foreach(mapcan viaLayer list(viaLayer1 viaLayer2)
        list(
            list(
                ?layer viaLayer1
                ?width viaWidth
                ?gap 'distribute
                ?space viaSpacing
                ?sep mainWidth/2.0+gndSpacing+gndWidth/2.0
                ?beginOffset -viaSpacing
                ?endOffset -viaSpacing
            )
            list(
                ?layer viaLayer1
                ?width viaWidth
                ?gap 'distribute
                ?space viaSpacing
                ?sep -(nTracks-1)*(mainWidth+mainSpacing)-mainWidth/2.0-gndSpacing-gndWidth/2.0
                ?beginOffset -viaSpacing
                ?endOffset -viaSpacing
            )
        )
    )
    
    topBotWidth=nTracks*(mainWidth+mainSpacing)-mainSpacing+(gndSpacing+gndWidth)*2
    topBotCent=gndWidth+gndSpacing+mainWidth/2.0-topBotWidth/2.0
    
    foreach(topBotLayer list(bottomLayer topLayer)
        offsetPaths=cons(
            list(
                ?layer topBotLayer
                ?width topBotWidth
                ?sep topBotCent
            )
            offsetPaths
        )
    )
    
    rodCreatePath(
        ?cvId  cvId
        ?layer mainLayer
        ?width mainWidth
        ?pts points
        ?offsetSubPath offsetPaths
        ?subRect subRects
    )
    

     


    • Post Points: 20
  • Wed, May 28 2014 5:04 AM

    • rajput
    • Not Ranked
    • Joined on Mon, May 26 2014
    • Posts 4
    • Points 80
    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    Hi Andrew,

       Following is the script which i write for coaxial multipath it is working fine in gpdk180. Actually i want to make it technology independent .How can i do that. Actually i am new to skill learning from last 2-3  weeks .Please help me how to approach to make it technology independent..

     

     
    /***********Form Creation*************/
    procedure(openform()


    metal_list = list("Metal1" "Metal2" "Metal3" "Metal4" "Metal5" "Metal6")

    Sig_lines= hiCreateIntField(
    ?name 'Sig_lines
    ?prompt "No of Signal lines"
    ?value 1
    )

    sig_metal_layer= hiCreateCyclicField(            
    ?name  'sig_metal_layer
    ?prompt "Signal Metal layer"
    ?choices  metal_list
    )

    spacing_lines= hiCreateFloatField(
    ?name 'spacing_lines
    ?prompt "Spacing b/w Signal lines"
    ?value 0.6
    )

    width_lines= hiCreateFloatField(
    ?name 'width_lines
    ?prompt "Width of Signal lines"
    ?value 0.8
    )

    spacing_gnd_lines= hiCreateFloatField(
    ?name 'spacing_gnd_lines
    ?prompt "Spacing from GND lines"
    ?value 1.0
    )


    width_gnd_lines= hiCreateFloatField(
    ?name 'width_gnd_lines
    ?prompt "width of GND lines"
    ?value 1.2
    )



    multipath= hiCreateAppForm(
    ?name 'multipath
    ?formTitle "coaxial_multipath"
    ?callback "enterpoints()"
    ?fields list(Sig_lines sig_metal_layer spacing_lines width_lines spacing_gnd_lines  
    width_gnd_lines )
    ?help "multipath" )

     hiDisplayForm(multipath)

    )




    /****************************************/

    procedure(enterpoints()
    enterPath(
       ?prompts list("Enter 1st point:" "Enter next point:")
       ?doneProc "Shield"
    ))
        

    ;; Create a shielded path
    procedure( Shield(win done pts)

      errset(
       (let (cv layer purpose list_draw_layer tech width1 tfId)

          unless( done printf("Finished!") )

          cv = geGetEditCellView()
                   
        
        
         separation = multipath->spacing_gnd_lines->value + 1/2*(multipath->width_gnd_lines->value) +
         1/2*(multipath->width_lines->value)
        
        
        
        
         sig_lines=multipath->Sig_lines->value                                 
        
         temp_list= list()
         i=1
         while(i<=sig_lines-1
        
         sepsiglines= i*(multipath->spacing_lines->value) + (i-1)*(multipath->width_lines->value)
        
        
                               lista=list(
                                      ?layer list(  "Metal2" "drawing" )
                                      ?justification "right"
                                     ?sep sepsiglines
                                      ?width multipath->width_lines->value
                               ) ;end of offset sublist2
        temp_list= append1(temp_list lista)
        i++
         )
        
        if( sig_lines > 1
        then
        delta = sepsiglines + multipath->spacing_gnd_lines->value + multipath->width_lines->value
        )
        if( sig_lines == 1
        then
        delta = separation
        )
        
        
        
          rodCreatePath(


            ?layer        list(  "Metal2" "drawing")
            ?pts         foreach(   mapcar point pts
                             geWindowToEditPoint(hiGetCurrentWindow() point)
                    )
                 ?width         multipath->width_lines->value
                 ?justification     "center"
                 ?cvId         cv
             ?offsetSubPath
                         append(temp_list list(
                               list(
                                      ?layer list( "Metal2" "drawing")
                                      ?justification "left"
                                      ?sep separation
                                      ?width  multipath->width_gnd_lines->value
                               ) ;end of offset sublist1
           
           
                               list(
                                      ?layer list(  "Metal2" "drawing" )
                                      ?justification "right"
                                     ?sep delta
                                      ?width multipath->width_gnd_lines->value
                               ) ;end of offset sublist2
                        
                        
                               list(
                                      ?layer list(  "Metal1" "drawing" )
                                      ?justification "right"
                            ?sep  -((multipath->width_gnd_lines->value)+(multipath->width_lines->value)+(multipath->spacing_gnd_lines->value))
                                      ?width delta +2*(multipath->width_gnd_lines->value)+(multipath->width_lines->value)+(multipath->spacing_gnd_lines->value)
                               ) ;end of offset sublist3    
                        
                               list(
                                      ?layer list(  "Metal3" "drawing" )
                                      ?justification "right"
                            ?sep  -((multipath->width_gnd_lines->value)+(multipath->width_lines->value)+(multipath->spacing_gnd_lines->value))
                                      ?width delta +2*(multipath->width_gnd_lines->value)+(multipath->width_lines->value)+(multipath->spacing_gnd_lines->value)
                               ) ;end of offset sublist4    
                        
                        
                        ) ;end of offset list of lists
                     )
        
        

             
              ?subRect
                         list(

           
                             list(
                            ?layer     list("Via1" "drawing")
                            ?length     nil
                            ?choppable     t
                            ?sep     ((0.5*(multipath->width_gnd_lines->value))+(0.5*(multipath->width_lines->value))+(multipath->spacing_gnd_lines->value))
                            ?justification     "center"
                            ?space     nil
                            ?beginOffset     -0.300000
                            ?endOffset     -0.300000
                            ?gap     "distribute"
                        );end of subRect list1a
                        
                        list(
                            ?layer     list("Via1" "drawing")
                            ?length     nil
                            ?choppable     t
                            ?sep     -(((sig_lines-1)*(multipath->spacing_lines->value))+(multipath->spacing_gnd_lines->value)+
                                                             (0.5*(multipath->width_gnd_lines->value))+((sig_lines-0.5)*(multipath->width_lines->value)))
                            
                            ?justification     "center"
                            ?space     nil
                            ?beginOffset     -0.300000
                            ?endOffset     -0.300000
                            ?gap     "distribute"
                        );end of subRect list1b
                        
                        
                             list(
                            ?layer     list("Via2" "drawing")
                            ?length     nil
                            ?choppable     t
                            ?sep     ((0.5*(multipath->width_gnd_lines->value))+ (0.5*(multipath->width_lines->value))+(multipath->spacing_gnd_lines->value))
                            ?justification     "center"
                            ?space     nil
                            ?beginOffset     -0.300000
                            ?endOffset     -0.300000
                            ?gap     "distribute"
                        );end of subRect list2a
                                 
                                        list(
                            ?layer     list("Via2" "drawing")
                            ?length     nil
                            ?choppable     t
                            ?sep    -(((sig_lines-1)*(multipath->spacing_lines->value))+(multipath->spacing_gnd_lines->value)+
                                                             (0.5*(multipath->width_gnd_lines->value))+((sig_lines-0.5)*(multipath->width_lines->value)))
                            ?justification     "center"
                            ?space     nil
                            ?beginOffset     -0.300000
                            ?endOffset     -0.300000
                            ?gap     "distribute"
                        );end of subRect list2b         

        
                         );end of subrect of lists


        
                  ) ;end of rodCreatePath
       ) ; end of let
     
      ) ; end of errset
    ); end of procedure


    hiSetBindKey("Layout" "Shift<key>2" "openform()")

     

     Regards

    pankaj

     

     

     

    • Post Points: 5
  • Wed, May 28 2014 5:13 AM

    • rajput
    • Not Ranked
    • Joined on Mon, May 26 2014
    • Posts 4
    • Points 80
    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    Andrew 

      one more point i want to know that the middle layer is metal2 ..which i have hard coded ...suppose  if i want user to choose the metal layer from the "form" which i have made..on the basis of it will create top & bottom layer on it own ...so what logic i have to implement ???

     

     & other doubt is that if i select the metal1 or the higest metal in particular technology in form it will display the message  coaxial shielding could not possible.......

    please let me know these doubts....

     

    Regards

    pankaj

    • Post Points: 35
  • Thu, May 29 2014 1:55 AM

    Re: Can we draw mutlipath different width and spacing at the same time? Reply

    I'm not sure what you need to know about making it technology independent. It's just a matter of not hardcoding the layers and rules into the code, but either have them specified on the form or have them seeded from some external variables (or even maybe the technology file). The same is true to compute the layer above and layer below - you could either do this either by assuming that the metal layers are called xxxxxN with a number at the end, or looking at info in the technology file (using the tech.* functions) to look at the layers. For example:

    techGetLayerFunctions(techGetTechFile(cvId))
    (("Psub" "pwell" 1)
        ("Nburied" "nwell" 2)
        ("Nwell" "nwell" 3)
        ("Oxide" "ndiff" 4)
        ("Oxide_thk" "ndiff" 5)
        ("Poly" "poly" 6)
        ("Nhvt" "nplus" 7)
        ("Nimp" "nplus" 8)
        ("Phvt" "pplus" 9)
        ("Pimp" "pplus" 10)
        ("Nzvt" "nplus" 11)
        ("SiProt" "pplus" 12)
        ("Cont" "cut" 13)
        ("Metal1" "metal" 14)
        ("Via1" "cut" 15)
        ("Metal2" "metal" 16)
        ("Via2" "cut" 17)
        ("Metal3" "metal" 18)
        ("Via3" "cut" 19)
        ("Metal4" "metal" 20)
        ("Via4" "cut" 21)
        ("Metal5" "metal" 22)
        ("Via5" "cut" 23)
        ("Metal6" "metal" 24)
        ("Via6" "cut" 25)
        ("Metal7" "metal" 26)
        ("Via7" "cut" 27)
        ("Metal8" "metal" 28)
        ("Via8" "cut" 29)
        ("Metal9" "metal" 30)
        ("Bondpad" "unknown" 31)
        ("substrate" "recognition")
    )

    I could then use this to find the metal layer below or after (if it exists) and the via layers to use. You could also look up other rules in the tech file, should you want to. If there's no higher (or lower) layer, you could either ensure that the form didn't offer that choice of metal layer for the routing layer (you could add a cyclic field only containing the valid layers, which would then stop the user from being able to select a layer too high or too low in the stack). 

    Not sure why you have put errset() around the entire code. That sounds a good way of making your code hard to debug when you make a mistake as it will suppress errors that you've made!

    Regards,

    Andrew.

    • Post Points: 5
  • Thu, May 29 2014 9:16 AM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,567
    • Points 15,575
    Re: Can we draw mutlipath different width and spacing at the same time? Reply
    Hi Pankaj,

    In addition to what Andrew has said, you might like to take a look at parts of the code attached to this Solution Article - it shows creating a layer cyclic field which you can present on the form for selecting the metal layer.  Also, you can use the code that Andrew suggested to directly get just the metal layers, for example:

    metfuncs = setof(lpp techGetLayerFunctions(tf) rexMatchp("metal" cadr(lpp)))
    => (("Metal1" "metal" 3) 
          ("Metal2" "metal" 5) 
          ("Metal3" "metal" 7) 
          ("Metal4" "metal" 9) 
          ("Metal5" "metal" 11)
          ("Metal6" "metal" 13)
      )
    metals = mapcar('car metfuncs)
    => ("Metal1" "Metal2" "Metal3" "Metal4" "Metal5"
         "Metal6")
    

    Then you can limit the choices presented to the user to just be from the second layer (i.e. "Metal2" in this case) through to the second-to-last layer ("Metal5" in this example).

    Best regards,

    Lawrence.

    • Post Points: 5
Page 1 of 1 (14 items)
Sort Posts:
Started by Manu81 at 10 Mar 2009 10:53 PM. Topic has 13 replies.