• 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. Functional Verification
  3. How do I control probe start/stop in ncsim from embedded...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 65
  • Views 7605
  • 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 do I control probe start/stop in ncsim from embedded CPU?

Ncsim User 1
Ncsim User 1 over 6 years ago

I am running an RTL simulation with an embeddd CPU and some encryption logic. 

The CPU runs some codes to check the result of encryption logic and can run hours or days. 

My idea is to let the CPU control when to dump waveforms, likely when some conditions are met in the logic. Then stop when the conditon elapses. 

How should I do that? 

  • Cancel
  • StephenH
    StephenH over 6 years ago

    The simplest way would be to use Tcl breakpoints to execute the probe commands when certain signal values are observed. For example, at the start of simulation, create the probe for the signals you want to debug, and give the probe a name, then immediately disable it (unless you want to probe at time 0):

    probe -create -shm -name myprobe <list_of_signals>
    probe -disable myprobe

    Then, create breakpoints to turn the probe on and off:

    stop -create -execute {probe -enable myprobe} -continue -condition {[value top.sig_to_start_probing] = 1'b1}
    stop -create -execute {probe -disable myprobe} -continue -condition {[value top.sig_to_start_probing] = 1'b0}

    There are many other types of breakpoints so you'll need to use your imagination to decide which is the most appropriate for your scenario.

    I would also suggest thinking about whether it's better to check the encryption result using some zero-time method in the testbench instead of having a simulated CPU to crunch the data, your tests would finish much quicker and be much easier to debug!

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Ncsim User 1
    Ncsim User 1 over 6 years ago in reply to StephenH

    Thank you. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MayurAna
    MayurAna over 6 years ago in reply to StephenH

    Hello Stephen,

    I have provided the following sequence of commands in my tcl

    probe -create INST_CHANNEL -depth all -shm -database waves -name dumps
    probe -disable dumps
    stop -create -execute {probe -enable dumps} -continue -condition {[value tb_top.START_DUMP] = 1'b1}
    stop -create -execute {probe -disable dumps} -continue -condition {[value tb_top.START_DUMP] = 1'b0}

    When the above tcl script is not provided ( and without any dump or with a full dump ) the simulation completes in a few ms.

    When the above tcl script is provided the sim halts at "Created stop 2" and does not proceed.

    The default state of START_DUMP is 0 and toggles 1 to 0 and again 1 to 0 inbetween the sims.

    I would want the Scope INST_CHANNEL to be dumped only when START_DUMP is 1

    Would the above seq of commands really work .. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • MayurAna
    MayurAna over 6 years ago in reply to MayurAna

    Thanks Stephen,

    I got it working .. I missed the "run"

    • 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