labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 58 forks source link

PulseBlaster long delay instructions only work for PulseBlaster devices with a 13.33ns resolution #28

Closed philipstarkey closed 4 years ago

philipstarkey commented 5 years ago

Original report (archived issue) by Philip Starkey (Bitbucket: pstarkey, GitHub: philipstarkey).


We have a bunch of hard-coded instances of 55 seconds in the PulseBlaster labscript class. This number is used to determine when to switch between normal delay and long delay instructions. That code is used by all the other PulseBlaster variants (via subclassing), however the 55 second number is actually 13.333ns * 2^32, where 2^32 indicates that the instruction delay is actually stored as a 32-bit integer inside the PulseBlaster (corroborated by the manual) and 13.333ns is half of the clock_resolution attribute of PseudoclockDevices.

We should update the code to handle the switch between normal delay and long delay instructions based on the instruction length going over 2**32*self.clock_resolution/2 rather than 55 seconds.

We should probably also note that I think Shaun has been wanting PulseBlasters which only use internal outputs (and not ClockLines) to be able to have a clock resolution of half that specified at the moment, and so a fix for this may conflict with any parallel changes that Shaun works on.

philipstarkey commented 4 years ago

This was fixed a while ago by 9e334987a0458e61085b5ca57af3435d4a3248ac (which also fixed #33)