qick.rfboard

Classes

AbsAdcDcChain()

AbsAdcRfChain()

AbsDacDcChain()

AbsDacRfChain()

AdcDcCard216(card_num, soc, gpio)

AdcDcChain111(ch, switches, gain_spi)

Class to describe the ADC-DC channel chain.

AdcDcChain216(soc, card, global_ch, ...)

AdcRfCard216(card_num, soc, gpio)

AdcRfChain111(ch, switches, attn_spi)

AdcRfChain216(soc, card, global_ch, ...)

AttenuatorPE43705(spi_ip[, ch, nch, le, ...])

This class provides SPI access to the PE43705 step attenuator.

AxisDdsMrSwitch(*args, **kwargs)

AxisSignalGenV3(*args, **kwargs)

AxisSignalGenV3Ctrl(*args, **kwargs)

AxisSignalGenV6Ctrl(*args, **kwargs)

AxisSwitchV1(*args, **kwargs)

BiasAD5781(spi_ip, ch_en[, cs_t])

Bias DAC chip AD5781.

BiasDAC11001(spi_ip, ch_en[, cs_t])

Bias DAC chip DAC11001.

BoardSelection(gpio_ip)

This class is used to enable one daughter card on the RF Board for the ZCU216, V1.

Chain216(soc, card, global_ch, card_num, card_ch)

DacChain111(ch, switches, attn_spi)

DacDcCard216(card_num, soc, gpio)

DacDcChain216(soc, card, global_ch, ...)

DacRfCard216(card_num, soc, gpio)

DacRfChain216(soc, card, global_ch, ...)

DaughterCard216(card_num, soc, gpio)

FilterADMV8818(spi_ip, ch[, cs_t])

ADMV8818 filter chip.

FilterChain(soc, card, global_ch, card_num, ...)

GainLMH6401(spi_ip, ch_en[, cs_t])

Variable gain amp LMH6401.

GpioMCP23S08(spi_ip, ch_en, dev_addr[, ...])

GPIO chip MCP23S08.

LoSynthADF4372(spi_ip[, nch, le, en_l, cs_t])

LO Synthesis chip ADF4372

LoSynthLMX2594(spi_ip, ch)

RFQickSoc(*args, **kwargs)

Overrides the __init__ method of QickSoc in order to add the drivers for the preproduction (V1) version of the RF board.

RFQickSoc111V1(*args, **kwargs)

RFQickSoc111V2(*args, **kwargs)

RFQickSoc216V1(*args, **kwargs)

RFQickSocV2

alias of RFQickSoc111V2

SwitchControl(spi_ip)

spi(*args, **kwargs)

Exceptions

ADCInterruptError

exception qick.rfboard.ADCInterruptError[source]

Bases: Exception

class qick.rfboard.AxisSignalGenV3(*args: Any, **kwargs: Any)[source]

Bases: SocIP

class qick.rfboard.AxisSignalGenV3Ctrl(*args: Any, **kwargs: Any)[source]

Bases: SocIP

class qick.rfboard.AxisSignalGenV6Ctrl(*args: Any, **kwargs: Any)[source]

Bases: SocIP

class qick.rfboard.AxisDdsMrSwitch(*args: Any, **kwargs: Any)[source]

Bases: SocIP

class qick.rfboard.AxisSwitchV1(*args: Any, **kwargs: Any)[source]

Bases: SocIP

class qick.rfboard.spi(*args: Any, **kwargs: Any)[source]

Bases: SocIP

en_level(nch=4, chlist=[0], en_l='high')[source]

chlist: list of bits to enable en_l: enable level “high”: ignore nch, enabled bits are set high “low”: nch is total length, enabled bits are set low

send_m(data, ch_en, cs_t='pulse')[source]

The data must be formatted in bytes, regardless of the data width of the SPI IP. For data width 16 or 32, the bytes will be packed in little-endian order.

receive()[source]

The returned data will be formatted in bytes, regardless of the data width of the SPI IP. For data width 16 or 32, the bytes will be unpacked in little-endian order.

send_receive_m(data, ch_en, cs_t='pulse')[source]

data: list of bytes to send ch_en: destination address

class qick.rfboard.BiasAD5781(spi_ip, ch_en, cs_t='')[source]

Bases: object

Bias DAC chip AD5781.

set_volt(volt)[source]

Set the voltage, return the actual (rounded) value that was set.

get_volt()[source]

Read and return the voltage setpoint.

