# nawfalmotii79/plfm_radar architecture

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

- Interactive diagram: https://gitdiagram.com/nawfalmotii79/plfm_radar
- Repository: https://github.com/nawfalmotii79/plfm_radar

## Overview

#### Purpose and Entry Points
AERIS-10 is an open hardware/software 10.5 GHz pulse-LFM phased-array radar, supporting a short-range patch-array variant and extended-range waveguide/PA variant. It is a multi-domain repository rather than a single deployable application. Primary operational entry points are STM32 firmware at `9_Firmware/9_1_Microcontroller/9_1_3_C_Cpp_Code/main.cpp`, FPGA top-level variants such as `9_Firmware/9_2_FPGA/radar_system_top.v`, and the active Python GUI path `9_Firmware/9_3_GUI/GUI_V7_PyQt.py`.

#### Physical RF and Board Architecture
The hardware decomposes into power, frequency synthesis, main processing/RF, PA, and antenna boards. Source schematics/layouts define the buildable hardware boundary: `4_Schematics and Boards Layout/4_6_Schematics/MainBoard/RADAR_Main_Board.sch`, `4_Schematics and Boards Layout/4_6_Schematics/FrequencySynthesizerBoard/Clocks_Freq_Synth_board.sch`, and `4_Schematics and Boards Layout/4_6_Schematics/PowerAmplifierBoard/RF_PA.sch`. Manufacturing handoff is separate in `4_Schematics and Boards Layout/4_7_Production Files/`.

#### Waveform, RF, and Beamforming Flow
The transmit path creates LFM chirps through DAC/FPGA control, synthesizes and upconverts RF, applies ADAR1000 phase steering across 16 elements, and drives either integrated front ends or external PA boards. The return path is phase-controlled, downconverted, and sampled by the ADC. Firmware device managers own synthesizer and beamformer configuration: `9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/adf4382a_manager.c` and `9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/ADAR1000_Manager.cpp`. Antenna implementations are distinct hardware options: `4_Schematics and Boards Layout/4_6_Schematics/Antennas/Patch/8x16/Patch_Anetnna_16_8.sch` and `4_Schematics and Boards Layout/4_6_Schematics/Antennas/Waveguide/DFSWA.dwg`.

#### FPGA Signal-Processing Plane
The FPGA is the real-time data plane: ADC capture feeds digital downconversion, CIC/FIR filtering and decimation, FFT/matched filtering, Doppler/MTI, and CFAR detection. `9_Firmware/9_2_FPGA/radar_receiver_final.v` integrates receive processing; core stages include `9_Firmware/9_2_FPGA/ddc_400m.v`, `9_Firmware/9_2_FPGA/matched_filter_processing_chain.v`, `9_Firmware/9_2_FPGA/doppler_processor.v`, and `9_Firmware/9_2_FPGA/cfar_ca.v`. Chirp/control generation is represented by `9_Firmware/9_2_FPGA/radar_transmitter.v` and `9_Firmware/9_2_FPGA/plfm_chirp_controller.v`.

#### Control, Safety, and Peripheral Plane
STM32F7 firmware sequences power, configures clocks/synthesizers/phase shifters, calibrates PA bias using ADC/DAC feedback, monitors thermal/current health, and manages GPS, IMU, motor, and USB-facing control. Persistent radar settings and USB protocol handling are centered in `9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/RadarSettings.cpp` and `9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/USBHandler.cpp`. This is the key safety boundary between host commands and high-power RF rails.

#### Host Interface and Visualization
FPGA output crosses a USB bridge interface (`9_Firmware/9_2_FPGA/usb_data_interface_ft2232h.v`) to the desktop GUI. V7 separates UI, hardware transport, processing/replay, and worker execution under `9_Firmware/9_3_GUI/v7/dashboard.py`, `9_Firmware/9_3_GUI/v7/hardware.py`, and `9_Firmware/9_3_GUI/v7/processing.py`; `9_Firmware/9_3_GUI/radar_protocol.py` is the host-side protocol boundary. The GUI combines detections with GPS/IMU context and map display.

