Get the db object tied to a cdf

Discussion in 'Cadence' started by camelot, Mar 28, 2007.

  1. camelot

    camelot Guest

    Hello,
    in your opinion it is possible to obtain from a CDF callback function
    the name of the instance (if an instances exists) that launch that
    callbak? That is, if I modify a CDF parameter, that parameter will
    unleash a callback. That callback is a function. Inside the code of
    that particular function, could I get the name of the db object (or
    simply the instance name) tied to the cdf containing the parameter?

    Thank you,

    Camelot
     
    camelot, Mar 28, 2007
    #1
  2. No, there is not a clean/safe way of doing this.

    It's a bad thing to do - for a start, what would happen on the Create Instance
    form? At the time the callback is called, no instance exists yet, so there would
    be no instance id available. Note, you can find the instance Id in the doneProc,
    since at that stage the instance has been created...

    Let me ask things a different way - why do you want to know the instance Id?
    We've been discussing this internally recently, and depending on your reason to
    know the instance Id, there may be a better way of achieving what you want?

    Regards,

    Andrew.
     
    Andrew Beckett, Apr 11, 2007
    #2
  3. camelot

    camelot Guest

    The problem is the following. I'm developing a library of devices that
    together built a more complex device. Each instance (a single piece of
    the whole) contains two parameters: "tot_area" information referred to
    the total device area and "area" refered only to the contribute of the
    current cell. If I have already placed other pieces (instances of that
    kind), in my CDF I should be able to update the total area present in
    the layout. If I have an instance with area 100 and open its property
    I see the cell area and the total area already placed, we suppose it
    could be 1000. If I modify the area value 100 to 150 the total area
    should become 1050 in real time. In order to do that, I take the list
    of instances present in the current cellview and through their cdf I
    get each "area" property. The problem is that from that list I should
    be able to remove the cell I'm editing because it contains the old
    area information I had before the property editing (100) and then I
    have to sum the current (150) edited value. The question is, how do I
    know what is the db to exclude I'm editing? Note that if the operation
    is executed on a new instance creation that clearly does not have any
    db in the cellview, the problem do not happen because it does not
    appear in the list.
    I hope have been clear.

    Camelot
     
    camelot, Apr 13, 2007
    #3
  4. Camelot,

    A CDF callback is not the right way to do this. You should have some SKILL which
    you call to maintain the total.

    Assuming you did somehow get this working, what would happen if one of the
    placed instances was deleted? The total would not get updated.

    I think it's far safer to avoid overloading an inappropriate callback mechanism
    with this, and update the CDF parameters for total_area with some code which
    looks at the placed instances, and then call this whenever you need to update
    the total.

    Andrew.
     
    Andrew Beckett, Apr 17, 2007
    #4
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.