Chronos-Q RFSOC Driver
Chronos-Q RFSOC Driver Documentation
ChronosQRFSoC Class Reference

ChronosQ RFSoC Driver. More...

Collaboration diagram for ChronosQRFSoC:
Collaboration graph

Public Member Functions

def acquire_demod_state (self, List[int] demodID_list, int num_shots)
 Acquire demodulator state. More...
 
def acquire_iq_data (self, List[DemodBlock] demod_block_list, int num_shots)
 Acquire IQ data. More...
 
def acquire_raw_adc_data (self, List[ADCChannel] adc_to_read, int num_shots)
 Acquire raw ADC data. More...
 
def dev_test_command (self, int sub_cmd_id, **kwargs)
 Development Test Command Tx. More...
 
def get_current_dc_offset (self)
 Retrieve current DAC DC offset configuration. More...
 
def get_demodulator_state (self, int num_shots, List[int] demod_ids)
 Triggers the acquisition of demodulator state data stream. More...
 
def get_dev_test_command_reply (self, int sub_cmd_id)
 Retrieves reply for sub-command. More...
 
def get_status (self)
 Retrieves current settings of DACs and ADCs. More...
 
def get_system_config (self, int request_type=0)
 Retrieve System configuration. More...
 
str get_version (self)
 Retrieves the version. More...
 
def load_waveforms (self, Dict[int, np.ndarray] waveform_map, Dict[int, int] address_map=None)
 Loads waveforms into the selected DAC memory. More...
 
def set_continuous_playback (self, bool enabled)
 Sets the continuous playback setting of the RFSoC. More...
 
def set_relaxation_time (self, int relax_time)
 Configures the relaxation time. More...
 
def start_playback (self)
 Triggers the RFSoC to start playback. More...
 
def sync_delay (self)
 Synchronizes channel delay setting with the RFSoC. More...
 
def sync_demod (self)
 Synchronizes demodulator with the RFSoC. More...
 
def sync_setup (self)
 Synchronizes the settings with the RFSoC. More...
 

Public Attributes

 adc
 List of ADC channel objects. More...
 
 adc_sampling_interval
 Interval between ADC Sampling. More...
 
 adc_sampling_rate
 ADC Sampling rate. More...
 
 comm_sock
 Socket object for established connection to CHRONOS-Q board. More...
 
 dac
 List of DAC channel objects. More...
 
 dac_sampling_interval
 Interval between DAC Sampling. More...
 
 dac_sampling_rate
 DAC Sampling Rate. More...
 
 demod
 List of demodulation block objects. More...
 

Detailed Description

CHRONOS-Q Driver object that whereby the end user's program interacts with the ChronosQ CHRONOS-Q.

Member Function Documentation

◆ acquire_demod_state()

acquire_demod_state (   self,
List[int]  demodID_list,
int  num_shots 
)

Triggers acquisition of demodulator states for a list of demodulator for desired number of shots.
*_NOTE:* _Invoking this function also triggers DACs playback.

