PSL and ncsim

Discussion in 'Cadence' started by rick.richmond, Mar 24, 2006.

  1. Hi, I have recently started using PSL assertions in a Verilog design
    which we are simulating with ncsim. Assertion based verification seems
    to be the way to go, so we are keen to adopt this approach, but are
    having some tools issues:

    When an assertion fails it generates an error e.g.

    ncsim: *E,ASRTST
    (/home/user/Projects/hw/foo/vlog/ram_inst_sp48x64.v,44): (time 1473705
    NS) Assertion tb.s1b0.NeverWeAndRe has failed

    Running the simulation in noninteractive mode, the simulation exits
    when the number of errors reaches errormax (which we have set at 10
    using -errormax 10 in the hdl.var file). The problem is that if ncsim
    was dumping waveforms to a .shm simulation database, not all the
    buffered data gets flushed to the database before the simulation exits.
    This means when I go to look at my waveforms to try to debug the source
    of the assertion failure, I don't actually have waveforms which go the
    whole way to the point where the assertion(s) failed.

    It says in the ncsim documentation that running the simulation with

    ncsim -run -tcl snapshotname

    Will make the simulation exit to the Tcl prompt on error, which would
    mean that buffered waveform data would be written to the database.
    However this does not seem to be the case:

    With -errormax 10, 10 errors are reported then simulation exits
    completely.
    Without specifying errormax simulation reports every error generated by
    PSL assertions but continues to run.

    The ONLY way I have been able to make ncsim exit to the Tcl prompt on
    an error generated by a PSL assertion failure has been to start the
    simulation in interactive mode i.e.

    ncsim -tcl snapshotname

    then to actually type

    run

    at the ncsim> prompt. I have tried using ncsim -tcl snapshotname -input
    file.tcl where file.tcl is a tcl script which simply contains the
    command run, but this does not work and behaves as described above for
    ncsim -run -tcl snapshotname.

    Has anyone any idea of a work around. We like to run our sims in
    non-interactive mode, since we can automate things that way for
    regression, but when we are running a sim for debug and capturing
    waveforms we would like to start it in non-interactive mode, and exit
    to the Tcl prompt, or at least flush any buffered waveform data to the
    database.
     
    rick.richmond, Mar 24, 2006
    #1
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.