Home > Community > Forums > Custom IC SKILL > problem with dbFindProp()....?

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: *

 problem with dbFindProp()....? 

Last post Wed, Jun 16 2010 2:32 AM by Prabhu The ICL. 3 replies.
Started by Prabhu The ICL 09 Apr 2010 05:28 PM. Topic has 3 replies and 1608 views
Page 1 of 1 (4 items)
Sort Posts:
  • Fri, Apr 9 2010 5:28 PM

    • Prabhu The ICL
    • Top 500 Contributor
    • Joined on Tue, Feb 23 2010
    • Hyderabad, Andhra Pradesh
    • Posts 23
    • Points 440
    problem with dbFindProp()....? Reply

    Hi, All! I am using Cadence IC514 version.
    I found a code which increases the parameters by a given factor in schematic.(i.e width and length etc...)
    My problem is as follows...
    I have two instances pch_25_mac with
                  1)    "w"="5u" and "l"="500n" and                 2)    "w"="5u" and "l"="280n"(this is the default value for this parameter)
    dbFindProp(inst prop) is returning it's id on first instance but it is not when the parameter value is default value.
    How to resolve this problem...
    Here is the code that I have got....

    procedure(CCS_ModifyWL(lib cell factor "ttn")
    let((cv new propId)
     cv = dbOpenCellViewByType( lib cell "schematic" "" "a")
     when( cv
       foreach(inst cv~>instances
         ;foreach(prop list("w" "l")
         cdf1=cdfGetInstCDF(inst)
         foreach(prop list("w" "wf" "l" "wr" "lr" "sumW" "sumL")
         if(member(prop cdf1~>parameters~>name) then
           ;when(propId=dbFindProp(inst prop)
       propId = cdf1~>prop
             new = sprintf(nil "%g" cdfParseFloatString(propId~>

    value)*factor)
             printf("Changing instance %s property %s from %s to %s.\n"
               inst~>name propId~>name propId~>value new)
             dbReplaceProp(inst propId~>name "string" new)
           );when the prop exists
         );foreach prop
       );foreach inst
       ;dbCheck(cv)
       ;dbSave(cv)
       ;dbClose(cv)
     ); when the cellview was opened ok
    );let
    );procedure


    Thanks in Advance

    Prabhakar. K --- The Layout Engineer
    SoCtronics

     

    --- Prabhakar. K CAD & Layout Engineer SoCtronics Tech. Ltd. Hyderabad - INDIA prabhu.usic@gmail.com
    Filed under:
    • Post Points: 20
  • Sun, Apr 11 2010 1:51 AM

    Re: problem with dbFindProp()....? Reply

    This is correct behaviour. dbFindProp only deals with db property objects. When CDF is being used, the default values are not (normally) stored on the instance, and so there is no property object to find.

    One way to handle this is to use cdfGetInstCDF (as you have) and then replace the line:

       propId = cdf1~>prop

    with

       propId = get(cdf1 prop)

    I didn't test the code, but I think it should all work with that change

    Regards,

    Andrew.

    • Post Points: 20
  • Wed, Jun 16 2010 2:32 AM

    • Prabhu The ICL
    • Top 500 Contributor
    • Joined on Tue, Feb 23 2010
    • Hyderabad, Andhra Pradesh
    • Posts 23
    • Points 440
    Re: problem with dbFindProp()....? Reply
        I am very very Sorry, for the mistake made to the previous message ... This is the actual code which I have got...

        procedure(CCS_ModifyWL(lib cell factor "ttn")
        let((cv new propId)
         cv = dbOpenCellViewByType( lib cell "schematic" "" "a")
         when( cv
           foreach(inst cv~>instances
            foreach(prop list("w" "wf" "l" "wr" "lr" "sumW" "sumL")
            when(propId=dbFindProp(inst prop)
               new = sprintf(nil "%g" cdfParseFloatString(propId~>value)*factor)

                 printf("Changing instance %s property %s from %s to %s.\n"  inst~>name propId~>name propId~>value new)
                 dbReplaceProp(inst propId~>name "string" new)
               );when the prop exists
             );foreach prop
           );foreach inst
           ;dbCheck(cv)
           ;dbSave(cv)
           ;dbClose(cv)
         ); when the cellview was opened ok
        );let
        );procedure


        Thanks in Advance

        Prabhakar. K --- The Layout Engineer
        SoCtronics
    --- Prabhakar. K CAD & Layout Engineer SoCtronics Tech. Ltd. Hyderabad - INDIA prabhu.usic@gmail.com
    • Post Points: 5
  • Wed, Jun 16 2010 2:32 AM

    • Prabhu The ICL
    • Top 500 Contributor
    • Joined on Tue, Feb 23 2010
    • Hyderabad, Andhra Pradesh
    • Posts 23
    • Points 440
    Re: problem with dbFindProp()....? Reply
    Hi, Andrew,
                       With your suggestion I have modified the code as follows....
    /**************************************************************************
    procedure(SoC_ModifyWL(libName cellName factor "ttn")
        let( (cv cdfId new)
        cv = dbOpenCellViewByType( libName cellName "schematic" "" "a")
        when(cv
        foreach(inst cv~>instances
            cdfId = cdfGetInstCDF(inst)
            foreach(paramId cdfId~>parameters
                    if(member(paramId~>name list("w" "wf" "l" "wr" "lr" "sumW" "sumL")) then
                        new = sprintf(nil "%g" cdfParseFloatString(paramId~>value)*factor)
                        printf("Changing instance %s property %s from %s to %s.\n" inst~>name paramId~>name paramId~>value new)
                        paramId~>value = new
                    );if
            );foreach
        );foreach
        );when
            dbCheck(cv)
            dbSave(cv)
            dbClose(cv)
        );let
    );SoC_ModifyWL
    cell_list = nil
    procedure(SoC_Traverse(@optional (cv geGetEditCellView()))
        printf("changing properties of -- %s -- cell\n" cv~>cellName)

        SoC_ModifyWL(cv~>libName cv~>cellName 1.1)
       
        foreach(inst cv~>instances
            if(!member(inst~>cellName cell_list) then
                cell_list = cons(inst~>cellName cell_list)
            if(inst~>libName == cv~>libName && ddGetObj(inst~>libName inst~>cellName "schematic") then
                println(inst~>name)
                master = dbOpenCellViewByType(inst~>libName inst~>cellName "schematic" nil "a")
                SoC_Traverse(master)
            );if
            );if
        );foreach
    );SoC_Traverse
    *********************************************************************/
    As I observed it's working fine ... Is this the good way...?
    --- Prabhakar. K CAD & Layout Engineer SoCtronics Tech. Ltd. Hyderabad - INDIA prabhu.usic@gmail.com
    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by Prabhu The ICL at 09 Apr 2010 05:28 PM. Topic has 3 replies.