From fda3cb248207d75196d85c7fb7e04940491f559c Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 9 May 2019 17:19:11 +0800 Subject: [PATCH] kasli_generic: add edge counter support --- artiq/gateware/targets/kasli_generic.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/artiq/gateware/targets/kasli_generic.py b/artiq/gateware/targets/kasli_generic.py index 9a077e9bd..6bf4c484c 100755 --- a/artiq/gateware/targets/kasli_generic.py +++ b/artiq/gateware/targets/kasli_generic.py @@ -20,9 +20,14 @@ def peripheral_dio(module, peripheral): } if len(peripheral["ports"]) != 1: raise ValueError("wrong number of ports") + if peripheral.get("edge_counter", False): + edge_counter_cls = edge_counter.SimpleEdgeCounter + else: + edge_counter_cls = None eem.DIO.add_std(module, peripheral["ports"][0], ttl_classes[peripheral["bank_direction_low"]], - ttl_classes[peripheral["bank_direction_high"]]) + ttl_classes[peripheral["bank_direction_high"]], + edge_counter_cls=edge_counter_cls) def peripheral_urukul(module, peripheral):