# rgabriel26/fpga-cyclon-2-car-line-follower architecture

> Architecture diagram of the GitHub repository rgabriel26/fpga-cyclon-2-car-line-follower, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rgabriel26/fpga-cyclon-2-car-line-follower
- Repository: https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower

## Overview

This is a Quartus FPGA design for controlling a small car through three trials: a 10 m straight run, a 10-lap curve run that stops and counts laps, and endurance lap counting. The documented workflow uses five infrared sensors as the sole external data input. The graph preserves trial selection, motion control, timing/debounce, lap counting, and display. No source excerpts were supplied, so internal wiring is unverified; dashed, uncited edges indicate likely integration rather than confirmed calls or signal connections.

Main entry points: [`Proiect-GoDigital/main.bdf`](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/main.bdf) (FPGA top design), [`Proiect-GoDigital/Logica_miscare.v`](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/Logica_miscare.v) (Motion logic), [`Proiect-GoDigital/Selectie_proba.v`](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/Selectie_proba.v) (Trial selection), [`Proiect-GoDigital/START_STOP.bdf`](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/START_STOP.bdf) (Start / stop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Control and selection"]
  node_main["FPGA top design<br/>[main.bdf]"]
  node_trial["Trial selection<br/>[Selectie_proba.v]"]
  node_startstop["Start / stop<br/>[START_STOP.bdf]"]
end

subgraph group_motion["Motion and timing"]
  node_direction["Motion logic<br/>[Logica_miscare.v]"]
  node_debounce["Input debounce"]
  node_delay["Signal delay"]
  node_divfreq["Frequency divider"]
  node_div5["Rate divider 5<br/>[divizor_5.bdf]"]
  node_div10["Rate divider 10<br/>[divizor_10.bdf]"]
  node_div1000["Rate divider 1000<br/>[divizor_1000.bdf]"]
end

subgraph group_counting["Lap counting"]
  node_laps["Lap counter<br/>[count_ture.v]"]
  node_counter10["10-count stage<br/>[numarator_10.bdf]"]
  node_counter1000["1000-count stage<br/>[numarator_1000.bdf]"]
end

subgraph group_interface["Inputs and display"]
  node_display["Multiplexed display"]
end

node_sensors(("Infrared sensors"))
node_car(("Car"))

node_sensors -->|"supply inputs"| node_main
node_main -.->|"selects trial"| node_trial
node_main -.->|"controls run"| node_startstop
node_main -.->|"conditions inputs"| node_debounce
node_main -.->|"controls motion"| node_direction
node_direction -.->|"steers car"| node_car
node_main -.->|"uses timing"| node_delay
node_main -.->|"uses timing"| node_divfreq
node_main -.->|"uses timing"| node_div5
node_main -.->|"uses timing"| node_div10
node_main -.->|"uses timing"| node_div1000
node_main -.->|"counts laps"| node_laps
node_main -.->|"counts laps"| node_counter10
node_main -.->|"counts laps"| node_counter1000
node_main -.->|"drives display"| node_display

click node_main "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/main.bdf"
click node_trial "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/Selectie_proba.v"
click node_startstop "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/START_STOP.bdf"
click node_direction "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/Logica_miscare.v"
click node_debounce "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/sistem_debouncing.bdf"
click node_delay "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/intarziere_semnal.v"
click node_divfreq "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_frecventa.bdf"
click node_div5 "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_5.bdf"
click node_div10 "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_10.bdf"
click node_div1000 "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_1000.bdf"
click node_laps "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/count_ture.v"
click node_counter10 "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/numarator_10.bdf"
click node_counter1000 "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/numarator_1000.bdf"
click node_display "https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/afisare_multiplexata.v"

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,node_trial,node_startstop toneBlue
class node_direction,node_debounce,node_delay,node_divfreq,node_div5,node_div10,node_div1000 toneAmber
class node_laps,node_counter10,node_counter1000 toneMint
class node_display toneRose
class node_sensors,node_car toneIndigo
```

## Components

### Control and selection

- [FPGA top design](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/main.bdf): `Proiect-GoDigital/main.bdf`
- [Trial selection](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/Selectie_proba.v): `Proiect-GoDigital/Selectie_proba.v`
- [Start / stop](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/START_STOP.bdf): `Proiect-GoDigital/START_STOP.bdf`

### Motion and timing

- [Motion logic](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/Logica_miscare.v): `Proiect-GoDigital/Logica_miscare.v`
- [Input debounce](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/sistem_debouncing.bdf): `Proiect-GoDigital/sistem_debouncing.bdf`
- [Signal delay](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/intarziere_semnal.v): `Proiect-GoDigital/intarziere_semnal.v`
- [Frequency divider](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_frecventa.bdf): `Proiect-GoDigital/divizor_frecventa.bdf`
- [Rate divider 5](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_5.bdf): `Proiect-GoDigital/divizor_5.bdf`
- [Rate divider 10](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_10.bdf): `Proiect-GoDigital/divizor_10.bdf`
- [Rate divider 1000](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/divizor_1000.bdf): `Proiect-GoDigital/divizor_1000.bdf`

### Lap counting

- [Lap counter](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/count_ture.v): `Proiect-GoDigital/count_ture.v`
- [10-count stage](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/numarator_10.bdf): `Proiect-GoDigital/numarator_10.bdf`
- [1000-count stage](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/numarator_1000.bdf): `Proiect-GoDigital/numarator_1000.bdf`

### Inputs and display

- [Multiplexed display](https://github.com/rgabriel26/fpga-cyclon-2-car-line-follower/blob/master/Proiect-GoDigital/afisare_multiplexata.v): `Proiect-GoDigital/afisare_multiplexata.v`

### Other components

- **Infrared sensors**
- **Car**

## Connections

- Infrared sensors → FPGA top design: supply inputs (evidence: `README.md`)
- FPGA top design → Trial selection: selects trial
- FPGA top design → Start / stop: controls run
- FPGA top design → Input debounce: conditions inputs
- FPGA top design → Motion logic: controls motion
- Motion logic → Car: steers car
- FPGA top design → Signal delay: uses timing
- FPGA top design → Frequency divider: uses timing
- FPGA top design → Rate divider 5: uses timing
- FPGA top design → Rate divider 10: uses timing
- FPGA top design → Rate divider 1000: uses timing
- FPGA top design → Lap counter: counts laps
- FPGA top design → 10-count stage: counts laps
- FPGA top design → 1000-count stage: counts laps
- FPGA top design → Multiplexed display: drives display
