2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 05:03:34 +08:00

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

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,