mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
feat(datasheet): add analog pins to Project class
This commit is contained in:
@@ -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
@@ -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
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user