diff --git a/luna/gateware/platform/core.py b/luna/gateware/platform/core.py index 86e3cb15..135f76d3 100644 --- a/luna/gateware/platform/core.py +++ b/luna/gateware/platform/core.py @@ -119,6 +119,17 @@ def port_sharing(self, phy_name): sharing = getattr(self, "apollo_port_sharing", {}) return sharing.get(phy_name, None) + + @property + def apollo_gateware_phy(self): + """ Returns the USB PHY for Apollo gateware. """ + + sharing = getattr(self, "apollo_port_sharing", {}) + if len(sharing) == 0: + return self.default_usb_connection + return list(sharing.keys())[0] + + def toolchain_program(self, products, name): """ Programs the relevant LUNA board via its sideband connection. """