DiCarloLab-Delft / PycQED_py3

Python3 version of PycQED using QCoDeS as backend
MIT License
68 stars 41 forks source link

ZI compilation error when uploading waveforms (related to python3.7+ upgrade) #723

Closed MiniSean closed 1 year ago

MiniSean commented 1 year ago

Related to python version upgrade #700 .

TL;DR

How to recreate:

Error message:

File d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\meta_instrument\LutMans\mw_lutman.py:987, in AWG8_MW_LutMan.load_waveforms_onto_AWG_lookuptable(self, regenerate_waveforms, stop_start, force_load_sequencer_program)
    984 else:
    985     raise ValueError('Unexpected value for parameter cfg_sideband_mode.')
--> 987 super().load_waveforms_onto_AWG_lookuptable(
    988     regenerate_waveforms=regenerate_waveforms,
    989     stop_start=stop_start)

File d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\meta_instrument\LutMans\base_lutman.py:167, in Base_LutMan.load_waveforms_onto_AWG_lookuptable(self, regenerate_waveforms, stop_start)
    164     self.load_waveform_onto_AWG_lookuptable(waveform_name)
    166 if stop_start:
--> 167     AWG.start()

File d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\physical_instruments\ZurichInstruments\ZI_base_instrument.py:1394, in ZI_base_instrument.start(self)
   1392 if self._awg_needs_configuration[awg_nr]:
   1393     log.debug(f"{self.devname}: Detected awg configuration tag for AWG {awg_nr}.")
-> 1394     self._configure_awg_from_variable(awg_nr)
   1395     self._awg_needs_configuration[awg_nr] = False
   1396     self._clear_dirty_waveforms(awg_nr)

File d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\physical_instruments\ZurichInstruments\ZI_base_instrument.py:1269, in ZI_base_instrument._configure_awg_from_variable(self, awg_nr)
   1262     log.info(f"{self.devname}: Configuring AWG {awg_nr} with predefined codeword program")
   1263     full_program = \
   1264         '// Start of automatically generated codeword table\n' + \
   1265         self._codeword_table_preamble(awg_nr) + \
   1266         '// End of automatically generated codeword table\n' + \
   1267         self._awg_program[awg_nr]
-> 1269     self.configure_awg_from_string(awg_nr, full_program)
   1270 else:
   1271     logging.warning(f"{self.devname}: No program configured for awg_nr {awg_nr}.")

File d:\githubrepos\pycqed_py3\pycqed\instrument_drivers\physical_instruments\ZurichInstruments\ZI_base_instrument.py:1569, in ZI_base_instrument.configure_awg_from_string(self, awg_nr, program_string, timeout)
   1567         print(i+1, '\t', line)
   1568     print('\n')
-> 1569     raise ziCompilationError(comp_msg)
   1571 # Give the device one second to respond
   1572 for i in range(10):

ziCompilationError: Compilation started
Detected 1 devices with a total of 1 AWG cores.
Compiling source string
Compilation successful
Cannot upload ELF file C:\Users\TUD277449\Documents\Zurich Instruments\LabOne\WebServer\awg\elf\dev8502_0_awg_default.elf compiled for min. bitstream revision 68841 to device with bitstream revision 67742
Elf upload failed. Cannot upload ELF file C:\Users\TUD277449\Documents\Zurich Instruments\LabOne\WebServer\awg\elf\dev8502_0_awg_default.elf compiled for min. bitstream revision 68841 to device with bitstream revision 67742
MiniSean commented 1 year ago

Hi @mariosk-zi (@wvlothuizen), this week I managed to pretty much finish upgrading (DC) pycqed to be compatible with python 3.7 (3.8 and 3.9). The main issue we are running into is related to uploading waveforms (*.elf file) to the HDAWG's. Hopefully the above issue gives enough context.

mariosk-zi commented 1 year ago

@MiniSean , please update also the HDAWG firmware to bitstream revision 68841 (I guess it's the one coming with LabOne 23.2.1). From the error message it looks like it lags behind (67742).

MiniSean commented 1 year ago

@mariosk-zi, thank you for the quick response. The HDAWG firmware is now updated to revision 69080 (LabOne 23.02.41338). This solved the issue.