From e7af2195056324f3e55f24bd6668d14746ee40e3 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 18 Oct 2023 15:11:07 +0800 Subject: [PATCH] kasli_generic: add support for user LEDs Add additional LED RTIO devices. --- artiq/gateware/targets/kasli_generic.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/artiq/gateware/targets/kasli_generic.py b/artiq/gateware/targets/kasli_generic.py index 2f91de1b1..9756093df 100755 --- a/artiq/gateware/targets/kasli_generic.py +++ b/artiq/gateware/targets/kasli_generic.py @@ -44,8 +44,8 @@ class GenericStandalone(StandaloneBase): phy = ttl_simple.Output(sfp_ctl.led) self.submodules += phy self.rtio_channels.append(rtio.Channel.from_phy(phy)) - if hw_rev == "v2.0": - for i in (1, 2): + if hw_rev in ("v1.1", "v2.0"): + for i in range(3): print("USER LED at RTIO channel 0x{:06x}".format(len(self.rtio_channels))) phy = ttl_simple.Output(self.platform.request("user_led", i)) self.submodules += phy @@ -93,6 +93,13 @@ class GenericMaster(MasterBase): self.rtio_channels = [] eem_7series.add_peripherals(self, description["peripherals"]) + if hw_rev in ("v1.1", "v2.0"): + for i in range(3): + print("USER LED at RTIO channel 0x{:06x}".format(len(self.rtio_channels))) + phy = ttl_simple.Output(self.platform.request("user_led", i)) + self.submodules += phy + self.rtio_channels.append(rtio.Channel.from_phy(phy)) + self.config["HAS_RTIO_LOG"] = None self.config["RTIO_LOG_CHANNEL"] = len(self.rtio_channels) self.rtio_channels.append(rtio.LogChannel()) @@ -131,6 +138,13 @@ class GenericSatellite(SatelliteBase): self.rtio_channels = [] eem_7series.add_peripherals(self, description["peripherals"]) + if hw_rev in ("v1.1", "v2.0"): + for i in range(3): + print("USER LED at RTIO channel 0x{:06x}".format(len(self.rtio_channels))) + phy = ttl_simple.Output(self.platform.request("user_led", i)) + self.submodules += phy + self.rtio_channels.append(rtio.Channel.from_phy(phy)) + self.config["HAS_RTIO_LOG"] = None self.config["RTIO_LOG_CHANNEL"] = len(self.rtio_channels) self.rtio_channels.append(rtio.LogChannel())