Feedback Trigger Handling#

Every Qblox Cluster shares a trigger network through the backplane that is described here. The trigger network uses 4 lines on the backplane to transmit the triggers. These lines map to 15 trigger addresses. Once a trigger is sent from any source, all sequencers will receive it simultaneously 212 ns later. Only one trigger may be sent over the backplane at once. After 252 ns, the network is ready for another trigger.

All Q1 sequencer can be configured to send a trigger to the backplane due to different events. These events are different for the different types of sequencers and are described in the specific sequencer pages (control, readout and timetag).

Additionally, every Q1 sequencer can receive triggers from the backplane in order to run instructions conditioned on the state of the triggers. A sequencer can either wait for a trigger on a particular address, or execute real-time instructions conditionally based on a condition. Both of these methods are described below.

wait_trigger#

The wait_trigger <trigger_address> instruction stops the RT core until a trigger arrives to the sequencer at the specified address.

Warning

This means that the time required to execute a wait_trigger instruction is not deterministic.

set_cond#

Every sequencer has a trigger handling module which counts the number of triggers arriving at each trigger address and computes the boolean result of a condition that is configurable using the set_cond instruction.

The set_cond instruction is a Q1 core instruction that changes how real-time instructions are executed. The set_cond instruction takes 4 arguments: enable, mask, operator and else_time. A boolean condition is calculated before the RT core executes every real-time instruction. If the condition is true, the instruction is executed. If the condition is false, the RT core simply waits for else_time ns before moving on to the next real-time instruction in the queue.

Here is a description of the arguments to the set_cond instruction:

  • The enable argument can be either 1 or 0 and either enables or disables conditional execution.

  • The mask argument sets the 15 bit mask as described below.

  • The operator argument sets the operator to one of 6 as described below.

  • The else_time argument sets how long the RT core will wait after skipping execution of the real-time instruction if the condition is false.

The block diagram below followed by an explanation of how the boolean condition is determined.

../../../_images/trigger_network_conditional.svg
  1. Address Counters The trigger handling module consists of 15 counters that count the number of triggers that arrive at each of the 15 trigger addresses. These counters can be activated and deactivated using the latch_en instruction. The counters can be reset to zero using the latch_rst instruction.

  2. Thresholds A threshold value can be set for each of the trigger address counters using Sequencer.trigger1_count_threshold() parameter. Each counter is individually compared (>=) with its associated threshold. The Sequencer.trigger1_threshold_invert() parameter can be used to invert this comparison to (<). The results of these static comparisons create a thresholds vector of boolean values with a true/false indication for each trigger address.

  3. Mask and operator A 15 bit mask (specified as either a decimal number: 72 or a hexadecimal number: 0x48) can be set using the second argument of the set_cond instruction. The 15 bit boolean thresholds vector and the 15 bit mask are combined using one of 6 different operations described in the table below to give one boolean value.

Argument

Select

Operator

Comment

0

AND mask

OR

Return true if any of the selected counters crossed their thresholds

1

AND mask

NOR

Return true if none of the selected counters crossed their threshold

2

OR NOT(mask)

AND

Return true if all of the selected counters crossed their threshold

3

OR NOT(mask)

NAND

Return true if any of the selected counters did not cross their threshold

4

AND mask

XOR

Return true if an odd number of selected counters crossed their threshold

5

AND mask

XNOR

Return true if an even number of selected counters crossed their threshold