You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GatedClocks-bugfix: Fixed bug in gated clocks feature
We previously only checked that instructions on clocklines were not too close together for the clock limit (i.e. was an instruction on clockline A too close to the next instruction on clockline A, and was instruction B too close to the next instruction on clockline B). However, this does not catch the case where an instruction on clockline B is close to an instruction on clockline A, thus forcing the pulse on clockline A to be shorter than it would otherwise.
This case is now caught in the below patch.
# Get rid of duplicates if trigger times were already in the list:
654
654
change_time_list=list(set(change_time_list))
655
655
change_time_list.sort()
656
-
656
+
657
+
# index to keep track of in all_change_times
658
+
j=0
657
659
# Check that no two instructions are too close together:
658
660
fori, tinenumerate(change_time_list[:-1]):
659
661
dt=change_time_list[i+1] -t
660
662
ifdt<1.0/clock_line.clock_limit:
661
-
raiseLabscriptError('Commands have been issued to devices attached to %s at t= %s s and %s s. '%(self.name, str(t),str(change_time_list[i+1])) +
663
+
raiseLabscriptError('Commands have been issued to devices attached to clockline %s at t= %s s and %s s. '%(clock_line.name, str(t),str(change_time_list[i+1])) +
664
+
'One or more connected devices on ClockLine %s cannot support update delays shorter than %s sec.'%(clock_line.name, str(1.0/clock_line.clock_limit)))
0 commit comments