• 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. skill script return wrong value for floating-point data...

Stats

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

skill script return wrong value for floating-point data, failed at if condition statement

monglebest
monglebest over 6 years ago

version IC 6.1.7-64b.500.23

I had a skill script created some time ago and it works, but starting with this version above, i find the ade-xl windows doesn't show the value any more.

After some debugging, I find the root cause is floating-point value. %g doesn't show the floating point value anymore, but something like an address is returend. When I try to compare the address with 0 in the if statement, the if statement will give me an error.

Below is the test script defined. The line of printf will shows the returned value if proper x waveforms are given, I expect to have a floating point number returned as the average of the waveform, however, an address of 

"avg_x=srrWave:0x3bb0a780" was returned to the CIW windows. Un-comment the three lines I mentioned will results in an error for the if statement.

"

expression evaluation failed: val is not legal.
expression evaluation failed: MYrms(IT("/R10/PLUS") )
("greaterp" 0 t nil ("*Error* greaterp: can't handle (srrWave:0x3bb0a7a0 > 0)"))

"

skill script is defined below

procedure(MYrms(x)
poport=stdout
printf("enter procedure\n")
printf("avg_x=%g \n",average(x))
;;un-comment the below three lines to re-run and have the error
; if((average(x) > 0) then
; printf("%g \n",average(x))
; )
rms(x - average(x))
)

  • Cancel
  • monglebest
    monglebest over 6 years ago

    Case Number: Case 46360242

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to monglebest

    Since you've created this as a case, I won't duplicate effort and answer it here, other than to say that it would appear that the input waveform is a family rather than a single waveform, and your function has not been designed to cope with that.

    I'll leave it to my colleagues in customer support to follow up with you.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monglebest
    monglebest over 6 years ago in reply to Andrew Beckett

    Thanks for your reply, Andrew.

    The part that I don't understand is that this script works OK previously, but suddently, it shows like that. Does that mean skill interpreter has changed? Or the way how I code it previously was wrong?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to monglebest

    The SKILL "interpreter" (it's compiled, so isn't really an interpreter) hasn't changed. It's always been wise to make sure calculator functions can handle family data - and I don't believe anything changed in ADE (you didn't say how you're calling it) in the specific version  you mention.

    Anyway, as I said, I'm not going to duplicate the efforts of my colleagues in customer support (I don't have the bandwidth to do that anyway, and it's not fair on whoever else is working on it if we double up our work).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 6 years ago in reply to monglebest

    We ran into a very similar problem two years ago, which was examined in Case 46064308. Your Cadence AE might want to take a look at it in order to give you some background information about this problem. The solution is to rewrite your SKILL code as explained in Solution 20467133. We have also filed CCR 1703070 requesting all SKILL functions to work for waveform families automatically in ADE-XL, but this has been in Inactive state ever since and will not get implemented because ADE-XL is in sunset mode. I don't know if the same situation exists in Assembler and if there are any plans to change it.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • monglebest
    monglebest over 6 years ago in reply to Frank Wiedmann

    Thanks, but my input is not a family waveform, just one waveform with X axis as time and Y axis as current. I try to switch to assembler but assembler doesn't handle viva correctly when I try to replace/append waveforms into viva.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Frank Wiedmann
    Frank Wiedmann over 6 years ago in reply to monglebest

    Well, if you are doing sweeps of any kind in ADE-XL (including corners and Monte Carlo), you will be working with waveform families. That is what Solution 20467133 is all about.

    • 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