#### Runtimes, Toolchains, and Verification
Target runtimes are STM32F7 bare-metal/no-OS C/C++, Xilinx Artix-7 FPGA Verilog, and Python 3.8+ desktop GUI/simulation tooling. FPGA builds use Vivado TCL flows, e.g. `9_Firmware/9_2_FPGA/scripts/50t/build_50t.tcl`; board targets include 50T, 200T, and TE0712/TE0713 variants. Hardware validation is supported by electromagnetic/RF simulations under `5_Simulations/`, while FPGA formal and regression assets reside in `9_Firmware/9_2_FPGA/formal/` and `9_Firmware/9_2_FPGA/run_regression.sh`.

Main entry points: [`4_Schematics and Boards Layout/4_6_Schematics/MainBoard/RADAR_Main_Board.sch`](https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/MainBoard/RADAR_Main_Board.sch) (Main RF board), [`9_Firmware/9_3_GUI/v7/hardware.py`](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/v7/hardware.py) (GUI transport layer), [`9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/adf4382a_manager.c`](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/adf4382a_manager.c) (Synthesizer and beamformer control), [`9_Firmware/9_2_FPGA/radar_system_top.v`](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_system_top.v) (FPGA top-level variants)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hardware["RF Hardware"]
  node_main_board["Main RF board<br/>schematic"]
  node_synth_board["Frequency synthesizer<br/>schematic"]
  node_pa_board["External PA board<br/>schematic<br/>[RF_PA.sch]"]
  node_patch_antenna["Patch array<br/>antenna design"]
  node_waveguide_antenna["Waveguide array<br/>antenna design<br/>[DFSWA.dwg]"]
  node_production["Manufacturing handoff<br/>production files"]
end

subgraph group_mcu["STM32 Control"]
  node_mcu_main{{"STM32 firmware<br/>C/C++ entry point<br/>[main.cpp]"}}
  node_device_managers["Synthesizer and beamformer control<br/>device drivers<br/>[adf4382a_manager.c]"]
  node_settings_usb["Settings and USB protocol<br/>control boundary<br/>[USBHandler.cpp]"]
end

subgraph group_fpga["Artix-7 Data Plane"]
  node_fpga_top{{"FPGA top-level variants<br/>Verilog integration<br/>[radar_system_top.v]"}}
  node_tx_chain["Chirp transmitter<br/>Verilog TX chain"]
  node_rx_chain["Receiver integration<br/>Verilog RX chain"]
  node_ddc["DDC and decimation<br/>Verilog DSP stage<br/>[ddc_400m.v]"]
  node_matched_doppler["Matched filter and Doppler<br/>Verilog DSP stage"]
  node_cfar["CFAR detections<br/>Verilog detector<br/>[cfar_ca.v]"]
  node_fpga_usb["FT2232H USB bridge<br/>Verilog interface"]
  node_vivado_build["Vivado 50T build<br/>FPGA build flow<br/>[build_50t.tcl]"]
end

subgraph group_host["Desktop Host"]
  node_gui{{"PyQt radar GUI<br/>Python entry point<br/>[GUI_V7_PyQt.py]"}}
  node_host_protocol["Host radar protocol<br/>Python protocol boundary<br/>[radar_protocol.py]"]
  node_gui_hardware["GUI transport layer<br/>Python hardware layer<br/>[hardware.py]"]
  node_gui_processing["GUI processing and replay<br/>Python processing layer<br/>[processing.py]"]
end

node_production -->|"manufactures"| node_main_board
node_main_board -->|"clocks and RF control"| node_synth_board
node_main_board -->|"TX drive"| node_pa_board
node_pa_board -->|"extended-range TX"| node_waveguide_antenna
node_main_board -->|"short-range RF path"| node_patch_antenna
node_mcu_main -->|"configures"| node_device_managers
node_mcu_main -->|"uses"| node_settings_usb
node_device_managers -->|"configures synthesizer and steering"| node_synth_board
node_device_managers -->|"controls RF and PA bias"| node_main_board
node_settings_usb -->|"control channel"| node_host_protocol
node_fpga_top -->|"instantiates"| node_tx_chain
node_fpga_top -->|"instantiates"| node_rx_chain
node_tx_chain -->|"DAC chirp control"| node_main_board
node_main_board -->|"ADC samples"| node_rx_chain
node_rx_chain -->|"captures IF"| node_ddc
node_ddc -->|"baseband samples"| node_matched_doppler
node_matched_doppler -->|"range-Doppler data"| node_cfar
node_cfar -->|"detections"| node_fpga_usb
node_fpga_usb -->|"USB data"| node_gui_hardware
node_gui -->|"controls"| node_gui_hardware
node_gui_hardware -->|"encodes commands"| node_host_protocol
node_gui_hardware -->|"streams captures"| node_gui_processing
node_gui_processing -->|"detections and replay"| node_gui
node_vivado_build -->|"builds"| node_fpga_top