class qick.rfboard.BiasDAC11001(spi_ip, ch_en, cs_t='')[source]

Bases: object

Bias DAC chip DAC11001.

get_volt()[source]

Read and return the voltage setpoint.

class qick.rfboard.AttenuatorPE43705(spi_ip, ch=0, nch=3, le=[0], en_l='high', cs_t='pulse')[source]

Bases: object

This class provides SPI access to the PE43705 step attenuator. Range is 0-31.75 dB. Parts are used in serial mode. This device’s SPI interface is write-only, no readback. See schematics for Address/LE correspondance.

class qick.rfboard.FilterADMV8818(spi_ip, ch, cs_t='')[source]

Bases: object

ADMV8818 filter chip.

class qick.rfboard.SwitchControl(spi_ip)[source]

Bases: object

class qick.rfboard.GpioMCP23S08(spi_ip, ch_en, dev_addr, iodir=0, cs_t='')[source]

Bases: object

GPIO chip MCP23S08.

class qick.rfboard.LoSynthADF4372(spi_ip, nch=2, le=[0], en_l='low', cs_t='')[source]

Bases: object

LO Synthesis chip ADF4372

class qick.rfboard.LoSynthLMX2594(spi_ip, ch)[source]

Bases: object

class qick.rfboard.GainLMH6401(spi_ip, ch_en, cs_t='')[source]

Bases: object

Variable gain amp LMH6401.

class qick.rfboard.AbsDacRfChain[source]

Bases: ABC

class qick.rfboard.AbsAdcRfChain[source]

Bases: ABC

class qick.rfboard.AbsDacDcChain[source]

Bases: ABC

class qick.rfboard.AbsAdcDcChain[source]

Bases: ABC

class qick.rfboard.AdcRfChain111(ch, switches, attn_spi)[source]

Bases: AbsAdcRfChain

class qick.rfboard.AdcDcChain111(ch, switches, gain_spi)[source]

Bases: AbsAdcDcChain

Class to describe the ADC-DC channel chain.

class qick.rfboard.DacChain111(ch, switches, attn_spi)[source]

Bases: AbsDacRfChain, AbsDacDcChain

class qick.rfboard.Chain216(soc, card, global_ch, card_num, card_ch)[source]

Bases: ABC

class qick.rfboard.FilterChain(soc, card, global_ch, card_num, card_ch)[source]

Bases: Chain216

class qick.rfboard.DacRfChain216(soc, card, global_ch, card_num, card_ch)[source]

Bases: AbsDacRfChain, FilterChain

disable()[source]

Because this daughter card doesn’t have a per-channel power switch, we don’t power it down.

class qick.rfboard.AdcRfChain216(soc, card, global_ch, card_num, card_ch)[source]

Bases: AbsAdcRfChain, FilterChain

class qick.rfboard.DacDcChain216(soc, card, global_ch, card_num, card_ch)[source]

Bases: AbsDacDcChain, Chain216

class qick.rfboard.AdcDcChain216(soc, card, global_ch, card_num, card_ch)[source]

Bases: AbsAdcDcChain, Chain216

class qick.rfboard.DaughterCard216(card_num, soc, gpio)[source]

Bases: ABC

class qick.rfboard.DacRfCard216(card_num, soc, gpio)[source]

Bases: DaughterCard216

CHAIN_CLASS

alias of DacRfChain216

class qick.rfboard.DacDcCard216(card_num, soc, gpio)[source]

Bases: DaughterCard216

CHAIN_CLASS

alias of DacDcChain216

class qick.rfboard.AdcRfCard216(card_num, soc, gpio)[source]

Bases: DaughterCard216

CHAIN_CLASS

alias of AdcRfChain216

class qick.rfboard.AdcDcCard216(card_num, soc, gpio)[source]

Bases: DaughterCard216

CHAIN_CLASS

alias of AdcDcChain216

class qick.rfboard.BoardSelection(gpio_ip)[source]

Bases: object

This class is used to enable one daughter card on the RF Board for the ZCU216, V1.

enable_context(board_id)[source]

Use with “with” to temporarily enable a card inside a code block.

class qick.rfboard.RFQickSoc(*args: Any, **kwargs: Any)[source]

Bases: QickSoc

Overrides the __init__ method of QickSoc in order to add the drivers for the preproduction (V1) version of the RF board. Otherwise supports all the QickSoc functionality.

rfb_set_gen_rf(gen_ch, att1, att2)[source]

