# mars2050a/nexysa7-8-digit-7-segment-display-controller architecture

> Architecture diagram of the GitHub repository mars2050a/nexysa7-8-digit-7-segment-display-controller, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mars2050a/nexysa7-8-digit-7-segment-display-controller
- Repository: https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller

## Overview

This project lets a user enter eight decimal digits in a Qt desktop GUI and send them over a USB/UART serial connection to a Nexys A7 FPGA, which updates its multiplexed seven-segment display. The README documents the UART framing and FPGA stages; RTL excerpts were not supplied, so those internal links follow the documented integration rather than inspected calls. The GUI excerpt supports its digit-entry, serial configuration, transmit, logging, and receive-handling responsibilities.

Main entry points: [`Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp) (Main window), [`src/uart_receiver.v`](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/uart_receiver.v) (UART receiver), [`src/top.v`](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/top.v) (Eight-byte parser), [`src/seven_seg_driver.v`](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/seven_seg_driver.v) (Seven-segment scan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pc["Qt control app"]
  node_entry["Qt startup<br/>[main.cpp]"]
  node_window["Main window<br/>[mainwindow.cpp]"]
  node_digits["Digit controls<br/>[mainwindow.cpp]"]
  node_serial["Serial control<br/>[mainwindow.cpp]"]
  node_txlog["TX and RX log<br/>[mainwindow.cpp]"]
end

subgraph group_fpga["FPGA display pipeline"]
  node_uart["UART receiver<br/>[uart_receiver.v]"]
  node_parser["Eight-byte parser<br/>[top.v]"]
  node_display["Seven-segment scan<br/>[seven_seg_driver.v]"]
end

subgraph group_hardware["Board interface"]
  node_constraints["Pin constraints<br/>[system.xdc]"]
  node_board{{"Nexys A7"}}
  node_pcserial{{"USB/UART link"}}
end

node_user(("Operator"))

node_user -->|"operates"| node_window
node_entry -->|"creates"| node_window
node_window -->|"presents"| node_digits
node_window -->|"configures"| node_serial
node_window -->|"logs"| node_txlog
node_serial -->|"writes bytes"| node_pcserial
node_pcserial -.->|"delivers UART"| node_uart
node_uart -.->|"provides bytes"| node_parser
node_parser -.->|"updates digits"| node_display
node_display -.->|"drives display"| node_board
node_constraints -.->|"assigns pins"| node_board
node_uart -.->|"returns data"| node_pcserial
node_serial -->|"logs traffic"| node_txlog

click node_entry "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/main.cpp"
click node_window "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp"
click node_digits "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp"
click node_serial "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp"
click node_txlog "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp"
click node_uart "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/uart_receiver.v"
click node_parser "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/top.v"
click node_display "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/seven_seg_driver.v"
click node_constraints "https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/xdc/system.xdc"

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_entry,node_window,node_digits,node_serial,node_txlog toneBlue
class node_uart,node_parser,node_display toneAmber
class node_constraints,node_board,node_pcserial toneMint
class node_user toneIndigo
```

## Components

### Qt control app

- [Qt startup](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/main.cpp): `Qt_GUI/Drive_seven_segment_display_Qt_GUI/main.cpp`
- [Main window](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp): `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`
- [Digit controls](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp): `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`
- [Serial control](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp): `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`
- [TX and RX log](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp): `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`

### FPGA display pipeline

- [UART receiver](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/uart_receiver.v): `src/uart_receiver.v`
- [Eight-byte parser](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/top.v): `src/top.v`
- [Seven-segment scan](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/src/seven_seg_driver.v): `src/seven_seg_driver.v`

### Board interface

- [Pin constraints](https://github.com/mars2050a/nexysa7-8-digit-7-segment-display-controller/blob/main/xdc/system.xdc): `xdc/system.xdc`
- **Nexys A7**
- **USB/UART link**

### Other components

- **Operator**

## Connections

- Operator → Main window: operates (evidence: `README.md`)
- Qt startup → Main window: creates (evidence: `Qt_GUI/Drive_seven_segment_display_Qt_GUI/main.cpp`)
- Main window → Digit controls: presents (evidence: `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`)
- Main window → Serial control: configures (evidence: `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`)
- Main window → TX and RX log: logs (evidence: `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`)
- Serial control → USB/UART link: writes bytes (evidence: `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`)
- USB/UART link → UART receiver: delivers UART (evidence: `README.md`)
- UART receiver → Eight-byte parser: provides bytes (evidence: `README.md`)
- Eight-byte parser → Seven-segment scan: updates digits (evidence: `README.md`)
- Seven-segment scan → Nexys A7: drives display (evidence: `README.md`)
- Pin constraints → Nexys A7: assigns pins (evidence: `README.md`)
- UART receiver → USB/UART link: returns data (evidence: `README.md`)
- Serial control → TX and RX log: logs traffic (evidence: `Qt_GUI/Drive_seven_segment_display_Qt_GUI/mainwindow.cpp`)
