Home > Community > Forums > Custom IC SKILL > How to flatten cell in non-graph mode

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

 How to flatten cell in non-graph mode 

Last post Tue, Sep 1 2009 12:58 AM by sparksu. 5 replies.
Started by sparksu 30 Aug 2009 11:15 PM. Topic has 5 replies and 4642 views
Page 1 of 1 (6 items)
Sort Posts:
  • Sun, Aug 30 2009 11:15 PM

    • sparksu
    • Top 500 Contributor
    • Joined on Wed, May 13 2009
    • Beijing, China
    • Posts 17
    • Points 295
    How to flatten cell in non-graph mode Reply

     I want to flatten a hierarchial layout cell.

    leHiFlatten() can do this in graph mode.

    But compared to leHiFlatten(), it is extremely slow to do this by using dbFlatInst() in non-graph mode.

    Is there an alternative way to flatten a database in non-graph mode?

    Thanks.

    Filed under: ,
    • Post Points: 20
  • Mon, Aug 31 2009 1:35 AM

    Re: How to flatten cell in non-graph mode Reply
    I'd be surprised if dbFlattenInst is any slower than leFlattenInst (which is used within leHiFlattenInst) since I believe the code is the same.

    Are you sure you're giving it the same arguments?

    This should be a pretty efficient way of doing a flatten. I don't know of a more efficient way.

    Regards,

    Andrew
    • Post Points: 20
  • Mon, Aug 31 2009 2:25 AM

    • sparksu
    • Top 500 Contributor
    • Joined on Wed, May 13 2009
    • Beijing, China
    • Posts 17
    • Points 295
    Re: How to flatten cell in non-graph mode Reply

    Thanks. I got it.

    Here is my code.

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    cv=deGetCellView()

    objs=cv->instances

    foreach(obj objs

           when(obj->objType=="inst" dbFlattenInst(obj 32 t))

    );end foreach

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    Since  dbFlattenInst() and leHiFlattenInst() are of the same code, It must be "foreach"  who made my code slow.

    "objs" is too large to be traversed.

    • Post Points: 20
  • Mon, Aug 31 2009 2:32 AM

    Re: How to flatten cell in non-graph mode Reply
    Really? If there are that many instances that the foreach is slow, then probably you're going to end up witha huge flat cellview, and that's more likely to be the problem.

    What does length(objs) show?

    Regards,

    Andrew
    • Post Points: 35
  • Mon, Aug 31 2009 4:31 AM

    • sparksu
    • Top 500 Contributor
    • Joined on Wed, May 13 2009
    • Beijing, China
    • Posts 17
    • Points 295
    Re: How to flatten cell in non-graph mode Reply

    Sorry. I can not get my original code now. I'd like to post my entire code here later.

    • Post Points: 5
  • Tue, Sep 1 2009 12:58 AM

    • sparksu
    • Top 500 Contributor
    • Joined on Wed, May 13 2009
    • Beijing, China
    • Posts 17
    • Points 295
    Re: How to flatten cell in non-graph mode Reply

    You are right, Andrew.

    Traversing objs did not make my code slow.

     length(objs)=>480

     

    I compared the following codes:

    ;Code A

    ;---------------------------------------------------------------------------

    foreach(obj objs

    when(obj->objType=="inst" dbFlattenInst(obj 32 t) )

    ;end foreach

    ;---------------------------------------------------------------------------

    ;Code B

    ;---------------------------------------------------------------------------

    foreach(obj objs

    when(obj->objType=="inst" dbFlattenInst(obj 32 t nil t) ) ;preserveRODobjs

    );end foreach

    ;---------------------------------------------------------------------------

     

    Code A cost 120 seconds.

    Code B is too slow to be finished. I waited about 0.5 hours and then killed it manually.

    I think it is the argument "preserveRODobjs" who made my code slow.

    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by sparksu at 30 Aug 2009 11:15 PM. Topic has 5 replies.