• 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. Custom IC Design
  3. Nested equations in ADEL

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 126
  • Views 14179
  • 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

Nested equations in ADEL

CorradoN
CorradoN over 7 years ago

Hi, 

I want to compute the time elapsed between the falling edge of two signals. I've used cross() to get the time at which each event occurs, and it works. The problem is that when I try to compute the difference between the two, I get the error: *Error* ("difference" 0 t nil ("*Error* difference: can't handle ((.....) -(......)).

Searching in past threads, I found that the issue is related to the nested parenthesis. The problem is that I've tried both using variables, putting cross() function in an output of ADEL, let's  say t1 and t2, and making the difference t1-t2, or writing a single equation: cross(sig1)-cross(sig2), but it looks like the parenthesis are added automatically and I still get the same error. 

Any suggestion? 

I'm using version 6.1.7

Thank you in advance!

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago
    Quite hard to tell you what you’ve done wrong if you don’t post the actual expression! So I can’t really answer that - other than to say that the only issue with nested parentheses is if you have multiple matching parentheses (although I wouldn’t expect the error you’re seeing if that was the case).

    By multiple matching parentheses I mean:

    ((a-b)) ; is bad (two sets around a-b)
    ((a-b)*(c-d)) ; is OK
    ((a-b)*((c-d))) ; is bad (two sets around c-d)

    However, what you’re trying to achieve might be more easily solved by using the delay function in the calculator.

    Regards,

    Andrew.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • drdanmc
    drdanmc over 7 years ago

    I find that defining intermediate results like you are can be pretty helpful in ADE just to manage how big the expression is.  The other thing which helps is to get the whole expression working in the calculator and then 'get expression' in the output setup.  Are you sure your cross() is returning two valid numbers and not nil or a list?  If you try to subtract a list from a list you'll get something like what you are suggesting:

    x=list( 1 2 3 4 5)
      (1 2 3 4 5)
    y=list(6 7 8 9 10)
      (6 7 8 9 10)
    x-y
      *Error* difference: can't handle ((1 2 3 4 5) - (6 7 8 9 10))


    There are options to cross() that let you pick out which crossing

    • 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