GeneratorDriver#
- class FIREQ_LL_API.GeneratorDriver(*args: Any, **kwargs: Any)[source]#
Bases:
_FIREQDriverDriver class for the generator IP.
Provides low-level methods to control the generator IP.
- bindto = ['user.org:user:axisGeneratorIP:1.0']#
- fabric_clock_port = 'HS_axi_clock'#
- init_axi_full_interface(base_address: int, axi_depth: int) None[source]#
Initialize the AXI Full interface segments and clear memory.
- Parameters:
base_address (int) – Base address of the AXI Full interface
axi_depth (int) – Depth of the AXI interface in bytes
- init_axi_lite_interface(base_address: int, axi_depth: int) None[source]#
Initialize the AXI Lite interface and delete the PYNQ-created MMIO object.
- Parameters:
base_address (int) – Base address of the AXI Lite interface
axi_depth (int) – Depth of the AXI interface in bytes
- write_envelope_memory(start_address: int, envelope: numpy.ndarray, common: bool = False) int[source]#
Write samples to the envelope memory starting at the given address.
- Parameters:
start_address (int) – Start address in the envelope memory (word aligned)
envelope (np.ndarray) – Array of complex samples to write
common (bool) – If True, it write the envelope in all parallelization sub-channels (envelope for interpolation)
- Returns:
Error code
- Return type:
int
- trigger_manually() int[source]#
Trigger the generator manually.
- Returns:
Error code
- Return type:
int
- set_trigger_channel(channel: int, ttype: str) int[source]#
Set the channel where the generator listens for triggers.
Set the channel to 0 if you want to disable external triggers.
- Parameters:
channel (int) – Channel number, 1 to trigger_channels
ttype (str) – trigger type: ‘drive’ or ‘readout’
- Returns:
Error code
- Return type:
int
- set_drive_order_source(source: str) int[source]#
Set the source for the generator: lfsr or fifo.
- Parameters:
source (str) – Source for wave, ‘fifo’ or ‘lfsr’
- Returns:
Error code
- Return type:
int
- set_lfsr_seed(seed: int) int[source]#
Set the seed for lfsr.
- Parameters:
seed (int) – Seed for LFSR
- Returns:
Error code
- Return type:
int
- set_readout_modulation_frequency(frequency: float) int[source]#
Set modulation carrier of readout wave.
- Parameters:
frequency (float) – Frequency of the modulation signal, normalized to the DAC sampling frequency
- Returns:
Error code (0 on success)
- Return type:
int
- set_readout_modulation_initial_phase(phase: float) int[source]#
Set readout modulation initial phase.
- Parameters:
phase – Phase offset of the modulation signal, normalized to pi
- Returns:
Error code (0 on success)
- Return type:
int
- set_drive_modulation_frequency(frequency: float) int[source]#
Set the modulation frequency for the drive pulses.
- Parameters:
frequency (float) – Frequency of the modulation signal, normalized to the DAC sampling frequency
- Returns:
Error code (0 on success)
- Return type:
int
- set_manual_wave_destination(destination: str) int[source]#
Set the destination of a manually generated wave.
When manually triggered, the readout wdw is generated but can be sent to either the drive or readout output channel. This function sets the destination.
- Parameters:
destination (str) – ‘readout’ or ‘drive’
- Returns:
Error code
- Return type:
int
- add_wave_in_wave_memory(wdw: int, wdw_index: int) int[source]#
Add a wave definition word to the wave memory.
No checks are performed on the wave definition word. The index is the address aligned to a 128 bit boundary.
- Parameters:
wdw (int) – Wave definition word, low level definition of a wave
wdw_index (int) – Wave address/index, aligned to 128 bits
- Returns:
Error code
- Return type:
Literal[-3, 0]
- add_wave_to_drive_wave_sequence(order_index: int, wdw_index: int) int[source]#
Write to memory mapped FIFO the address of a wdw at a certain point in the generation order.
No checks are performed ensurring that the wdw actually exists at that index.
- Parameters:
order_index (int) – 0 refers to the first wdw generated.
wdw_index (int) – Index of the wdw in the wave memory.
- write_readout_wave(wave_definition: int) int | None[source]#
Write the readout wave definition to the IP.
This is the wave definition that will be used for manual and readout waves. HINT: for manual waves, you can set the output channel (readout or drive channel) with the “trigger_manuallyDestination” function.
- Parameters:
wave_definition (int) – 128-bit wave defintion
- Returns:
Error code
- Return type:
Literal[-3] | None
- build_envelope_specific_wdw(forceone: bool, for_interpolation: bool, is_symmetric: bool, i_even: bool, q_even: bool) int[source]#
Build the envelope specific part of the wdw.
- Parameters:
is_symmetric (bool) – If True, the envelope is symmetric
i_even (bool) – If True, the I sample symmetry is even
q_even (bool) – If True, the Q sample symmetry is even
switch_iq (bool) – If True, the I and Q channels are switched
forceone (bool) – If True, the envelope is forced to be one
for_interpolation (bool) – If True, the envelope is supposed to be used with the envelope interpolation feature
- Returns:
Envelope specific part of the wdw
- Return type:
int
- build_vz_wdw(normalized_phase: float) int[source]#
Build the wave definition word for vz gates.
- Parameters:
normalized_phase (float) – Phase of the vz gate normalized to 2pi
- Returns:
Wave definition word
- Return type:
int
- build_pulse_wdw(envelope_wdw: int, start_address: int, duration: int, natural_duration: int, normalized_gain: float, switch_iq: bool, keep_last: bool, dac_target_mask: int) int[source]#
Build the wave definition word for pulses.
- Parameters:
envelope_wdw (int) – Envelope specific part of the wdw
start_address (int) – Start address of the envelope in the envelope memory
duration (int) – Duration of the pulse in samples
natural_duration (int) – Natural duration of the pulse in samples
normalized_gain (float) – Normalized gain of the pulse
switch_iq (bool) – If True, the I and Q channels are switched
keep_last (bool) – If True, the last sample is kept
dac_target_mask (int) – Integer mask that drives the axis crossbar ip
- Returns:
Wave definition word
- Return type:
int