Architecture Tools Reference
adijif.plls.utils.adf4030_arch
The architecture tooling for the ADF4030 (Aion) clock-distribution
PLL. Adf4030Architecture wraps the legacy free functions
(Apollo_per_Aion_*, Aion_per_FPGA_*) with a single object that
also exposes a textual summary and an SVG drawing method. The
_connect_aions_* helpers are private but documented here because
they are the load-bearing pieces of draw().
Utility functions for ADF4030 architecture calculations.
- class adijif.plls.utils.adf4030_arch.Adf4030Architecture(N: int, N_Apollo: int, N_FPGA: int, architecture: str, N_branch: int | None = None)
Bases:
objectPartition descriptor for an ADF4030 (Aion) clock-distribution system.
Wraps the free-function partition helpers in this module with a single cached object exposing the resulting partition dict, a human-readable summary string, and a
draw(scope=...)method that returns a d2-rendered SVG diagram.- _build_unit_board_node(name: str) Node
Construct one UnitBoard subtree (FPGAs / Aions / Apollos).
Builds the hierarchy with intra-FPGA Aion connections per the chosen architecture.
- draw(scope: str = 'ub', path: str | None = None) str
Render the architecture as an SVG diagram.
- Args:
scope (str):
"ub"for one Unit Board,"system"for the full multi-Unit-Board diagram. path (str): If set, also write the rendered SVG to this file.- Returns:
str: SVG content as a string.
- Raises:
ValueError:
scopeis not"ub"or"system".
- adijif.plls.utils.adf4030_arch.Aion_per_FPGA_cascade(N_Aion_UB_cascade: int, N_FPGA: int) tuple[list, int]
Calculate Aion device distribution among FPGAs in a cascade architecture.
This function determines how many Aion devices are managed by each FPGA on the Unit Board and finds the maximum number of Aion devices per FPGA.
- Args:
N_Aion_UB_cascade (int): Number of Aion devices per Unit Board. N_FPGA (int): Number of FPGA devices on a Unit Board.
- Returns:
- tuple: A tuple containing:
list: How many Aion devices are managed by each FPGA on the Unit Board.
int: The maximum number of Aion devices managed by any FPGA on the Unit Board.
- adijif.plls.utils.adf4030_arch.Aion_per_FPGA_tree(N_Aion_UB_tree: int, N_FPGA: int) tuple[list, int]
Calculate Aion device distribution among FPGAs in a tree architecture.
This function determines how many Aion devices are managed by each FPGA on the Unit Board and finds the maximum number of Aion devices per FPGA.
- Args:
N_Aion_UB_tree (int): Number of Aion devices per Unit Board. N_FPGA (int): Number of FPGA devices on a Unit Board.
- Returns:
- tuple: A tuple containing:
list: How many Aion devices are managed by each FPGA on the Unit Board.
int: The maximum number of Aion devices managed by any FPGA on the Unit Board.
- adijif.plls.utils.adf4030_arch.Apollo_per_Aion_cascade(N_Apollo: int, N_Aion_UB_cascade: int) list
Calculate the number of Apollo devices per Aion in a cascade architecture.
For a cascade architecture, this function distributes Apollo devices among Aion devices on the Unit Board.
- Args:
N_Apollo (int): The number of Apollo devices per Unit Board. N_Aion_UB_cascade (int): The number of Aion devices per Unit Board.
- Returns:
list: A list containing the number of Apollo devices per Aion on the Unit Board.
- adijif.plls.utils.adf4030_arch.Apollo_per_Aion_tree(N_Apollo: int, N_Aion_UB_tree: int) list
Calculate the number of Apollo devices per Aion in a tree architecture.
For a tree architecture, this function distributes Apollo devices among Aion devices on the Unit Board.
- Args:
N_Apollo (int): The number of Apollo devices per Unit Board. N_Aion_UB_tree (int): The number of Aion devices per Unit Board.
- Returns:
list: A list containing the number of Apollo devices per Aion on the Unit Board.
- adijif.plls.utils.adf4030_arch._connect_aions_cascade(aions: list) list
Linear daisy chain: Aion_i -> Aion_{i+1}.
- adijif.plls.utils.adf4030_arch._connect_aions_hybrid(aions: list, N_branch: int) list
Cascade-of-trees: outer linear chain between branch roots.
Within each branch, a linear cascade from the branch root.
The inner “tree” is degenerate (one inner branch == linear), which is the natural fit when N_branch only controls the outer count.
- adijif.plls.utils.adf4030_arch._connect_aions_hybrid2(aions: list, N_branch: int) list
Tree-of-cascades: outer tree (root fans out to branch heads).
Within each branch, a linear cascade.
- adijif.plls.utils.adf4030_arch._connect_aions_tree(aions: list, N_branch: int) list
One root Aion (index 0); remaining Aions split across N_branch branches.
Each branch is a linear cascade hanging off the root.