feat(datasheet): add analog pins to Project class

This commit is contained in:
htfab
2024-05-06 23:21:17 +03:00
committed by Uri Shaked
parent 6ee5119ca2
commit b840056e76
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -63,6 +63,7 @@ class Args:
class Project: class Project:
top_verilog_filename: str top_verilog_filename: str
mux_address: int mux_address: int
analog_pins: tuple[int, ...]
commit_id: str commit_id: str
sort_id: int sort_id: int
+2 -2
View File
@@ -113,8 +113,9 @@ class ShuttleConfig:
range(len(module["analog"])) range(len(module["analog"]))
), f"analog pins are not contiguous for {module_name}" ), f"analog pins are not contiguous for {module_name}"
project.analog_pins = tuple(module["analog"].values())
if len(module["analog"]) > 0: if len(module["analog"]) > 0:
project_info["analog_pins"] = list(module["analog"].values()) project_info["analog_pins"] = project.analog_pins
project_index.append(project_info) project_index.append(project_info)
mux_index_reverse[module_name] = mux_address mux_index_reverse[module_name] = mux_address
@@ -123,7 +124,6 @@ class ShuttleConfig:
if project.info.top_module not in mux_index_reverse: if project.info.top_module not in mux_index_reverse:
logging.error(f"no placement found for {project}!") logging.error(f"no placement found for {project}!")
exit(1) exit(1)
project.mux_address = mux_index_reverse[project.info.top_module]
repo = git.Repo(".") repo = git.Repo(".")
+1 -1
View File
@@ -9,7 +9,7 @@ class ShuttleIndexProject(TypedDict):
tiles: str tiles: str
repo: str repo: str
commit: str commit: str
analog_pins: NotRequired[List[int]] analog_pins: NotRequired[tuple[int, ...]]
class ShuttleIndexLayout(TypedDict): class ShuttleIndexLayout(TypedDict):