Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dio parity checks for HDAWG #710

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,21 @@ def _add_extra_parameters(self):
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',
vals=validators.Numbers())

##########################################################################
# 'public' overrides for ZI_base_instrument
##########################################################################

def clear_errors(self):
super().clear_errors()
base_path = "raw/dios/0/parity/"
self.seti(base_path + "dio/clear", 1)
self.seti(base_path + "controller/clear", 1)
self.seti(base_path + "processing/clear", 1)

def check_errors(self, errors_to_ignore=None):
super().check_errors(errors_to_ignore)
self._check_dio_parity()

# FIXME: why the override, does not seem necessary now QCoDeS PRs 1161/1163 have been merged
def snapshot_base(self, update: bool=False,
params_to_skip_update =None,
Expand Down Expand Up @@ -608,6 +623,29 @@ def _find_valid_delays(self, awgs_and_sequences):

return set(valid_delays)

def _check_dio_parity(self):

base_path = "raw/dios/0/parity/"

num_errors_dio_fpga = self.geti(base_path + "dio/errors")
if num_errors_dio_fpga != 0:
log.error(f"Parity check failed on the DIO FPGA checking DIO data from the connector. Number of errors: {num_errors_dio_fpga}.")
self.seti(base_path + "dio/clear", 1)

num_errors_master_fpga = self.geti(base_path + "controller/errors")
if num_errors_master_fpga != 0:
log.error(
f"Parity check failed on the master FPGA checking DIO data from the DIO FPGA. Number of errors: {num_errors_master_fpga}."
)
self.seti(base_path + "controller/clear", 1)

num_errors_slave_fpga = self.geti(base_path + "processing/errors")
if num_errors_slave_fpga != 0:
log.error(
f"Parity check failed on the slave FPGA checking DIO data from the master FPGA. Number of errors: {num_errors_master_fpga}."
)
self.seti(base_path + "processing/clear", 1)

##########################################################################
# overrides for CalInterface interface
##########################################################################
Expand Down Expand Up @@ -641,6 +679,7 @@ def output_dio_calibration_data(self, dio_mode: str, port: int=0) -> Tuple[int,
def calibrate_dio_protocol(self, dio_mask: int, expected_sequence: List, port: int=0):
# FIXME: UHF driver does not use expected_sequence, why the difference
self.assure_ext_clock()
self._check_dio_parity()
self.upload_codeword_program()

for awg, sequence in expected_sequence:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class ZI_HDAWG_core(zibase.ZI_base_instrument):
"""

# Define minimum required revisions
MIN_FWREVISION = 62730
MIN_FPGAREVISION = 62832
MIN_SLAVEREVISION = 62659
MIN_FWREVISION = 68286
MIN_FPGAREVISION = 68286
MIN_SLAVEREVISION = 68286

##########################################################################
# 'public' functions: device control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,6 @@ def __init__(self,
self._errors = None
# Structure for storing errors that should be demoted to warnings
self._errors_to_ignore = []
# Make initial error check
self.check_errors()

# Default is not to use async mode
self._async_mode = False
Expand All @@ -754,6 +752,9 @@ def __init__(self,
else:
self._logfile = None

# Make initial error check
self.check_errors()

# Show some info
serial = self.get('features_serial')
options = self.get('features_options')
Expand Down