From 04411069ffa18c479917ae1664f9e88ecfe2d667 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Thu, 14 Aug 2025 08:54:50 +0300 Subject: [PATCH] feat(shuttle): report missing muxes When we have x4-tile high projects, some muxes will be missing. Report them as such in the shuttle index, so that the shuttle map on the website displays correctly. --- shuttle.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/shuttle.py b/shuttle.py index e3701f4..b6d0334 100644 --- a/shuttle.py +++ b/shuttle.py @@ -43,6 +43,12 @@ def copy_print_glob(pattern: str, dest_dir: str): copy_print(file, os.path.join(dest_dir, os.path.basename(file))) +def mux_id_to_xy(mux_id: int, total_mux_rows: int): + x = (mux_id >> 1) & 1 + y = total_mux_rows // 2 - (2 * (mux_id & 1) - 1) * (mux_id >> 2) - (mux_id & 1) + return x, y + + class ShuttleConfig: def __init__(self, config: Config, projects: List[Project], modules_yaml_name: str): self.config = config @@ -61,13 +67,11 @@ class ShuttleConfig: for item in self.mux_config["tt"]["analog"]: mux_id: int for mux_id in item["mux_id"]: - x = (mux_id >> 1) & 1 - y = ( - total_mux_rows // 2 - - (2 * (mux_id & 1) - 1) * (mux_id >> 2) - - (mux_id & 1) - ) + x, y = mux_id_to_xy(mux_id, total_mux_rows) self.layout["muxes"][x][y] = "analog" + for item in self.mux_config["tt"].get("huge_modules", {}).get("mux_id", []): + x, y = mux_id_to_xy(item, total_mux_rows) + self.layout["muxes"][x][y] = "" def read_mux_config_file(self): with open(