• 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 SKILL
  3. Custom calculator function gets objects as arguments instead...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 144
  • Views 10791
  • 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

Custom calculator function gets objects as arguments instead of values when called from Assembler

alexstepanov75
alexstepanov75 over 4 years ago

Hi

I have a simple custom calculator function that creates two points wave. The code is below.

This function is called like this

makeLineWave(t1 t2)

Where t1 and t2 measurements were calculated before.

t1=1

t2=VAR("tt")

Where tt is a test variable

The function working fine when called from the calculator.

But when the function called from Assembler results view, it fails because x2 is not a floating point number but a wave objects like srrWave:0x64b93a80

What is the proper way to handle this?

procedure( makeLineWave( x1 x2)
  let((xVec yVec wave )
    wave=drCreateEmptyWaveform()
    xVec=drCreateVec('double 2)
    yVec=drCreateVec('double 2)

    printf("%L %L\n" x1 x2)

    drAddElem(xVec x1)
    drAddElem(xVec x2)
    drAddElem(yVec 1.0)
    drAddElem(yVec 1.0)

    drPutWaveformXVec( wave xVec)
    drPutWaveformYVec( wave yVec)
  wave
);let
);procedure

  • Cancel
Parents
  • Frank Wiedmann
    Frank Wiedmann over 4 years ago

    You might want to try the approach described at https://support.cadence.com/apex/ArticleAttachmentPortal?id=a1O0V000007MkO7UAK 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • alexstepanov75
    alexstepanov75 over 4 years ago in reply to Frank Wiedmann

    Yes, I am familiar with this. But in this case, the arguments should be floating-point values, not a wave. So I am not sure how to apply this.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to alexstepanov75

    It's a bit tricky, actually, because you're creating a waveform from a number, and the normal mapping approaches kind of fall apart of you do that (there's a couple of additional mapping layers that could be used, but these don't work properly in this case - I tried).

    I'll need to think about it a bit, since my initial experiments didn't work.

    Alex, could you create a case for this and put me on cc? You have my email address. Then I'll pick it up and work on it... easier for me to balance the time if there's a case for it.

    Thanks,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to alexstepanov75

    It's a bit tricky, actually, because you're creating a waveform from a number, and the normal mapping approaches kind of fall apart of you do that (there's a couple of additional mapping layers that could be used, but these don't work properly in this case - I tried).

    I'll need to think about it a bit, since my initial experiments didn't work.

    Alex, could you create a case for this and put me on cc? You have my email address. Then I'll pick it up and work on it... easier for me to balance the time if there's a case for it.

    Thanks,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • alexstepanov75
    alexstepanov75 over 4 years ago in reply to Andrew Beckett

    Andrew,

    I hope your mail I have is right. Anyway, I created a case and the number is 46545233. Thank you.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to alexstepanov75

    You do, as I received notification. I've taken ownership fo the case (probably I'll dig into it tomorrow, as have a bit of a full plate for the rest of the afternoon).

    Regards,

    Andrew

    • 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