assura RCX - find nets by net base name

Discussion in 'Cadence' started by Marcel Preda, Oct 28, 2009.

  1. Marcel Preda

    Marcel Preda Guest

    Hi all,

    I have an assura extctracted view, with parasitic info.
    The nets and associated shapes were fragmented.
    I need a function to get all the nets derivative from a baseName net.
    because I need to do something with their respective shapes.

    e.g. "GND" has become a list of nets:
    "GND", "1:GND:, ...."45465:GND".
    I need function to pass "GND" as argument and to get all those nets.

    For now I'm using a code like:
    ~~~~~~~~~~~~~~~~~~~
    baseName = "GND"
    rexCompile(strcat("[0-9]*\\:*" baseNet "$"))
    setof(cvNet cv->nets rexExecute(cvNet->name))
    ~~~~~~~~~~~~~~~~~~~~~
    It works but it is slowly, for ~ 300 such nets have to wait about 15
    minutes.
    I've used skill profiler, and less than 1/4 of total time is used by
    rexExecute,
    about 75% of time is used to scan cv->nets .

    Is there any faster solution ?

    I would like to have a function dbGetNetsByBaseName(s_baseName cv).
    If such a native function exists I'm sure that is faster than what I
    have now.

    Best Regards,
    Marcel
     
    Marcel Preda, Oct 28, 2009
    #1
  2. Marcel Preda

    Riad KACED Guest

    Hi Marcel,

    Rather strange, you do not have a loop around this, do you ?
    The above should very quick and I am surprised it took 15 mins for a
    small database as yours. In fact, 300 nets is nothing.
    You might post your whole function may be.

    For the other bit, there is a function called dbFindNetByName

    Cheers,
    Riad.
     
    Riad KACED, Oct 29, 2009
    #2
  3. Marcel Preda

    marcel Guest

    Hi Riad,

    thank you for reply.
    May be I did not tell exactly what I wanted to tell :)

    The total number of nets in my av_extracted view is 828 717 (including
    parasitic nets).
    And I have to call in a loop the code from my 1st exactly 322 times.
    There are 322 net names which satisfy some criterion and I have to do
    some check against them.

    E.g. I run it for:
    "GND", "VCC:, "OUT0", "OUT1", "BLOCK1|net111", ... etc (in total are
    322 nets)
    And I get the results:
    myProc("GND" cv) returns: "GND", "1:GND", "2:GND" .. there are 17536
    nets in this list.
    myProc("VCC" cv) returns a list of 11303 nets

    and so on...

    I already have an idea: to scan the cv->nets list only once and using
    some regexp function to build an associative array,
    each key will be the net base names (e.g. "GND:, "VCC", ...) and each
    value will be a list with "derived" nets:
    "GND" => "GND", "1:GND", "2:GND" ...
    "VCC" => "VCC", "1:VCC", "2:VCC" ...
    I'm sure it will be faster, but it will lead to a huge memory ussage.
    I still hope that there is some other solution.

    Best Regards,
    Marcel
     
    marcel, Oct 29, 2009
    #3
  4. marcel wrote, on 10/29/09 14:51:
    Hi Marcel,

    A few suggestions:

    1. Create the list once:
    nets=cv~>nets

    and then do the setof. This avoids re-building the list every time you do
    cv~>nets which should really help (the database is not really stored in a
    list, so each cv~>nets is constructing your 800K list cells each time)

    2. You could also try:
    netNames=nets~>name ; again, do this just once
    matchedNames=rexMatchList(pattern netNames)
    ; assuming you actually need the net objects...
    matchedNets=foreach(mapcar netName matchedNames dbFindNetByName(cv netName))

    This might be quicker, because the number of matches is relatively small, and
    transforming to build a list of net names is likely to be small.

    3. Try pre-allocating space with needNCells :
    needNCells('list 1000000)
    needNCells('dbobject 1000000)

    This is worthwhile if you find it spending a lot of time in gc() when you
    profile the code.

    Sorting the net names into a table that you suggest probably won't use that much
    memory actually (compared with the extracted view), but the work of traversing
    the list of net names once and then building the sublists could end up being no
    better than suggestion 1 or 2 above.

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 2, 2009
    #4
  5. Marcel Preda

    Marcel Preda Guest

    Hi Andrew,

    Thanks for the hints.
    Now the entire loop is 5-6 x faster .

    Best Regards,
    Marcel
     
    Marcel Preda, Nov 3, 2009
    #5
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.