cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
380 Views
Registered: ‎01-12-2018

ILA - Debug state machine and multiple windows

Hello everybody,

We have an FPGA design used to stream data from two fifo. One fifo send data from FPGA to Host PC and the other in the reverse direction. Everything is working quite fine, but we encounter some issues and want to debug our system. The idea is to detect a new packet and count them until we reach a threshold. Then, we want to capture all the packets that are received after that event. In order to do so, we have implemented an ILA with the ADVANCED_ONLY mode and create the following state machine:

state packet_wait:
if(rx_packet == 1'bR) then
increment_counter $counter0;
goto packet_wait;
elseif($counter0 == 16'h02bc) then
goto packet_trig;
else
goto packet_wait;
endif

state packet_trig:
trigger;

We have also configured the capture mode to ALWAYS, with 128 windows of 32 samples and use the 8th sample for the trigger position. When we start the ILA, we wait until the 0x2bc event and trig the first window. BUT, the other windows are not filled with data.

How can we change the state machine to ensure that all packets will be captured ?

Best regards,

Christophe,

0 Kudos
3 Replies
Highlighted
Moderator
Moderator
354 Views
Registered: ‎02-09-2017

Hi @c.fauvel,

 

The application of the windows feature in the ILA is for having one trigger per window. So in your case, you'd have to have a trigger condition defined for each of all of the 128 windows.

You've mentioned that you want to capture all the packets that are received after the trigger event (when $counter0 reaches 0x2bc, I suppose).

Have you tried just leaving one window and then setting the trigger condition? Does that now show all the packages you need?

Thanks,

Andre Guerrero

Product Applications Engineer

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Visitor
Visitor
325 Views
Registered: ‎01-12-2018

Hello anunesgu,

Sorry for the late reply, I was working on something else the previous days.

I have tried what you suggested, the counter wait until the condition is met and it fills the capture window with samples.

The data packets are almost as long as the window capture so I'm not able to see a bunch of packets with your settings. The whole idea is to detect a packet, count until a threshold and skip all irrelevant samples between packets. I will try to use more counter and state in the debug state machine.

Anyway, thank you for your quick reply,

Best regards,  

0 Kudos
Highlighted
Visitor
Visitor
307 Views
Registered: ‎01-12-2018

Hello,

I have changed the value of the threshold to 0x0010 and I was able, with the same state machine as described earlier, to retrieve 128 packets, one every 16th packets. So, it seems that the two states of the trigger machine are executed in parallel. I don't know how to "disable" one state after the threshold has been reached.

Best regards,

0 Kudos