• 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. Calculator -> Using 'value' in equation

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 17815
  • 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

Calculator -> Using 'value' in equation

syafiq
syafiq over 9 years ago

Hello,

I am having a problem to extract values from time domain simulation. I am using IC6.1.6

I have a time domain simulation from 0s to 32us (x-axis) and 0V to 3.3V (y-axis).

I want to extract value (voltages) start at 0.5us and periodically every 1us.

I put this equation-> value(v("out" ?result "tran") 0.5u  ?period 1u ?xName "time"  ), but when I try to evaluate the equation, it says expression failed.

But extracting only at 0.5u -> value(v("out" ?result "tran") 0.5u   ) ,it was successful. Unfortunately, I cant attached the psf file. it is too big even after compression.

Thanks

Syafiq

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    This works for me. I used IC616 ISR14 (6.1.6.500.14).

    I can't see anything obviously wrong here. Try customer support?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • syafiq
    syafiq over 9 years ago

    Hello Andrew,

    Thanks for your prompt reply.

    I just noticed that CIW reported the error as shown below:

    expression evaluation failed: val is not legal.
    expression evaluation failed: value(v("out" ?result "mc1_tran-tran") 0.5u ?period 1u ?xName "time" )
    "(\"error\" 0 t nil (\"*Error* drfGetWaveformXVec (DRL-18): argument not a valid srr waveform interface object nil\"))"

    Attached is the psf for the output signal. Could you try?

    Thanks

    Syafiq

    out.tar.gz

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Syafiq,

    Given that  you appear to have exported a single trace to psf, the result name is no longer called "mc1_tran-tran" and the signal is no longer called "out". I was able to do this with the data you sent:

    openResults("output.psf")
    plot(value(v("out (mcparamset=1\\.00e+00)" ?result "tran") 0.5u ?period 1u ?xName "time" ))

    and it worked perfectly.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • syafiq
    syafiq over 9 years ago

    Hello Andrew,

    It is weird, it does not work for me.

    And now, I am trying another option of extracting the values by using OCEAN command.

    I run 100 montecarlo points. So the script below will go into every psf directory, read the voltage value at 0.5u and convert it into binary 0 or 1.

    It should generate 100 voltage values. However, only once all 100 values get extracted. When I rerun the script, the value which gets extracted is less than 100 (range from 93 to 96)

    I really don't have any idea about this. The VIVA GUI is open when I was running below script. And I can see through VIVA GUI, the moment I running the script, every montecarlo directory (from 1 to 100) is loaded and read. But in the output file, not all 100 values get extracted.

    Do you see anything wrong with my script? Thanks

    val=0
    for(val 1 100
    openResults( sprintf( nil "/tmp/msm1g14/Arbiter_16/hind.ecs.soton.ac.uk_msm1g14_153529920/MonteCarlo.0/%d/Arbiter_PUF-Arbiter_16-1/" val))
    out = outfile("./response_nominal.dat" "a")                                       ;name the output file and open it for write access
    results()                                                                                                    ; open up the results
    selectResults(`tran)                                                                               ; Select the transient results
    outputs()                                                                                                   ; View the outputs
    if((value(v("/out"),0.5u)>1.65) fprintf(out "1\n") fprintf(out "0\n"))
    )
    close(out)

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    I'd never do it that way - I'd use the family data instead so you could get all 100 values at the same time. However, if something isn't working, maybe you have a broken version? Perhaps you could take this up with your support channel (I guess Europractice, since you appear to be from Southampton University). If they can't solve it, they'll contact us.

    Your code appears to have the close() outside of the for loop - so you keep opening new file handles for each entry in the loop, and then close only one of them outside. I suggest moving the outfile() call to before the for loop. Maybe that's why it fails on subsequent attempts?

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • syafiq
    syafiq over 9 years ago

    Hello,

    yes, you are right. I would normally and prefer to use family data. that way you can get all 100 values at the same time. 

    I will file a report of non-working value expression to europractice.

    anyway, thanks for your suggestion. it is worked perfectly. And now I got all 100 values start at 0.5us and every 1us.

    Here is the working code for the benefit of others who may come across the same issue.

    val=0
    time_scale=1u
    time_start=0.5

    out = outfile("./response_nominal.dat" "a") ; name the output file and open it for write access

    for(val 1 100
    openResults( sprintf( nil "/tmp/msm1g14/Arbiter_16/hind.ecs.soton.ac.uk_msm1g14_153529920/MonteCarlo.0/%d/Arbiter_PUF-Arbiter_16-1/psf" val))
    results()                                           ; open up the results
    selectResults(`tran)                      ; Select the transient results
    outputs()                                          ; View the outputs

    for(time_inc 1 32
    time=(time_inc-time_start)*time_scale
    if((value(v("/out"),time)>1.65) fprintf(out "1") fprintf(out "0"))
    )
    fprintf(out "\n")
    )
    close(out)

    Thanks Andrew for your time and effort. I really appreciate that.

    Thanks

    Syafiq

    • 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