Improvement of the code

Discussion in 'Cadence' started by noreply, Jun 16, 2009.

  1. noreply

    noreply Guest

    Hi i wrote the following code for creating a bus:
    ;To Create a ROD bus
    procedure(inputBus(myLayer myWidth mySpacing);Remember to enter the
    myLayer in double quotes like "ME1"
    rodCreatePath(
    ?name "inputBus"
    ?layer myLayer
    ?pts list(0:0 10:0 )
    ?width myWidth
    ?justification "left";this is used to say where the path has to
    start,that is if given "center" the center of the path will lie on the
    starting point
    ?cvId deGetCellView()
    ?offsetSubPath list(
    list(
    ?layer myLayer
    ?width myWidth
    ?justification "right"
    ?sep mySpacing);end of subpath1
    list(
    ?layer myLayer
    ?width myWidth
    ?justification "right"
    ?sep mySpacing*2+myWidth);end of subpath2
    list(
    ?layer myLayer
    ?width myWidth
    ?justification "right"
    ?sep mySpacing*3+myWidth*2);end of subpath3

    );list
    );rodCreatePath
    );procedure
    Using the above code we can create a bus with four metals..
    I'm now trying to create a more flexible code in which the user has
    the option to specify the number of "subpath"(metals)...
    any comments please.......
    regards,
    Lokesh rajendran.
     
    noreply, Jun 16, 2009
    #1
  2. noreply

    noreply Guest

    hi all ,
    could you please help me with the above code....
    Although the code seems lengthy its quite simple and simple (people
    who went through cadence tutorial must be knowing the above code)

    regards,
    Lokesh rajendran
     
    noreply, Jun 17, 2009
    #2
  3. noreply

    camelot Guest

    Just a simple solution: inside the procedure try to manage several
    cases by adding multiple path definitions... the choose could be done
    thorugh a parameter passed to the function...

    Camelot
     
    camelot, Jun 17, 2009
    #3
  4. noreply

    noreply Guest

    Hi camelot ,
    I'm trying the same as you told......
    Hope to see some improvement......
    Regards,
    Lokesh rajendran
     
    noreply, Jun 18, 2009
    #4
  5. noreply

    noreply Guest

    Hi andrew,
    could you please help me out or give me some hint on how to
    proceed...
    I'm stuck with the code...
    Regards,
    lokesh rajendran.
     
    noreply, Jun 19, 2009
    #5
  6. noreply

    I-F AB Guest

    Hi,
    How about a for loop?

    e.g.
    procedure( inputBus( myLayer myWidth mySpacing NoOfPaths )
    let(( (SUBPATHList nil) SUBPATH) ;initialise SUBPATHList
    as nil
    .....
    .....
    .....
    ?cvId deGetCellView()
    ?offsetSubPath
    {
    for( SubP 0 sub1(NoOfPaths) ;here comes
    the for loop...
    SUBPATH = list(
    ?layer myLayer
    ?width myWidth
    ?justification "right"
    ?sep (SubP+1)*mySpacing + SubP*myWidth
    ) ;end of subpath
    SUBPATHList = cons( SUBPATH SUBPATHList )
    ) ;for
    }
    );rodCreatePath
    ) ;let
    );procedure


    Best Regards,
    I-FAB
     
    I-F AB, Jun 19, 2009
    #6
  7. noreply

    noreply Guest

    Hi I-F AB,
    Thank you very much...
    Your code is working perfectly fine...(I did little modification to
    suit my code)
    Regards,
    Lokesh rajendran.
     
    noreply, Jun 19, 2009
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.