forked from M-Labs/artiq
1
0
Fork 0

pdq2.mediator: err on short segments

This commit is contained in:
Robert Jördens 2016-02-24 15:48:35 +01:00
parent d80739811b
commit f2acf95f98
1 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ frame_setup = 20*ns
trigger_duration = 50*ns
sample_period = 10*ns
delay_margin_factor = 1 + 1e-4
minimum_duration = 100*ns
class FrameActiveError(Exception):
@ -103,6 +104,9 @@ class _Frame:
def _get_program(self):
r = []
for segment in self.segments:
if segment.duration < minimum_duration:
raise ValueError(("Segment too short ({:g} s), trigger might "
"overlap").format(segment.duration))
segment_program = [
{
"dac_divider": dac_divider,