cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
9,478 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
Highlighted
Professor
Professor
16,608 Views
Registered: ‎08-14-2007

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

Jump to solution

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
Highlighted
Professor
Professor
16,609 Views
Registered: ‎08-14-2007

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

Jump to solution

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

Highlighted
Adventurer
Adventurer
9,453 Views
Registered: ‎11-10-2009

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

Jump to solution

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

0 Kudos
Highlighted
Historian
Historian
9,415 Views
Registered: ‎02-25-2008

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

Jump to solution

@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.