Skip to content

Commit

Permalink
feat(datasheet): add analog pins to Project class
Browse files Browse the repository at this point in the history
  • Loading branch information
htfab committed May 6, 2024
1 parent a2c7055 commit cbb1dcb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions project.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Args:
class Project:
top_verilog_filename: str
mux_address: int
analog_pins: tuple[int, ...]
commit_id: str
sort_id: int

Expand Down
4 changes: 2 additions & 2 deletions shuttle.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@ def configure_mux(self):
range(len(module["analog"]))
), f"analog pins are not contiguous for {module_name}"

project.analog_pins = tuple(module["analog"].values())
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)
mux_index_reverse[module_name] = mux_address
Expand All @@ -123,7 +124,6 @@ def configure_mux(self):
if project.info.top_module not in mux_index_reverse:
logging.error(f"no placement found for {project}!")
exit(1)
project.mux_address = mux_index_reverse[project.info.top_module]

repo = git.Repo(".")

Expand Down
2 changes: 1 addition & 1 deletion shuttle_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ShuttleIndexProject(TypedDict):
tiles: str
repo: str
commit: str
analog_pins: NotRequired[List[int]]
analog_pins: NotRequired[tuple[int, ...]]


class ShuttleIndexLayout(TypedDict):
Expand Down

0 comments on commit cbb1dcb

Please sign in to comment.