@@ -243,6 +243,21 @@ def _add_extra_parameters(self):
243243 docstring = f'Configures the amplitude in full scale units of AWG { i } output { ch } (zero-indexed). Note: this parameter is deprecated, use awgs_{ ch } _outputs_{ ch } _gains_{ ch } instead' ,
244244 vals = validators .Numbers ())
245245
246+ ##########################################################################
247+ # 'public' overrides for ZI_base_instrument
248+ ##########################################################################
249+
250+ def clear_errors (self ):
251+ super ().clear_errors ()
252+ base_path = "raw/dios/0/parity/"
253+ self .seti (base_path + "dio/clear" , 1 )
254+ self .seti (base_path + "controller/clear" , 1 )
255+ self .seti (base_path + "processing/clear" , 1 )
256+
257+ def check_errors (self , errors_to_ignore = None ):
258+ super ().check_errors (errors_to_ignore )
259+ self ._check_dio_parity ()
260+
246261 # FIXME: why the override, does not seem necessary now QCoDeS PRs 1161/1163 have been merged
247262 def snapshot_base (self , update : bool = False ,
248263 params_to_skip_update = None ,
@@ -608,6 +623,29 @@ def _find_valid_delays(self, awgs_and_sequences):
608623
609624 return set (valid_delays )
610625
626+ def _check_dio_parity (self ):
627+
628+ base_path = "raw/dios/0/parity/"
629+
630+ num_errors_dio_fpga = self .geti (base_path + "dio/errors" )
631+ if num_errors_dio_fpga != 0 :
632+ log .error (f"Parity check failed on the DIO FPGA checking DIO data from the connector. Number of errors: { num_errors_dio_fpga } ." )
633+ self .seti (base_path + "dio/clear" , 1 )
634+
635+ num_errors_master_fpga = self .geti (base_path + "controller/errors" )
636+ if num_errors_master_fpga != 0 :
637+ log .error (
638+ f"Parity check failed on the master FPGA checking DIO data from the DIO FPGA. Number of errors: { num_errors_master_fpga } ."
639+ )
640+ self .seti (base_path + "controller/clear" , 1 )
641+
642+ num_errors_slave_fpga = self .geti (base_path + "processing/errors" )
643+ if num_errors_slave_fpga != 0 :
644+ log .error (
645+ f"Parity check failed on the slave FPGA checking DIO data from the master FPGA. Number of errors: { num_errors_master_fpga } ."
646+ )
647+ self .seti (base_path + "processing/clear" , 1 )
648+
611649 ##########################################################################
612650 # overrides for CalInterface interface
613651 ##########################################################################
@@ -641,6 +679,7 @@ def output_dio_calibration_data(self, dio_mode: str, port: int=0) -> Tuple[int,
641679 def calibrate_dio_protocol (self , dio_mask : int , expected_sequence : List , port : int = 0 ):
642680 # FIXME: UHF driver does not use expected_sequence, why the difference
643681 self .assure_ext_clock ()
682+ self ._check_dio_parity ()
644683 self .upload_codeword_program ()
645684
646685 for awg , sequence in expected_sequence :
0 commit comments