get all wires connected to a pin

Discussion in 'Cadence' started by fogh, Oct 25, 2004.

  1. fogh

    fogh Guest

    Hi All,

    One of you has probably ready-made so code for this:
    Assuming that cds.lib reaches every schematic that can possibly instance the symbol dbsymcv, dbsymcv has a pin figure F (only one)
    - get wires points P1 that overlap F , across all schematics instancing dbsymcv.
    - check that centerBox(F->bBox) is also connecting (overlapping pin any purpose).

    After that, I am going to snap the pin to a new grid, move PO1 to the center of the pin, and modify the whole wire accordingly.
    Feel free to give me hints about
    - coordinate transformations (how do you do the inverse tranformation ? Is there a quick way to get them in toplevel view ? ... )
    - stretching/reshaping wires.

    Regards,
     
    fogh, Oct 25, 2004
    #1
  2. fogh

    fogh Guest

    Hi All,


    Would anyone have a reverse tranform ReversedbTransformPoint() such that
    point==ReverseDbTransformPoint(dbTransformPoint(point transform) transform)
    ?

    Or maybe you already wrote a SKILL snipped to move pins of a symbol and wires of
    schematics that instance this symbol at the same time ? That's what I am after.

    Todays' update: it is easy get the wires. Now I wonder how to manipulate them so
    that they will stay manhattan and not connect to another net.

    It also occured to me that snapping inside a symbol, and then snapping the
    origin of the instance, you can end up with a pin more than half a grid away. In
    order to avoid this runaway, the sequence seems to be
    1 snap wire to center of pin
    2 snap pin
    3 snap again wire to center of pin
    4 snap instance origins to grid
    5 snap wires to grid
    Can you think of something simpler ?




    cvinst=car(geGetSelectedSet())
    cvinst->master->terminals~>pins~>fig~>lpp
    schcv=geGetEditCellView()
    caar(cvinst->master->terminals~>pins~>fig)->pin->name
    pinfig=caar(cvinst->master->terminals~>pins~>fig)
    TbBox=dbTransformBBox(pinfig->bBox cons(cvinst->xy list(cvinst->orient)))
    dbGetOverlaps(schcv TbBox )~>lpp
    dbGetOverlaps(schcv TbBox "wire")~>??
     
    fogh, Oct 26, 2004
    #2
  3. fogh

    Erik Wanta Guest

    See post entitled:
    move figures AND wires in schematic with SKILL

    Please open a SR to get schStretch() implemented.
     
    Erik Wanta, Oct 29, 2004
    #3
  4. fogh

    fogh Guest

    So you are saying that I can stretch my wires only if I actually open all the
    schematics in windows and use an schHiStretch ?
    And that will not yet garanty that I create no shorts.
     
    fogh, Oct 29, 2004
    #4
  5. fogh

    Erik Wanta Guest

    There was supposed to be a new function called schStretch() that would
    move the instance and the wire connected to it. I wanted to use it in
    the case where I go from a larger symbol to a smaller symbol. So, one
    end of the resistor was still connected and I wanted to stretch the
    resistor to connect to the net that the larger symbol used to be
    connected to.
     
    Erik Wanta, Oct 30, 2004
    #5
  6. schStretch() has been implemented, and is due to come in IC5251.
    I filed an enhancement PCR for this a while ago - 601942

    Filing another SR won't help, since it is already implemented in the
    next release.

    Also, there appears to be a public function icDbInvertTransform to
    invert a transform, to answer your original question.

    Andrew.
     
    Andrew Beckett, Nov 1, 2004
    #6
  7. fogh

    fogh Guest

    Thanks for the inverse transform. Would there be any possible clash
    with a dbInvertTransform(Point|Box) alias ?
     
    fogh, Nov 2, 2004
    #7
  8. You should NOT create functions or aliases using Cadence prefixes.
    That is just asking for migration trouble if in the future we add a
    new function, dbInvertTransform.

    That's why we recommend all customer code uses a prefix which begins
    with an uppercase letter, as we don't use uppercase prefixes.

    So don't create an alias dbInvertTransform. Plus the fact it's going
    to confuse anyone else reading the code when they can't find the
    documentation for something that looks like a Cadence public function.

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 5, 2004
    #8
  9. fogh

    fogh Guest

    Andrew,

    It was not my intention. I was just wondering why the author of
    icDbInvertTransform at cadence did not use a db prefix to start with.

    Talking about overwrites... I have a setup where we use mount point an
    symlinks to hide the platform and filer issues from the end user. I find it
    quite annoying that what was entered as a clean&short path, or selected in a
    browser, ends up as a /sys or /export prefixed 200 bytes long pathname that
    contains also tools.platform and such.
    So I am thinking of overwriting simplifyFilename(). How bad would that be ?
     
    fogh, Nov 5, 2004
    #9
  10. Because it was written as part of the Preview code, not by one of the
    core database team. So it's all a matter of ownership. Probably when
    it was written, they should have requested that db create such a
    function, but the pragmatic thing was done, and that group wrote their
    own.
    Well, you can't do it (it's a C level function, and you can't redefine
    those), so this is a moot point.

    In general simplifyFilename has evolved over many years, and generally
    has had to cope with various automounters, and different file systems.
    Getting something that always works has not always been easy.

    Note, there is an optional second argument to simplifyFilename which
    tells it not to resolve links - perhaps that is what you need? Mind
    you, that doesn't help you if the usage is in some part of the code
    that isn't yours.

    (Note, I said that you can't redefine this, but you can temporarily
    overload it in a SKILL++ lexical scope, but that wouldn't help
    either).

    Regards,

    Andrew.
     
    Andrew Beckett, Nov 8, 2004
    #10
  11. fogh

    fogh Guest

    OK. Just a matter of the software development organisation.
    Yes. I would like ascii files containing file paths, files generated by code
    that is not mine, to be more platform/machine independent.

    for the love of rethorics, let s pretend for a second that I could overwrite it.
    And that I would plan to overwrite it with a function that returns the same
    string for arguments that correspond to the same actual file. So that for
    instance the famous cdsinit test:
    strcmp(simplifyFilename("~") simplifyFilename(pwd()))
    would not break.
    What do you think would be the risks ?
     
    fogh, Nov 10, 2004
    #11
  12. So are you saying that this doesn't work right now? I'm surprised... it should
    do. Since simplifyFilename expands tildes and symbolic links, it ought to work
    (assuming you're testing to see if you're in your home directory).

    Can you give an example of this not working?

    Andrew.
     
    Andrew Beckett, Nov 12, 2004
    #12
  13. fogh

    fogh Guest

    No no, it works with the original, and it still works with the
    overwritten.
     
    fogh, Nov 14, 2004
    #13
  14. In that case, I don't know why you're asking... (it's academic, since you
    can't do it anyway).

    Andrew.
     
    Andrew Beckett, Nov 14, 2004
    #14
  15. fogh

    fogh Guest

    Andrew,
    Outside this newsgroup, it is not that academic, and it is not that
    impossible either.
    I got a solution, and I don t know wether to deploy it since I don t
    know the risk because I don t know exactly what this function is used for.
    I know that the value returned by the modified func is unique for a
    given "actual" file. But if for there is some code that relies on every
    element in the path to be a directory (and not a symlink) there would
    still be trouble.

    Can t you tell me more about how this function is used in the CDS and
    vendor code you know about ?
     
    fogh, Nov 17, 2004
    #15
  16. OK, so how are you redefining it then? Normal attempts to redefined built-in
    C-level functions get this kind of error:

    *Error* putd: given function is internal and can not be redefined -
    simplifyFilename

    That's why I said it was academic.

    The function is used all over the place - both in Cadence code, customer code,
    and in various third party integrations. I couldn't hope to guess how such a
    widely used function was being used. It's quite possible that some usages
    depend on the result not being a symbolic link, nor any element in the path
    being a link - I couldn't guess that.

    If you don't want to explain to the group how you're redefining this, email me
    directly.

    Andrew.
     
    Andrew Beckett, Nov 29, 2004
    #16
  17. fogh

    fogh Guest

    Andrew,

    Yes I am redefining it, in my own little test environment.
     
    fogh, Dec 2, 2004
    #17
  18. OK, but how are you redefining it? As I said before, as far
    as I know, you can't redefine functions written in C (you can
    overload them within a SKILL++ lexical scope, but that's not the same
    thing). So I'm intrigued to know how you've redefined it.

    Andrew.
     
    Andrew Beckett, Dec 5, 2004
    #18
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.