• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X Scripting - Skill
  3. DBID of overlapping components

Stats

  • Replies 9
  • Subscribers 18
  • Views 13451
  • Members are here 0
More Content

DBID of overlapping components

VECTORT
VECTORT over 7 years ago

Hi,
can you please help me with one more issue.
I need to get dbids of overlapping components in design.

Thank you in advance for any advice.

  • Cancel
  • Sign in to reply
Parents
  • Ejlersen
    Ejlersen over 7 years ago

    Hi

    It depends on what you mean by overlapping components, is it 2 place bounds overlapping, pins overlapping or what define if they are overlapping?

    You could setup drc checks for this and run through the DRCs.

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • VECTORT
    VECTORT over 7 years ago in reply to Ejlersen

    Our library components have shapes on "PCKAGE GEOMETRY/DFA_BOUND_(TOP,BOTTOM)"
    so I think I would need to find those components which shapes on this layer are overlapping (can touch but cannot go one on the another).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 7 years ago in reply to VECTORT

    Hi

    DFA constraints in Allegro are built for this exact purpose and you can even specify spacing between dfa bounds on different component classes.

    You can enable and set this up within Setup->Constraints->DFA Constraint Spreadsheet

    After you've set this up online DRC checking will be performed and you will get a DRC error immediately.

    I once did a movie about this which can be seen on YouTube at https://youtu.be/tyiPnsQqx7Q (it is in Danish but you should get the idea from watching it)

    Will this work for you or do you have another reason for wanting to do this using SKILL?

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • VECTORT
    VECTORT over 7 years ago in reply to Ejlersen

    I know this tool but not sure how to use it to achieve my goal.

    The reason I need to find this DBID from inside SKILL is for automatic documentation creation for Production Facility.

    What I need to do is:
    1) find DBID of overlapping components
    2) create layer with surrounding lines arround this 2 or more overlaping components

    Second part I have almost done and it is working well, but I am giving DBIDs manualy, so just need to find somehow this DBIDs

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Ejlersen
    Ejlersen over 7 years ago in reply to VECTORT

    Hi

    notice that dbid's are not static!

    you could walk over all dfa bounds and do math to find out if they overlap

    l = axlDBGetDesign()->symbols
    foreach(lid l
    refdes = lid->refdes ; get the reference designator
    foreach(cid lid->children
    when(lowerCase(cid->layer) == "package geometry/place_bound_top"
    ; here you have a single geometry and needs to check it against other geometries

    )
    )
    )

    I would however use DFA as stated above and then run over all DRCs to find the objects (components) causing the issue and then create the rectangle

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • B Bruekers
    B Bruekers over 7 years ago in reply to VECTORT

    If you would do it without the Allegro DRC system then you need to check each component to all other components.

    Quickest way to do this is first check bBox overlap, if so then check if the polygon is overlapping, meaning an result with 'AND' operation.

    So something like this:

    ;lsym = setof(id axlDBGetDesign()->symbols id->isMirrored)                ;bottom side
    lsym = setof(id axlDBGetDesign()->symbols not(id->isMirrored))  ;top side
    pcre = pcreCompile("package geometry/dfa_bound" 1)
    while(lsym
        id1 = car(lsym)
        lsym = cdr(lsym)
        foreach(id2 lsym
            ;first do a rough compare, compare bbox overlap of ID1 and ID2. This is faster than doing polygon compare
            when( _axlIsBoxOverlap(id1->bBox id2->bBox)
                ;if overlap then do polygon compare
                lchildrenID1 = setof(id id1->children pcreMatchp(pcre    id->layer))
                lchildrenID2 = setof(id id2->children pcreMatchp(pcre    id->layer))
                when(and(lchildrenID1 lchildrenID2)
                    lpolyID1= mapcar('car mapcar('axlPolyFromDB lchildrenID1))
                    lpolyID2= mapcar('car mapcar('axlPolyFromDB lchildrenID2))
                    lANDpoly = axlPolyOperation(lpolyID1 lpolyID2 'AND)
                    when(car(lANDpoly)
                            axlMsgPut("%L @%P - %L @%P have overlapping geometry" id1->refdes id1->xy id2->refdes id2->xy )
                    )
                )
            )
        )
    )

    Bram

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • VECTORT
    VECTORT over 7 years ago in reply to B Bruekers

    That works perfect, exactly what I was looking for.
    Nevertheless I have one issue with duplicates.
    I am inserting result into the list and I get:
    (("C24006"  "R24020") ("C16036" "MP32004") ( "R24020" "C24006") ("MP32004" "C16036"))

    So there are duplicates but with different order. 
    Can you please help with deleting those duplicates to get list like 
    (("C24006"  "R24020") ("C16036" "MP32004"))

    Thank you in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • VECTORT
    VECTORT over 7 years ago in reply to B Bruekers

    That works perfect, exactly what I was looking for.
    Nevertheless I have one issue with duplicates.
    I am inserting result into the list and I get:
    (("C24006"  "R24020") ("C16036" "MP32004") ( "R24020" "C24006") ("MP32004" "C16036"))

    So there are duplicates but with different order. 
    Can you please help with deleting those duplicates to get list like 
    (("C24006"  "R24020") ("C16036" "MP32004"))

    Thank you in advance.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • B Bruekers
    B Bruekers over 7 years ago in reply to VECTORT

    That is weird. It goes through each symbol and puts it in 'ID1' , but for each ID1 it looks at all other symbols (ID2), excluding the previously checked ID1's.

    So double hits should not occur. If you have double symbol dbID's in the lsym then it is possible.

    Could you try to add the following 'unique' line ?

    pcre = pcreCompile("package geometry/dfa_bound" 1)

    lsym = unique(lsym)
    while(lsym

    Otherwise post the code which you have currently.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • VECTORT
    VECTORT over 7 years ago in reply to B Bruekers

    Yes you are right. I have made mistake in my code. Now it works.
    Thank you !

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information