def test_digitizer_hvi2(digitizer: SD_DIG, requested_mode: MODES): ''' Args: digitizer: M3102A digitizer requested_mode: requested acquisition mode after test ''' digitizer.set_acquisition_mode(MODES.NORMAL) digitizer.set_digitizer_software( 1e6, 1, data_mode=DATA_MODE.AVERAGE_TIME_AND_CYCLES, channels=[1, 2, 3, 4]) digitizer.daq_flush_multiple(0b1111) v_str = ','.join([f'{v:7.3f}' for v in digitizer.measure()]) print(f"testing digitizer: {v_str} mV") digitizer.set_acquisition_mode(requested_mode)
self.timer.stop() def change_plot(self): self.count += 1 logging.info(f'start #{self.count}') v = (plotting._2D_V1_swing.value() + 1) if v > 1100: v = 100 plotting._2D_V1_swing.setValue(v) start = time.monotonic() plotting.update_plot_settings_2D() logging.info(f'restart duration {time.monotonic()- start:5.2f} s') dig = SD_DIG("dig", 1, 6) awg_slots = [3, 7] # [3,4] awgs = [] for i, slot in enumerate(awg_slots): awg = M3202A_fpga(f"AWG{i}", 1, slot) awg.set_hvi_queue_control(True) awgs.append(awg) station = qcodes.Station() station_name = 'Test' for awg in awgs: station.add_component(awg) station.add_component(dig)
dig_mode = 1 t_measure = 250 t_average = t_measure p2decim = 0 lo_f = 20e6 acquisition_delay_ns = 0 n_rep = 1 awgs = [] for i, slot in enumerate(awg_slots): awg = M3202A_fpga(f'AWG{slot}', 1, slot) awgs.append(awg) awg.set_hvi_queue_control(True) dig = SD_DIG('DIG1', 1, dig_slot) load_iq_image(dig.SD_AIN) print_fpga_info(dig.SD_AIN) dig.set_acquisition_mode(dig_mode) ## add to pulse lib. p = create_pulse_lib(awgs) ## create sequencer gate1, swing1, n_pt1 = 'AWG3_1', 500, 16 gate2, swing2, n_pt2 = 'AWG3_2', 500, 12 t_step = t_measure sequencer = scan2D_keysight(gate1, swing1, n_pt1, gate2, swing2, n_pt2, t_step, p, dig_mode) sequencer.set_hw_schedule( Hvi2ScheduleLoader(p,
dig_channel_modes = {1: 1, 2: 2, 3: 2} t_measure = 1000 t_average = 10 p2decim = 0 lo_f = [0, 0, 60e6, 190e6, 0] n_rep = 5 awgs = [] for i, slot in enumerate(awg_slots): awg = M3202A_fpga(f'AWG{slot}', 1, slot) awg.set_digital_filter_mode(0) awgs.append(awg) dig = SD_DIG('DIG1', 1, dig_slot) load_iq_image(dig.SD_AIN) print_fpga_info(dig.SD_AIN) dig.set_operating_mode(OPERATION_MODES.HVI_TRG) for awg in awgs: for awg_name, channel, lo in awg_channel_los: if awg_name == awg.name: awg.config_lo(channel, lo, not switch_los, awg_lo_freq[lo], awg_lo_amps[lo]) awg.set_lo_mode(channel, True) ## add to pulse lib. p = create_pulse_lib(awgs)
dig_slot = 5 dig_channels = [1, 2, 3, 4] full_scale = 2.0 dig_mode = 1 t_measure = 380 #20 lo_f = 0e6 acquisition_delay_ns = 0 #160 awgs = [] for i, slot in enumerate(awg_slots): awg = M3202A_fpga(f'AWG{slot}', 1, slot) awgs.append(awg) awg.set_hvi_queue_control(True) dig = SD_DIG('DIG1', 1, dig_slot) load_iq_image(dig.SD_AIN) print_fpga_info(dig.SD_AIN) dig.set_acquisition_mode(dig_mode) ## add to pulse lib. p = create_pulse_lib(awgs) for ch in dig_channels: dig.set_lo(ch, lo_f, 0, input_channel=ch) ## create 2D scan gate1, swing1, n_pt1 = 'vP1', 500, 15 biasT_corr = False dig_param = construct_1D_scan_fast(
dig_mode = MODES.NORMAL t_measure = 10_000 t_average = 10 p2decim = 0 lo_f = 20e6 n_rep = 1 awgs = [] for i, slot in enumerate(awg_slots): awg = M3202A_fpga(f'AWG{slot}', 1, slot, waveform_size_limit=1e7) awgs.append(awg) awg.set_hvi_queue_control(True) awg.set_digital_filter_mode(0) dig = SD_DIG('DIG1', 1, dig_slot) load_iq_image(dig.SD_AIN) print_fpga_info(dig.SD_AIN) dig.set_acquisition_mode(dig_mode) ## add to pulse lib. p = create_pulse_lib(awgs) schedule = Hvi2ScheduleLoader(p, "SingleShot", dig) ## create waveforms seg = p.mk_segment() for awg in awgs: for ch in [1, 2, 3, 4]: channel = getattr(seg, f'{awg.name}_{ch}') channel.wait(t_wave)
t_measure = 400 lo_f = 20e6 n_rep = 10 awgs = [] for i, slot in enumerate(awg_slots): awg = M3202A(f'AWG{slot}', 1, slot, waveform_size_limit=1e7) awgs.append(awg) # time.sleep(1) load_awg_image(awg) # load_default_awg_image(awg) print_fpga_info(awg.awg) # fpga_list_registers(awg.awg) dig = SD_DIG('DIG1', 1, dig_slot) load_iq_image(dig.SD_AIN) print_fpga_info(dig.SD_AIN) dig.set_acquisition_mode(dig_mode) ## add to pulse lib. p = create_pulse_lib(awgs) schedule = Hvi2ScheduleLoader(p, "SingleShot", dig) ## create waveforms seg = p.mk_segment() t_measure_loop = looping.linspace(100, 1000, 10, name="t_measure",