• 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. RAVEL DRC Programming for IC Packaging and…
  3. How Can I Get the Max. Length of all wires on a design ...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 23
  • Views 19395
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How Can I Get the Max. Length of all wires on a design ?

Kenjung Chang
Kenjung Chang over 7 years ago

How Can I Get the Max. Length of all wires on a design ? 
the (max) function only judges two numbers, but I have to get the max. value of a relation.

(transform (w) wire (w (length w)))

  • Cancel
  • BinduSripad
    BinduSripad over 7 years ago

    Hi Kenjung,

    If you have access to Ravel Standard Library, please use the following code:

    (include "standard/basic")

    (define longest_wire

            (transform (w)

                   (CHOOSE_MAX wire length)

            (w (length w))))

    if you do not have the standard library files, please use the following macro:

    (macro CHOOSE_MAX (Object Measure)
        "CHOOSE_MAX [object] function/measurement => [object]

     Find the object for which the measurement is smallest. If the objects
     themselves are the values to be compared, IDENTITY can be given as
     the measurement function."
          (CHOOSE Object greaterp Measure))

    Thanks,

    Bindu

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Kenjung Chang
    Kenjung Chang over 7 years ago in reply to BinduSripad

    Hi, Bindu :

    Thanks for your reply, but I can't find any standard library path including "standard/basic" .
    Can you tell me the absolute path (in APD 16.6) of the standard library path 
    ?
    And, is there any manual about these functions such as <CHOOSE_MAX> or <CHOOSE> .

    Further more, I can't understand too, the following instruction.
    Is this means I can define a macro named "CHOOSE_MAX" myself?
    But I don't see any code or method here.
    -------------------------------------------------------------------------------------------------------------------

    if you do not have the standard library files, please use the following macro:

    (macro CHOOSE_MAX (Object Measure)
        "CHOOSE_MAX [object] function/measurement => [object]

    ------------------------------------------------------------------------------------------------------------------


    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • BinduSripad
    BinduSripad over 7 years ago in reply to Kenjung Chang

    Hi Kenjung,

    Sorry, CHOOSE_MAX macro calls some other macros that I did not share.

    Please use the following code to find the longest wire in the design:

    (macro CHOOSE_MAX_LENGTH (Object Measure)
           (difference Object
                (transform (o1 o2)
                    (select (o1 o2) (combine Object Object)
                        ((length o1) > (length o2)))
                (o2))))

    (define longest_wire
       (transform (w)
            (CHOOSE_MAX_LENGTH wire length)
       (w (length w))))

    The macro finds the shorter of two wires and subtracts it from the relation containing all the wires. When done in iteration, this leaves us the wire with maximum length.

    The same macro can be altered to pick the wire with shortest length. You only have to change this line in the macro to find the shorter of two wires:

     ((length o1) < (length o2))

    Thanks,

    Bindu

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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