click node_main_board "https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/MainBoard/RADAR_Main_Board.sch"
click node_synth_board "https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/FrequencySynthesizerBoard/Clocks_Freq_Synth_board.sch"
click node_pa_board "https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/PowerAmplifierBoard/RF_PA.sch"
click node_patch_antenna "https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/Antennas/Patch/8x16/Patch_Anetnna_16_8.sch"
click node_waveguide_antenna "https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/Antennas/Waveguide/DFSWA.dwg"
click node_mcu_main "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_3_C_Cpp_Code/main.cpp"
click node_device_managers "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/adf4382a_manager.c"
click node_settings_usb "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/USBHandler.cpp"
click node_fpga_top "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_system_top.v"
click node_tx_chain "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_transmitter.v"
click node_rx_chain "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_receiver_final.v"
click node_ddc "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/ddc_400m.v"
click node_matched_doppler "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/matched_filter_processing_chain.v"
click node_cfar "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/cfar_ca.v"
click node_fpga_usb "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/usb_data_interface_ft2232h.v"
click node_gui "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/GUI_V7_PyQt.py"
click node_host_protocol "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/radar_protocol.py"
click node_gui_hardware "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/v7/hardware.py"
click node_gui_processing "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/v7/processing.py"
click node_vivado_build "https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/scripts/50t/build_50t.tcl"

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_main_board,node_synth_board,node_pa_board,node_patch_antenna,node_waveguide_antenna,node_production toneBlue
class node_mcu_main,node_device_managers,node_settings_usb toneAmber
class node_fpga_top,node_tx_chain,node_rx_chain,node_ddc,node_matched_doppler,node_cfar,node_fpga_usb,node_vivado_build toneMint
class node_gui,node_host_protocol,node_gui_hardware,node_gui_processing toneRose
```

## Components

### RF Hardware

Buildable board and antenna designs.

- [Main RF board](https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/MainBoard/RADAR_Main_Board.sch): schematic · Integrates processing and RF interfaces. · `4_Schematics and Boards Layout/4_6_Schematics/MainBoard/RADAR_Main_Board.sch`
- [Frequency synthesizer](https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/FrequencySynthesizerBoard/Clocks_Freq_Synth_board.sch): schematic · `4_Schematics and Boards Layout/4_6_Schematics/FrequencySynthesizerBoard/Clocks_Freq_Synth_board.sch`
- [External PA board](https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/PowerAmplifierBoard/RF_PA.sch): schematic · Extended-range transmit option. · `4_Schematics and Boards Layout/4_6_Schematics/PowerAmplifierBoard/RF_PA.sch`
- [Patch array](https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/Antennas/Patch/8x16/Patch_Anetnna_16_8.sch): antenna design · Short-range antenna option. · `4_Schematics and Boards Layout/4_6_Schematics/Antennas/Patch/8x16/Patch_Anetnna_16_8.sch`
- [Waveguide array](https://github.com/nawfalmotii79/plfm_radar/blob/main/4_Schematics%20and%20Boards%20Layout/4_6_Schematics/Antennas/Waveguide/DFSWA.dwg): antenna design · Extended-range antenna option. · `4_Schematics and Boards Layout/4_6_Schematics/Antennas/Waveguide/DFSWA.dwg`
- **Manufacturing handoff**: production files

### STM32 Control

Safety and peripheral control plane.

- [STM32 firmware](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_3_C_Cpp_Code/main.cpp): C/C++ entry point · Sequences power, calibration, safety, and peripherals. · `9_Firmware/9_1_Microcontroller/9_1_3_C_Cpp_Code/main.cpp`
- [Synthesizer and beamformer control](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/adf4382a_manager.c): device drivers · Configures ADF4382A and ADAR1000 devices. · `9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/adf4382a_manager.c`
- [Settings and USB protocol](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/USBHandler.cpp): control boundary · Gates host commands before RF control. · `9_Firmware/9_1_Microcontroller/9_1_1_C_Cpp_Libraries/USBHandler.cpp`

### Artix-7 Data Plane

Real-time waveform and receive processing.

- [FPGA top-level variants](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_system_top.v): Verilog integration · Target-specific radar system integration. · `9_Firmware/9_2_FPGA/radar_system_top.v`
- [Chirp transmitter](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_transmitter.v): Verilog TX chain · Generates and controls pulse-LFM waveforms. · `9_Firmware/9_2_FPGA/radar_transmitter.v`
- [Receiver integration](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/radar_receiver_final.v): Verilog RX chain · Integrates capture through detection. · `9_Firmware/9_2_FPGA/radar_receiver_final.v`
- [DDC and decimation](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/ddc_400m.v): Verilog DSP stage · `9_Firmware/9_2_FPGA/ddc_400m.v`
- [Matched filter and Doppler](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/matched_filter_processing_chain.v): Verilog DSP stage · `9_Firmware/9_2_FPGA/matched_filter_processing_chain.v`
- [CFAR detections](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/cfar_ca.v): Verilog detector · `9_Firmware/9_2_FPGA/cfar_ca.v`
- [FT2232H USB bridge](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/usb_data_interface_ft2232h.v): Verilog interface · `9_Firmware/9_2_FPGA/usb_data_interface_ft2232h.v`
- [Vivado 50T build](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_2_FPGA/scripts/50t/build_50t.tcl): FPGA build flow · One of several supported FPGA targets. · `9_Firmware/9_2_FPGA/scripts/50t/build_50t.tcl`

### Desktop Host

Python control and visualization.

- [PyQt radar GUI](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/GUI_V7_PyQt.py): Python entry point · Displays detections, map, and sensor context. · `9_Firmware/9_3_GUI/GUI_V7_PyQt.py`
- [Host radar protocol](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/radar_protocol.py): Python protocol boundary · `9_Firmware/9_3_GUI/radar_protocol.py`
- [GUI transport layer](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/v7/hardware.py): Python hardware layer · `9_Firmware/9_3_GUI/v7/hardware.py`
- [GUI processing and replay](https://github.com/nawfalmotii79/plfm_radar/blob/main/9_Firmware/9_3_GUI/v7/processing.py): Python processing layer · `9_Firmware/9_3_GUI/v7/processing.py`

## Connections

- Manufacturing handoff → Main RF board: manufactures
- Main RF board → Frequency synthesizer: clocks and RF control
- Main RF board → External PA board: TX drive
- External PA board → Waveguide array: extended-range TX
- Main RF board → Patch array: short-range RF path
- STM32 firmware → Synthesizer and beamformer control: configures
- STM32 firmware → Settings and USB protocol: uses
- Synthesizer and beamformer control → Frequency synthesizer: configures synthesizer and steering
- Synthesizer and beamformer control → Main RF board: controls RF and PA bias
- Settings and USB protocol → Host radar protocol: control channel
- FPGA top-level variants → Chirp transmitter: instantiates
- FPGA top-level variants → Receiver integration: instantiates
- Chirp transmitter → Main RF board: DAC chirp control
- Main RF board → Receiver integration: ADC samples
- Receiver integration → DDC and decimation: captures IF
- DDC and decimation → Matched filter and Doppler: baseband samples
- Matched filter and Doppler → CFAR detections: range-Doppler data
- CFAR detections → FT2232H USB bridge: detections
- FT2232H USB bridge → GUI transport layer: USB data
- PyQt radar GUI → GUI transport layer: controls
- GUI transport layer → Host radar protocol: encodes commands
- GUI transport layer → GUI processing and replay: streams captures
- GUI processing and replay → PyQt radar GUI: detections and replay
- Vivado 50T build → FPGA top-level variants: builds