Enable and configure an RF-board output channel for RF output.

Parameters:
  • gen_ch (int) – DAC channel (index in ‘gens’ list)

  • att1 (float) – Attenuation for first stage (0 through 31.75 dB in 0.25-dB increments)

  • att2 (float) – Attenuation for second stage (0 through 31.75 dB in 0.25-dB increments)

Returns:

  • float – actual (rounded) att1 value that was set

  • float – actual (rounded) att2 value that was set

rfb_set_gen_dc(gen_ch)[source]

Enable and configure an RF-board output channel for DC output.

Parameters:

gen_ch (int) – DAC channel (index in ‘gens’ list)

rfb_set_dac_rf(dac_port, att1, att2)[source]

Enable and configure a QICK box or RF board DAC port for RF output.

Parameters:
  • dac_port (int) – QICK box or RF board DAC port number (0-15 for ZCU216, 0-7 for ZCU111)

  • att1 (float) – Attenuation for first stage (0 through 31.75 dB in 0.25-dB increments)

  • att2 (float) – Attenuation for second stage (0 through 31.75 dB in 0.25-dB increments)

Returns:

  • float – actual (rounded) att1 value that was set

  • float – actual (rounded) att2 value that was set

rfb_set_dac_dc(dac_port)[source]

Enable and configure a QICK box or RF board DAC port for DC output.

Parameters:

dac_port (int) – QICK box or RF board DAC port number (0-15 for ZCU216, 0-7 for ZCU111)

rfb_set_ro_rf(ro_ch, att)[source]

Enable and configure an RF-board RF input channel. Will fail if this is not an RF input.

Parameters:
  • ro_ch (int) – ADC channel (index in ‘avg_bufs’ list)

  • att (float) – Attenuation (0 through 31.75 dB in 0.25-dB increments)

Returns:

actual (rounded) value that was set

Return type:

float

rfb_set_ro_dc(ro_ch, gain)[source]

Enable and configure an RF-board DC input channel. Will fail if this is not a DC input.

Parameters:
  • ro_ch (int) – ADC channel (index in ‘readouts’ list)

  • gain (float) – Gain (-6 through 26 dB in 1-dB increments)

Returns:

actual (rounded) value that was set

Return type:

float

rfb_set_adc_rf(adc_port, att)[source]

Enable and configure an RF-board RF input channel. Will fail if this is not an RF input.

Parameters:
  • adc_port (int) – QICK box or RF board ADC port number (0-7 for ZCU216, 0-3 for ZCU111)

  • att (float) – Attenuation (0 through 31.75 dB in 0.25-dB increments)

Returns:

actual (rounded) value that was set

Return type:

float

rfb_set_adc_dc(adc_port, gain)[source]

Enable and configure an RF-board DC input channel. Will fail if this is not a DC input.

Parameters:
  • adc_port (int) – QICK box or RF board ADC port number (0-7 for ZCU216, 4-7 for ZCU111)

  • gain (float) – Gain (-6 through 26 dB in 1-dB increments)

Returns:

actual (rounded) value that was set

Return type:

float

rfb_set_bias(bias_ch, v)[source]

Set a voltage on an RF-board bias output.

Parameters:
  • bias_ch (int) – Channel number (0-7)

  • v (float) – Voltage (-10 to 10 V)

Returns:

actual (rounded) value that was set

Return type:

float

rfb_get_bias(bias_ch)[source]

Read the voltage setpoint on an RF-board bias output.

Parameters:

bias_ch (int) – Channel number (0-7)

Returns:

setpoint, in volts

Return type:

float

class qick.rfboard.RFQickSoc111V1(*args: Any, **kwargs: Any)[source]

Bases: RFQickSoc

rfb_config(no_tproc)[source]

Configure the SPI interfaces to the RF board.

rfb_set_lo(f)[source]

Set both of the RF-board local oscillators to the same frequency.

Tile 0 DACs and all RF ADCs are connected to LO[0], tile 1 DACs are connected to LO[1].

Parameters:

f (float) – Frequency (4000-8000 MHz)

class qick.rfboard.RFQickSoc111V2(*args: Any, **kwargs: Any)[source]

Bases: RFQickSoc111V1

rfb_set_lo(f, ch=None, verbose=False)[source]

Set RF-board local oscillators.

LO[0]: all RF ADCs LO[1]: RF DACs 0-3 LO[2]: RF DACs 4-7

