# marcel-szerszen/vhdl_projet_simon architecture

> Architecture diagram of the GitHub repository marcel-szerszen/vhdl_projet_simon, 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/marcel-szerszen/vhdl_projet_simon
- Repository: https://github.com/marcel-szerszen/vhdl_projet_simon

## Overview

This is an unfinished VHDL Simon game for a Nexys A7 FPGA. Its principal workflow generates a colour sequence, presents it, reads the player’s button choices, checks them, and advances the round or ends the game; a 7-segment chain provides a debug display. The repository also includes standalone RAM, FIFO, and UART blocks. Relationships are limited to those documented in the README; dashed edges mark planned or unverified interfaces. Source excerpts were not provided, so implementation-level call and signal details cannot be confirmed.

Main entry points: [`src/game/fsm_simon.vhd`](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/fsm_simon.vhd) (Game controller), [`src/display/mod_8_simon.vhd`](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/mod_8_simon.vhd) (Digit scanner), [`src/clocking/gestion_freq.vhd`](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/clocking/gestion_freq.vhd) (Clock enables), [`src/uart/full_uart_recv.vhd`](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/full_uart_recv.vhd) (UART memory chain)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game logic"]
  node_package["Shared game types<br/>[simon_pkg.vhd]"]
  node_rng["Random colour draw<br/>[tirage_03.vhd]"]
  node_fsm["Game controller<br/>[fsm_simon.vhd]"]
  node_input["Button reader<br/>[input_reader.vhd]"]
  node_compare["Input checker<br/>[compare_input.vhd]"]
end

subgraph group_display["7-segment display"]
  node_trans["Symbol encoder<br/>[trans_simon.vhd]"]
  node_scan["Digit scanner<br/>[mod_8_simon.vhd]"]
  node_mux["Segment multiplexer<br/>[mux_7_segments.vhd]"]
end

subgraph group_timing["Clocking"]
  node_freq["Clock enables<br/>[gestion_freq.vhd]"]
end

subgraph group_io["Memory and UART"]
  node_ram[("64×2 RAM<br/>[ram.vhd]")]
  node_fifo[("Synchronous FIFO<br/>[fifo.vhd]")]
  node_uart_full["UART memory chain<br/>[full_uart_recv.vhd]"]
  node_uart_recv["UART receiver<br/>[uart_recv.vhd]"]
  node_merger["Byte merger"]
  node_stop_counter["Address counter<br/>[stop_counter.vhd]"]
end

node_clock(("100 MHz clock"))
node_buttons(("Board buttons"))
node_segments(("7-segment display"))
node_vga(("VGA display"))
node_usb_uart(("USB-UART"))

node_clock -->|"drives"| node_freq
node_freq -->|"10 Hz enable"| node_rng
node_freq -->|"scan enable"| node_scan
node_rng -->|"random colour"| node_fsm
node_buttons -->|"starts game"| node_fsm
node_fsm -->|"sequence and round"| node_trans
node_scan -->|"scan digit"| node_mux
node_trans -->|"segment symbols"| node_mux
node_mux -->|"drives"| node_segments
node_scan -->|"anodes"| node_segments
node_fsm -.->|"game state"| node_vga
node_usb_uart -.->|"planned input"| node_uart_full
node_uart_full -.->|"planned writes"| node_ram
node_uart_full -.->|"planned writes"| node_fifo

click node_freq "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/clocking/gestion_freq.vhd"
click node_package "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/pkg/simon_pkg.vhd"
click node_rng "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/tirage_03.vhd"
click node_fsm "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/fsm_simon.vhd"
click node_input "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/input_reader.vhd"
click node_compare "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/compare_input.vhd"
click node_trans "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/trans_simon.vhd"
click node_scan "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/mod_8_simon.vhd"
click node_mux "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/mux_7_segments.vhd"
click node_ram "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/memory/ram.vhd"
click node_fifo "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/memory/fifo.vhd"
click node_uart_full "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/full_uart_recv.vhd"
click node_uart_recv "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/uart_recv.vhd"
click node_merger "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/merger_8b_to_16b.vhd"
click node_stop_counter "https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/stop_counter.vhd"

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_package,node_rng,node_fsm,node_input,node_compare toneBlue
class node_trans,node_scan,node_mux toneAmber
class node_freq toneMint
class node_ram,node_fifo,node_uart_full,node_uart_recv,node_merger,node_stop_counter toneRose
class node_clock,node_buttons,node_segments,node_vga,node_usb_uart toneIndigo
```

## Components

### Game logic

- [Shared game types](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/pkg/simon_pkg.vhd): `src/pkg/simon_pkg.vhd`
- [Random colour draw](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/tirage_03.vhd): `src/game/tirage_03.vhd`
- [Game controller](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/fsm_simon.vhd): `src/game/fsm_simon.vhd`
- [Button reader](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/input_reader.vhd): `src/game/input_reader.vhd`
- [Input checker](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/game/compare_input.vhd): `src/game/compare_input.vhd`

### 7-segment display

- [Symbol encoder](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/trans_simon.vhd): `src/display/trans_simon.vhd`
- [Digit scanner](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/mod_8_simon.vhd): `src/display/mod_8_simon.vhd`
- [Segment multiplexer](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/display/mux_7_segments.vhd): `src/display/mux_7_segments.vhd`

### Clocking

- [Clock enables](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/clocking/gestion_freq.vhd): `src/clocking/gestion_freq.vhd`

### Memory and UART

- [64×2 RAM](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/memory/ram.vhd): `src/memory/ram.vhd`
- [Synchronous FIFO](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/memory/fifo.vhd): `src/memory/fifo.vhd`
- [UART memory chain](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/full_uart_recv.vhd): `src/uart/full_uart_recv.vhd`
- [UART receiver](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/uart_recv.vhd): `src/uart/uart_recv.vhd`
- [Byte merger](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/merger_8b_to_16b.vhd): `src/uart/merger_8b_to_16b.vhd`
- [Address counter](https://github.com/marcel-szerszen/vhdl_projet_simon/blob/main/src/uart/stop_counter.vhd): `src/uart/stop_counter.vhd`

### Other components

- **100 MHz clock**
- **Board buttons**
- **7-segment display**
- **VGA display**
- **USB-UART**

## Connections

- 100 MHz clock → Clock enables: drives (evidence: `README.md`)
- Clock enables → Random colour draw: 10 Hz enable (evidence: `README.md`)
- Clock enables → Digit scanner: scan enable (evidence: `README.md`)
- Random colour draw → Game controller: random colour (evidence: `README.md`)
- Board buttons → Game controller: starts game (evidence: `README.md`)
- Game controller → Symbol encoder: sequence and round (evidence: `README.md`)
- Digit scanner → Segment multiplexer: scan digit (evidence: `README.md`)
- Symbol encoder → Segment multiplexer: segment symbols (evidence: `README.md`)
- Segment multiplexer → 7-segment display: drives (evidence: `README.md`)
- Digit scanner → 7-segment display: anodes (evidence: `README.md`)
- Game controller → VGA display: game state (evidence: `README.md`)
- USB-UART → UART memory chain: planned input (evidence: `README.md`)
- UART memory chain → 64×2 RAM: planned writes (evidence: `README.md`)
- UART memory chain → Synchronous FIFO: planned writes (evidence: `README.md`)