Parameters
[in]demodID_listList of demodulator block IDs.
[in]num_shotsNumber of shots.
Returns
A dictionary containing the acquired state data from the demodulators.
The returned dictionary is formatted as below: {<Demodulator ID>: <2 dimensional array of which row = shot #, column = state for the shot #>}

◆ acquire_iq_data()

acquire_iq_data (   self,
List[DemodBlock]  demod_block_list,
int  num_shots 
)

Triggers acquisition of IQ data from demodulator for desired number of shots.
*_NOTE:* _Invoking this function also triggers DACs playback.

Parameters
[in]demod_block_listDemodulator block list.
[in]num_shotsNumber of shots.
Returns
A dictionary containing the acquired IQ data (in complex form) from the demodulators.
The returned dictionary is formatted as below: {<Demodulator ID>: <2 dimensional array of which row = shot #, column = complex number for the shot #>}

◆ acquire_raw_adc_data()

def acquire_raw_adc_data (   self,
List[ADCChannel]  adc_to_read,
int  num_shots 
)

Triggers acquisition of raw ADC data for desired number of shots.
*_NOTE:* _Invoking this function also triggers DACs playback.

Parameters
[in]adc_to_readA list of ADCs to acquire data from.
[in]num_shotsNumber of shots.
Returns
A dictionary containing the acquired raw data from the ADCs.
The returned dictionary is formatted as below: {<channel ID>: <2 dimensional array of which row = shot #, column = ADC data for the shot #>}

◆ dev_test_command()

dev_test_command (   self,
int  sub_cmd_id,
**  kwargs 
)

Invoke the Development Test command on the Chronos-Q system.

Parameters
[in]sub_cmd_idDevelopment test command's sub-command ID as defined in the protocol.
Refer to protocol specifications for defined values.
[in]kwargsVariadic list of parameters required for the sub-command.
Returns
None.

◆ get_current_dc_offset()

get_current_dc_offset (   self)

Retrieve the current DAC DC offset configuration on the RFSOC system.

Returns
Returns a list of DAC DC offset configuration with each containing the items below:
Name Description
id DAC channel ID
dc_offset DC Offset configuration
dc_calibration DC Calibration configuration

◆ get_demodulator_state()

get_demodulator_state (   self,
int  num_shots,
List[int]  demod_ids 
)

Trigger the CHRONOS-Q to begin streaming state data of the demodulator(s).
The function only returns upon completing acquisition of ALL state data for ALL shots from requested demodulator.

Parameters
[in]num_shotsNumber of shots to acquire the demodulator state data.
[in]demod_idsA list of demodulator IDs to acquire the state information from.
Returns
A dictionary containing an ndarray of 32-bit integers containing state information with demodulator IDs as the key.
Refer to the CHRONOS-Q communications protocol document for definitions of demodulator states.

◆ get_dev_test_command_reply()

def get_dev_test_command_reply (   self,
int  sub_cmd_id 
)

Retrieves the reply for the transmitted sub-command.

Parameters
[in]sub_cmd_idDevelopment test command's sub-command ID as defined in the protocol.
Refer to protocol specifications for defined values.
Returns
Dictionary containing the reply of the executed sub-command.

◆ get_status()

get_status (   self)

Retrieves the DAC & ADC sampling rates and their individual channel settings.

Returns
Tuple containing dac_sampling_rate, adc_sampling_rate, reply.DACStatusReply list and reply.ADCStatusReply list.

◆ get_system_config()

def get_system_config (   self,
int   request_type = 0 
)

Retrieves the current system configuration information.

Parameters
[in]request_typeType of system configuration to return.
Request Type Description
0 Request for detailed configuration. *(Default)*
1 Request for brief system configuration info.
Returns
Returns a tuple containing the items below:
Information Type Description Request Type
system_config Brief System configuration Brief (0x01) & Detailed (0x00)
xydac_config XY DAC Configuration Detailed (0x00)
rodac_config XRO DAC Configuration Detailed (0x00)
zdac_config Z DAC Configuration Detailed (0x00)
adc_config ADC Configuration Detailed (0x00)

◆ get_version()

get_version (   self)

Current firmware version of CHRONOS-Q Server.

Retrieves the current firmware version of connected CHRONOS-Q Server.

Returns
String containing firmware version of currently connected CHRONOS-Q server.

◆ load_waveforms()

load_waveforms (   self,
Dict[int, np.ndarray]  waveform_map,
Dict[int, int]   address_map = None 
)
Parameters
[in]waveform_mapDictionary mapping DAC channels to waveforms to be uploaded.
[in]address_map(Optional) Dictionary mapping DAC channels to the memory address where DAC playback will end.
In the event this parameter is used, the address information is basically the waveform data's index for the given DAC.
In the event this parameter is not given, the playback will end at the last item in the waveform data.

◆ set_continuous_playback()

set_continuous_playback (   self,
bool  enabled 
)

Enables or Disables the continuous playback functionality of CHRONOS-Q.

Parameters
[in]enabledTrue to enable continuous playback. Else False. Default is True.

◆ set_relaxation_time()

set_relaxation_time (   self,
int  relax_time 
)

Configures the time interval between shots acquisitions.

Parameters
[in]relax_timeTime interval (in microseconds).
Returns
None

◆ start_playback()

start_playback (   self)

Triggers the RFSoC to start playback.
Invoking this function when acquisition related function will be invoked later (e.g. ChronosQRFSoC::acquire_raw_adc_data/ ChronosQRFSoC::acquire_iq_data) is redundant.
This is because both function calls will trigger DACs playback.
Use of this function only if DACs playback is required when there isn't a need for acquisition e.g. Measurement of DAC output signal for testing.

◆ sync_delay()

sync_delay (   self)

Synchronizes the DAC and ADC delay settings to CHRONOS-Q.
Only DAC(s) and/or ADC(s) with modified settings are sent to CHRONOS-Q.

◆ sync_demod()

sync_demod (   self)

Synchronizes the demodulator settings to CHRONOS-Q.
Only demodulator(s) with modified settings are sent to CHRONOS-Q.

◆ sync_setup()

sync_setup (   self)

Synchronizes the DAC and ADC settings to CHRONOS-Q.
Only modified DAC(s) and/or ADC(s) with modified settings are sent to CHRONOS-Q.

Member Data Documentation

◆ adc

adc

List of ADC channel objects(channel.adc.ADCChannel) containing ADC settings .
The ADC channel objects are initialized using the channel status information obtained during ChronosQRFSoC object creation.

◆ adc_sampling_interval

adc_sampling_interval

Time interval (in seconds) between ADC sampling.
Calculated and assigned based on the ADC sampling rate information during ChronosQRFSoC initialization.

◆ adc_sampling_rate

adc_sampling_rate

CHRONOS-Q's ADC sampling rate in Hz.
This information is initially set during ChronosQRFSoC initialization process whereby the info is obtained directly from connected CHRONOS-Q via calls to ChronosQRFSoC.get_status.

◆ comm_sock

comm_sock

Socket object for established connection to CHRONOS-Q board.

◆ dac

dac

List of DAC channel objects(channel.dac.DACChannel) containing DAC settings.
The DAC channel objects are initialized using the channel status information obtained during ChronosQRFSoC object creation.

◆ dac_sampling_interval

dac_sampling_interval

Time interval (in seconds) between DAC sampling.
Calculated and assigned based on the DAC sampling rate information during ChronosQRFSoC initialization.

◆ dac_sampling_rate

dac_sampling_rate

CHRONOS-Q's DAC sampling rate in Hz.
This information is initially set during ChronosQRFSoC initialization process whereby the info is obtained directly from connected CHRONOS-Q via calls to ChronosQRFSoC.get_status.

◆ demod

demod

List of demodulation block objects(acquisition.demod.DemodBlock) containing demodulation block settings.