• 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. How to use Tcl command to get expression value from a AMS...

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 125
  • Views 17586
  • 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 to use Tcl command to get expression value from a AMS simulation?

greatqs
greatqs over 13 years ago

I'm using IRUN for AMS simulation and I'd like to use Tcl commands (i.e. which is used as -input arguments of irun executive) to get expression value a certain waveform (i.e. get ymax value for signal: tb.neta)

 

Could anyone tell me how to do it? Thanks!

 

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago

    You can't do it directly. You could use an OCEAN script at the end to get the maximum, or you could write a Verilog-AMS module which followed a waveform and output the maximum, say.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • greatqs
    greatqs over 13 years ago

    Thanks Andrew, is it possible to use simvision Tcl command interface? 

     

    Andrew Beckett said:

    You can't do it directly. You could use an OCEAN script at the end to get the maximum, or you could write a Verilog-AMS module which followed a waveform and output the maximum, say.

    Andrew.

     

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

    Good point. You could use:

    set expression {range_max(top.dacOut, 0 ns, 40000 ns)}
    condition set -using myymax -expr $expression
    window new WaveWindow
    waveform add -signals {myymax}

    The range_max function in the simvision calculator can be used to find the ymax.

    Andrew.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • greatqs
    greatqs over 13 years ago

     

    Andrew Beckett said:

    Good point. You could use:

    set expression {range_max(top.dacOut, 0 ns, 40000 ns)}
    condition set -using myymax -expr $expression
    window new WaveWindow
    waveform add -signals {myymax}

    The range_max function in the simvision calculator can be used to find the ymax.

    Andrew.

     

     

     

    Thanks Andrew for the help. It looks like the second command doesn't work. Simvision pops "Error: bad condition name "myymax""

    Besides, do you now how to get the number for post-processing intead of plotting to a simvision waveform? 

     

    Regards,

    QS

     

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

    Sorry, that should have been:

    condition new -name myymax -expr $expression

    Rather than condition set. I copied the wrong line from somewhere. You might want to preceed it with:

    catch {condition delete myymax}

    in case the condition is already created.

    Andrew.

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

    Not really sure (not that familiar with simvision scripting). 

    You can send to a register window, using:

    set regid [window new RegisterWindow]
    register add -using $regid myymax

    But that's probably not what you want either. You may need to contact customer support to get an answer from somebody more knowledgeable than me in simvision - I was just reading the manual :-) . Or it may not be possible...

    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