cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ricewind
Adventurer
Adventurer
9,606 Views
Registered: ‎11-10-2009

Search for a certain value in a simulated signal (ISIM)

Jump to solution

Hello,

 

I would like to know if there is a way to find the point in the simulation waveform in which a signal (eg. a bus) shows a certain value. I want to track a PicoBlaze program by checking its program counter and it is a little anoying when it has to be done by hand.

 

Thank you in advance

0 Kudos
1 Solution

Accepted Solutions
gszakacs
Instructor
Instructor
16,736 Views
Registered: ‎08-14-2007

In the past, when I needed to do this I would add a decoder to the test bench.  Then you can look at the individually decoded outputs to find the values of interest.  Of course if you suddenly want to look for different values, you'd need to modify the test bench and re-launch.  Another way is to add a comparator to the test bench, which compares the program counter (in your case) with a register at the test bench level.  Then you can force that register to the value you want to find and run.  Again this requires the value to be set before you create the waveform, so it also may involve re-starting the simulation, but it wouldn't require editing the test bench each time you want to search for a different value.

-- Gabor

View solution in original post

3 Replies
gszakacs
Instructor
Instructor
16,737 Views
Registered: ‎08-14-2007

In the past, when I needed to do this I would add a decoder to the test bench.  Then you can look at the individually decoded outputs to find the values of interest.  Of course if you suddenly want to look for different values, you'd need to modify the test bench and re-launch.  Another way is to add a comparator to the test bench, which compares the program counter (in your case) with a register at the test bench level.  Then you can force that register to the value you want to find and run.  Again this requires the value to be set before you create the waveform, so it also may involve re-starting the simulation, but it wouldn't require editing the test bench each time you want to search for a different value.

-- Gabor

View solution in original post

ricewind
Adventurer
Adventurer
9,581 Views
Registered: ‎11-10-2009

I guess that will be the way to do it... although it is also pretty cumbersome. Thank you very much! :)

0 Kudos
bassman59
Historian
Historian
9,543 Views
Registered: ‎02-25-2008

@ricewind wrote:

Hello,

 

I would like to know if there is a way to find the point in the simulation waveform in which a signal (eg. a bus) shows a certain value. I want to track a PicoBlaze program by checking its program counter and it is a little anoying when it has to be done by hand.


Put an assertion of severity "note" in the source code, looking for the condition of interest. If the signals of interest aren't exposed to the test bench, you can do this in the synthesizable HDL; the assertion will be ignored by the synthesizer. 

----------------------------Yes, I do this for a living.