How to construct a script to run DRC on multiple cells at a time?

Discussion in 'Cadence' started by Min Ting, Aug 6, 2009.

  1. Min Ting

    Min Ting Guest

    Hi all,

    I'm trying to runn Assura DRC on a large number of cell layouts in a
    standard cell library. I am wondering if I should construct the script
    in the .rsf file, and use assura to run it in the command line?

    Can anybody help me please regarding that?

    Thanks a lot and best regards,
    Min
     
    Min Ting, Aug 6, 2009
    #1
  2. Min Ting

    Riad KACED Guest

    Hi Min,

    Pretty simple.
    All what you need is to create a skill script that loops through all
    the cells (having a layout view) of your library. Create the RSF file
    for each cell and then launch assura on that RSF file. You might use
    the skill commands system of ipcBeginProcess ... etc.
    Does this make any sense to you ? I can put together few lines for you
    otherwise.

    Cheers,
    Riad.
     
    Riad KACED, Aug 6, 2009
    #2
  3. Min Ting

    jayl-news Guest

    Min,

    I always found it easier to have a shell wrapper generate the
    rsf and run the 100's of assura jobs out in unix land, where I've
    got full job control. For example in python, it looks like this:

    def make_def_drc_rsf( cell ):
    run_dir = RUN_DIR
    text = """; Generated by BCAD %(date)s
    avParameters(
    ?inputLayout ( "df2" "%(lib)s" )
    ?cellName "%(cell)s"
    ?viewName "layout"
    ?workingDirectory "%(drc_dir)s"
    ?technology "rcxtech"
    ?techLib "./assura_tech.lib"
    ?set ("SKIP_HV_3_3")
    ?set ("LATCH_UP")
    ?flagOffGrid (0.005 0.1)
    ?avrpt t
    )
    """

    lib = cadence.findlibex( cell, 'layout' )
    rsf_file = get_drc_rsf_source( cell )
    run_dir = RUN_DIR
    drc_dir = get_drc_dir( cell )
    date = time.strftime( TIME_FORMAT )
    fh = open( rsf_file, "w" )
    fh.write( text % vars())
    fh.close()

    .....
    Easy to do the same thing in bash, or perl, or whatever.
    -Jay-
     
    jayl-news, Aug 6, 2009
    #3
  4. Min Ting

    Min Ting Guest

    Hi Riad,

    Thanks for your hint!

    Do you mean that I need to create a directory containing all the .rsf
    files for the cell in my library?
    Then in the script I would need to use whatever loop to assura all
    the .rsf files in that directory.
    Does the assura command looks like: "assura xxx.rsf " ??

    Also, after running DRC through all the cells, I am wondering is
    there a better way to check through all the output files to figure out
    which are the bad cells? Instead of checking them manually.

    I am new to SKILL language, would you mind giving me some clues on
    creating a script in SKILL?

    Thanks alot!

    Min
     
    Min Ting, Aug 6, 2009
    #4
  5. Min Ting

    I-F AB Guest

    Hi,
    Just try Jay's method.
    You don't necessarily need SKILL.
    I believe Riad was referring to creating the .rsf text file using
    SKILL (which I'm not really good at).

    As far as I know (well, correct me if I'm wrong), there's no way to
    run assura in the CIW.
    Your command "assura xxx.rsf " should be run in shell i.e.:
    hello_jack@cern> assura xxx.rsf

    Personally, I'd create one general .rsf file, with the line:
    ?cellName CELL
    I'd change CELL with a loop with shell script using the sed command
    (since I don't know Python syntax - but which will be similar as Jay's
    codes).

    This way, we can bypass using Virtuoso licenses.

    Best Regards,
    I-FAB
     
    I-F AB, Aug 7, 2009
    #5
  6. Min Ting

    I-F AB Guest

    I haven't managed to test these codes but if I'm missing something, it
    might be helpful, so please check them first.
    To use them, you would need 3 files:
    1 for the shell code,
    1 for the .rsf template &
    1 for the list of cells
    To run, source the bash shell file from command line.

    For the bash shell code:
    --------------------------------------------------------------------------------------------------------------------------------
    #!/bin/bash

    #check for template file
    if [ -f "TemplateRunAssura.rsf" ]
    then :
    else
    echo -e "\t ERROR: Assura runset template file missing!"
    exit 55
    fi
    #run loop
    for CELL in `ListOfCells`
    do
    sed "s|\*\*\*CELL\*\*\*|$CELL|" \
    < TemplateRunAssura.rsf > RunAssura.rsf
    echo "***************************************************"
    echo -e "\t\t INFO: Assura runset for $CELL DONE"
    echo "***************************************************"

    #run Assura
    assura RunAssura.rsf
    echo -e "\n\t INFO: Run Assura on $CELL finished.\n"
    done
    --------------------------------------------------------------------------------------------------------------------------------

    For the TemplateRunAssura.rsf template file:
    --------------------------------------------------------------------------------------------------------------------------------
    avParameters(
    ?inputLayout ( "df2" "library35nmXYZ" ) ; insert correct library
    files
    ?cellName "***CELL***" ; will be changed by shell script
    ?viewName "layout"
    ?workingDirectory "AutoAssura_Output" ; output files here
    ?rulesFile "./AssuraRules.rul" ; insert correct rule
    files
    ?avrpt t
    ; ?keepData namedLayers ; not necessarily needed
    )
     
    I-F AB, Aug 7, 2009
    #6
  7. Min Ting

    Min Ting Guest

    Hi,

    Thanks a lot for you code!!!

    I still have two questions:

    1. For the cell list, what should its file format be?
    so I only need to create a list with all the cellnames?
    for the loop: "for CELL in `ListOfCells` " to go through all the
    cells in the list, do I need to put 1 cell per line in the list, or
    other specific format needed to be
    implemented?
    for example:
    and2_bbbc
    and2_bbcd
    and2_bbdd
    ....

    2. After generating all the output files, is there a good way to pick
    up the bad ones? or I could do it in the same shell script while
    running assura?

    Best Regards,

    Min
     
    Min Ting, Aug 7, 2009
    #7
  8. Min Ting

    Min Ting Guest

    Hi,

    Thanks a lot for you code!!!

    I still have two questions:

    1. For the cell list, what should its file format be?
    so I only need to create a list with all the cellnames?
    for the loop: "for CELL in `ListOfCells` " to go through all the
    cells in the list, do I need to put 1 cell per line in the list, or
    other specific format needed to be
    implemented?
    for example:
    and2_bbbc
    and2_bbcd
    and2_bbdd
    ....

    2. After generating all the output files, is there a good way to pick
    up the bad ones? or I could do it in the same shell script while
    running assura?

    Best Regards,

    Min
     
    Min Ting, Aug 7, 2009
    #8
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.