From 4d73fb5bc9773a546980d6e08737f276e84a3c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Thu, 6 Sep 2018 11:01:08 +0200 Subject: [PATCH] grabber: only advance when DVAL --- artiq/gateware/grabber/core.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/artiq/gateware/grabber/core.py b/artiq/gateware/grabber/core.py index d9dac3d12..60c40ce2d 100644 --- a/artiq/gateware/grabber/core.py +++ b/artiq/gateware/grabber/core.py @@ -85,10 +85,12 @@ class Parser(Module, AutoCSR): self.sync.cl += [ last_lval.eq(lval), last_fval.eq(fval), - pix.x.eq(pix.x + 1), + If(dval, + pix.x.eq(pix.x + 1), + ), If(~lval, - pix.x.eq(0), If(last_lval, last_x.eq(pix.x)), + pix.x.eq(0), If(last_fval & last_lval, pix.y.eq(pix.y + 1) )