forked from M-Labs/artiq
1
0
Fork 0

Kasli: Added front panel user LED (#1623) (#1694)

This commit is contained in:
Star Chen 2021-06-07 16:05:50 +08:00 committed by GitHub
parent bcb030cc9c
commit 9dee8bb9c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -550,9 +550,7 @@ def process(output, master_description, satellites):
for peripheral in master_description["peripherals"]: for peripheral in master_description["peripherals"]:
n_channels = pm.process(rtio_offset, peripheral) n_channels = pm.process(rtio_offset, peripheral)
rtio_offset += n_channels rtio_offset += n_channels
kasli_with_leds = (master_description["target"] == "kasli" and master_description["hw_rev"] in ("v1.0", "v1.1")) if base == "standalone":
kasli_soc = master_description["target"] == "kasli_soc"
if base == "standalone" and kasli_with_leds or kasli_soc:
n_channels = pm.add_board_leds(rtio_offset) n_channels = pm.add_board_leds(rtio_offset)
rtio_offset += n_channels rtio_offset += n_channels

View File

@ -46,6 +46,11 @@ class GenericStandalone(StandaloneBase):
phy = ttl_simple.Output(sfp_ctl.led) phy = ttl_simple.Output(sfp_ctl.led)
self.submodules += phy self.submodules += phy
self.rtio_channels.append(rtio.Channel.from_phy(phy)) self.rtio_channels.append(rtio.Channel.from_phy(phy))
if hw_rev == "v2.0":
for i in (1, 2):
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["HAS_RTIO_LOG"] = None
self.config["RTIO_LOG_CHANNEL"] = len(self.rtio_channels) self.config["RTIO_LOG_CHANNEL"] = len(self.rtio_channels)