Parameters:
  • f (float) – Frequency (4000-8000 MHz)

  • ch (int) – LO to configure (None=all)

  • verbose (bool) – Print freq and lock info.

rfb_get_lo(gen_ch=None, ro_ch=None)[source]

Get local oscillator frequency for a DAC or ADC channel.

Parameters:
  • gen_ch (int) – DAC channel (index in ‘gens’ list)

  • ro_ch (int) – ADC channel (index in ‘readouts’ list)

qick.rfboard.RFQickSocV2

alias of RFQickSoc111V2

class qick.rfboard.RFQickSoc216V1(*args: Any, **kwargs: Any)[source]

Bases: RFQickSoc

rfb_config(no_tproc)[source]

Configure the GPIO/SPI interfaces to the RF board.

rfb_enable_bias()[source]

Enable all eight main-board bias outputs (by turning on DAC_BIAS_SWEN).

This is normally run during board initialization, so you should not need to run it yourself.

rfb_disable_bias()[source]

Disable all eight main-board bias outputs (by turning off DAC_BIAS_SWEN).

rfb_set_gen_filter(gen_ch, fc, bw=1, ftype='bandpass')[source]

Set the programmable analog filter of the QICK box DAC port connected to a specified generator.

Parameters:
  • gen_ch (int) – DAC channel (index in ‘gens’ list)

  • fc (float) – Center frequency for bandpass, cut-off frequency of lowpass and highpass.

  • bw (float) – Bandwidth.

  • ftype (str) – Filter type: bypass, lowpass, highpass or bandpass.

rfb_set_ro_filter(ro_ch, fc, bw=1, ftype='bandpass')[source]

Set the programmable analog filter of the QICK box ADC port connected to a specified readout channel.

Parameters:
  • ro_ch (int) – ADC channel (index in ‘avg_bufs’ list)

  • fc (float) – Center frequency for bandpass, cut-off frequency of lowpass and highpass.

  • bw (float) – Bandwidth.

  • ftype (str) – Filter type: bypass, lowpass, highpass or bandpass.

rfb_set_dac_filter(dac_port, fc, bw=1, ftype='bandpass')[source]

Set the programmable analog filter of the specified QICK box ADC port.

Parameters:
  • dac_port (int) – QICK box DAC port number (0-15)

  • fc (float) – Center frequency for bandpass, cut-off frequency of lowpass and highpass.

  • bw (float) – Bandwidth.

  • ftype (str) – Filter type: bypass, lowpass, highpass or bandpass.

rfb_set_adc_filter(adc_port, fc, bw=1, ftype='bandpass')[source]

Set the programmable analog filter of the specified QICK box DAC port.

Parameters:
  • adc_port (int) – QICK box ADC port number (0-7)

  • fc (float) – Center frequency for bandpass, cut-off frequency of lowpass and highpass.

  • bw (float) – Bandwidth.

  • ftype (str) – Filter type: bypass, lowpass, highpass or bandpass.

rfb_set_rfadc_attenuator(adc_port, att)[source]

Set the programmable attenuator of the RFSoC RF-ADC connected to the specified QICK box ADC port.

Parameters:
  • adc_port (int) – QICK box ADC port number (0-7)

  • att (float) – Attenuation value (0 through 27 dB in 1-dB increments)

clear_interrupts(max_attempts=5, error_on_interrupt=False, error_on_persist=True)[source]

Check all ADCs for interrupts, and attempt to clear them.

https://docs.amd.com/r/en-US/pg269-rf-data-converter/XRFdc_IntrEnable https://docs.amd.com/r/en-US/pg269-rf-data-converter/Interrupt-Handling https://github.com/Xilinx/embeddedsw/blob/master/XilinxProcessorIPLib/drivers/rfdc/src/xrfdc_hw.h

Parameters:
  • max_attempts (int) – number of times to attempt to clear interrupts before giving up

  • error_on_interrupt (bool) – if True, raise an error if any ADC has an interrupt raised

  • error_on_persist (bool) – if True, raise an error if any ADC has an interrupt that persists after max_attempts clears

Returns:

True if all interrupts were successfully cleared

Return type:

bool

prepare_round()[source]

This runs before a program starts running. This is called by acquire/acquire_decimated/run_rounds; user code should not call it.

By default this does nothing, but a subclass of QickSoc may override this.

cleanup_round()[source]

This runs after a program has finished running. This is called by acquire/acquire_decimated/run_rounds; user code should not call it.

By default this does nothing, but a subclass of QickSoc may override this.