# nvidia/python-jetson architecture

> Architecture diagram of the GitHub repository nvidia/python-jetson, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nvidia/python-jetson
- Repository: https://github.com/nvidia/python-jetson

## Overview

This repository provides two Jetson utilities: board control over a supported baseboard’s FTDI interface, and demultiplexing Tegra Combined UART output into per-stream pseudo-terminals. The control workflow discovers a compatible device, issues button, EEPROM, or power-rail operations, and communicates through FTDI/I²C mechanisms. The demux workflow opens and configures a UART, routes tagged output to stream PTYs, and forwards PTY input back to the UART. CLI scripts are documented but not excerpted, so their links to implementation modules are unverified.

Main entry points: [`jetson/ftdi.py`](https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py) (Board controls), [`jetson/tcu.py`](https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py) (TCU demux), [`bin/jetson-control`](https://github.com/nvidia/python-jetson/blob/master/bin/jetson-control) (Control CLI), [`bin/jetson-demux`](https://github.com/nvidia/python-jetson/blob/master/bin/jetson-demux) (Demux CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Board control"]
  node_control_cli["Control CLI"]
  node_device_discovery["Device discovery<br/>[ftdi.py]"]
  node_board_control["Board controls<br/>[ftdi.py]"]
  node_button_control["Button control<br/>[ftdi.py]"]
  node_eeprom["EEPROM operations<br/>[ftdi.py]"]
  node_power_rails["Power rail status<br/>[ftdi.py]"]
end

subgraph group_demux["UART demux"]
  node_demux_cli["Demux CLI"]
  node_demux_runtime["TCU demux<br/>[tcu.py]"]
  node_stream["Tagged streams<br/>[tcu.py]"]
end

subgraph group_interfaces["Hardware interfaces"]
  node_tty["UART TTY<br/>[tcu.py]"]
  node_pty["Stream PTYs<br/>[tcu.py]"]
  node_ftdi_device["FTDI device"]
  node_uart["TCU UART"]
end

node_user(("Operator or script"))
node_terminal(("Terminal client"))

node_user -->|"invokes"| node_control_cli
node_control_cli -.->|"dispatches to"| node_device_discovery
node_device_discovery -.->|"discovers"| node_ftdi_device
node_control_cli -.->|"dispatches commands"| node_board_control
node_board_control -.->|"controls buttons"| node_button_control
node_board_control -.->|"handles EEPROM"| node_eeprom
node_board_control -.->|"queries rails"| node_power_rails
node_board_control -.->|"communicates via"| node_ftdi_device
node_user -->|"launches"| node_demux_cli
node_demux_cli -.->|"starts"| node_demux_runtime
node_demux_runtime -->|"opens and configures"| node_tty
node_tty -->|"reads and writes"| node_uart
node_demux_runtime -->|"creates"| node_stream
node_stream -->|"opens PTY"| node_pty
node_demux_runtime -->|"routes UART output"| node_stream
node_demux_runtime -->|"forwards PTY input"| node_tty
node_terminal -->|"connects to"| node_pty

click node_control_cli "https://github.com/nvidia/python-jetson/blob/master/bin/jetson-control"
click node_device_discovery "https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py"
click node_board_control "https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py"
click node_button_control "https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py"
click node_eeprom "https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py"
click node_power_rails "https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py"
click node_demux_cli "https://github.com/nvidia/python-jetson/blob/master/bin/jetson-demux"
click node_demux_runtime "https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py"
click node_tty "https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py"
click node_stream "https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py"
click node_pty "https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_control_cli,node_device_discovery,node_board_control,node_button_control,node_eeprom,node_power_rails,node_terminal toneBlue
class node_demux_cli,node_demux_runtime,node_stream toneAmber
class node_tty,node_pty,node_ftdi_device,node_uart toneMint
class node_user toneIndigo
```

## Components

### Board control

- [Control CLI](https://github.com/nvidia/python-jetson/blob/master/bin/jetson-control): `bin/jetson-control`
- [Device discovery](https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py): `jetson/ftdi.py`
- [Board controls](https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py): `jetson/ftdi.py`
- [Button control](https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py): `jetson/ftdi.py`
- [EEPROM operations](https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py): `jetson/ftdi.py`
- [Power rail status](https://github.com/nvidia/python-jetson/blob/master/jetson/ftdi.py): `jetson/ftdi.py`

### UART demux

- [Demux CLI](https://github.com/nvidia/python-jetson/blob/master/bin/jetson-demux): `bin/jetson-demux`
- [TCU demux](https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py): `jetson/tcu.py`
- [Tagged streams](https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py): `jetson/tcu.py`

### Hardware interfaces

- [UART TTY](https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py): `jetson/tcu.py`
- [Stream PTYs](https://github.com/nvidia/python-jetson/blob/master/jetson/tcu.py): `jetson/tcu.py`
- **FTDI device**
- **TCU UART**

### Other components

- **Operator or script**
- **Terminal client**

## Connections

- Operator or script → Control CLI: invokes (evidence: `README.md`)
- Control CLI → Device discovery: dispatches to
- Device discovery → FTDI device: discovers
- Control CLI → Board controls: dispatches commands
- Board controls → Button control: controls buttons (evidence: `jetson/ftdi.py`)
- Board controls → EEPROM operations: handles EEPROM (evidence: `jetson/ftdi.py`)
- Board controls → Power rail status: queries rails (evidence: `jetson/ftdi.py`)
- Board controls → FTDI device: communicates via
- Operator or script → Demux CLI: launches (evidence: `README.md`)
- Demux CLI → TCU demux: starts
- TCU demux → UART TTY: opens and configures (evidence: `jetson/tcu.py`)
- UART TTY → TCU UART: reads and writes (evidence: `jetson/tcu.py`)
- TCU demux → Tagged streams: creates (evidence: `jetson/tcu.py`)
- Tagged streams → Stream PTYs: opens PTY (evidence: `jetson/tcu.py`)
- TCU demux → Tagged streams: routes UART output (evidence: `jetson/tcu.py`)
- TCU demux → UART TTY: forwards PTY input (evidence: `jetson/tcu.py`)
- Terminal client → Stream PTYs: connects to (evidence: `README.md`)
