Quartus® Prime Pro Edition User Guide: Debug Tools

ID 683819
Date 7/08/2024
Public
Document Table of Contents

2.12.2. Trigger Example 2: Trigger When triggercond1 Occurs Ten Times between triggercond2 and triggercond3

You can use a custom trigger flow to count a sequence of events before triggering the acquisition buffer, as the following example shows. This example uses three basic triggering conditions configured in the Signal Tap Setup tab.

This example triggers the acquisition buffer when condition1 occurs after condition3 and occurs ten times prior to condition3. If condition3 occurs prior to ten repetitions of condition1, the state machine transitions to a permanent wait state.

state ST1:
if ( condition2  )
begin
   reset c1;
   goto ST2;
end
State ST2 :
if ( condition1 )
	increment c1;
else if (condition3 && c1 < 10)
	goto ST3;
else if ( condition3 && c1 >= 10)
	trigger;
ST3:
goto ST3;