Calculator - check valid expression

Discussion in 'Cadence' started by svendbjarne, Jul 21, 2008.

  1. svendbjarne

    svendbjarne Guest

    Hi,

    Is there any way to check whether the expressions copied from the
    calculator are valid or not before running an simulation?

    I have tried simply using eval() inside errset(), but that would also
    fail on simple expressions like db20(VT("/net1")).

    The reason for doing this is that I would like to be sure that
    expressions are valid before running simulations that takes
    hours(since I've created scripts that groups simulations from
    different corners and I want this script to create and plot the
    waveforms for me automatically)

    Best regards,
    Svend
     
    svendbjarne, Jul 21, 2008
    #1
  2. If you separate the simulations from the results post-processing, you can
    run the simulations first, then quick re-run the post-processing multiple
    times as you debug it, without having to re-run any simulations.

    That's what I'd do.

    Not sure why you would use eval() with errset. It would be sufficient
    to do:

    errset(db20(VT("/net1")))

    however, this just stops it from failing if there was an error - I still think
    that separating the sims from the results post-processing is a good idea
    if you're uncertain the results post-processing is robust.

    Regards,

    Andrew.
     
    Andrew Beckett, Jul 24, 2008
    #2
  3. svendbjarne

    svendbjarne Guest

    Hi,
    thanks for the reply.

    When fetching the outputs with
    asiGetOutputList(asiGetCurrentSession()), then
    type([email protected]>expression) evaluates to a list of symbols.
    Using eval() on that list gives me the waveform object or the scalar
    value of the expression, but fails when using nested expressions with
    multiple value() commands since some of them evaluates to nil before
    the simulation.

    The post-processing is part of a corner simulation program which after
    all corners are done simulating on a LSF cluster, groups the scalar
    results from each corner and plots them together with all the grouped
    waveforms. It also stores all outputs nets/expressions and analysis in
    a table written to a file with writeTable() so the user can go back
    and view all plots again at a later time from different simulations.
    The processing is robust enough

    My hope was that there was some way to validate the expressions before
    running the simulation, so that the user won't have to manually edit
    this table file if he has some syntax errors in his expressions. For
    now I think I'll just evaluate the expression after the simulation and
    then force the user to re-enter or discard it if it fails before
    plotting the results and storing the table for later use :)

    Regards,
    Svend
     
    svendbjarne, Jul 28, 2008
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.