# mrvbeth/-distributeurcafe architecture

> Architecture diagram of the GitHub repository mrvbeth/-distributeurcafe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mrvbeth/-distributeurcafe
- Repository: https://github.com/mrvbeth/-distributeurcafe

## Overview

##### Project Type and Purpose
- This is a single-target FPGA design (“DistributeurCafe”) described in VHDL.
- Its purpose is to implement a “coffee‐dispenser” controller in hardware.

##### File Structure
Top-level files:
- DistributeurCafe.vhd     ← main VHDL source (plus .bak)
- DistributeurCafe.qsf     ← Quartus Pin & device constraints
- DistributeurCafe.qpf     ← Quartus project file
- DistributeurCafe.pof     ← generated FPGA programming file
- DistributeurCafe.pin     ← pin assignment file
- DistributeurCafe.vwf     ← waveform for simulation
- *.rpt, *.summary        ← synthesis/fit/asm/map/tan reports
Directories:
- db/                     ← Quartus compilation database & logs
- incremental_db/         ← per-partition compiled artifacts for incremental builds

##### Core Components
a. Source Layer
– VHDL modules (DistributeurCafe.vhd, any submodules)
– Constraint files (.qsf, .pin)
– Testbench/waveform (.vwf)
b. Toolchain Flow
– Simulation (ModelSim or built-in Quartus simulator)
– Synthesis (Quartus Synthesis → netlist)
– Fitter/Mapper (Fit → Placement & Routing)
– Assembler (ASM → .pof bitstream)
– Timing Analysis (TAN)
– Reports generation (fit.rpt, map.rpt, asm.rpt, tan.rpt)
c. Database & Incremental Compilation
– Master DB (db/)
– Partitioned DBs (incremental_db/compiled_partitions)

##### Relationships and Data Flows
1. VHDL + constraints → Simulation → waveform results
2. VHDL + constraints → Synthesis → netlist
3. Netlist → Fitter/Mapper → placed/routed design
4. Placed/routed design → Assembler → .pof bitstream
5. Bitstream → FPGA hardware
6. Each tool stage reads/writes into the project DB (db/) or incremental_db/.

##### Architectural Patterns
– Modular VHDL hierarchy (you may show top-level ‘DistributeurCafe’ and child blocks).
– Clear separation of “compile stages” vs. “physical implementation stages.”

##### Technology Stack
– Intel Quartus Prime (synthesis, fitter, assembler, timing)
– VHDL (RTL description)
– FPGA device (as specified in .qsf)
– (Optional) ModelSim or Quartus Simulator for functional verification

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Layer
    subgraph "Source Layer"
        VHDL["VHDL Sources\n(DistributeurCafe.vhd, DistributeurCafe.vhd.bak)"]:::sources
        Constraints["Constraints\n(DistributeurCafe.qsf, DistributeurCafe.pin)"]:::sources
        Waveform["Waveform/Testbench\n(DistributeurCafe.vwf)"]:::sources
    end

    %% Toolchain Flow
    subgraph "Toolchain Flow"
        Simulator["Simulator\n(ModelSim/Quartus)"]:::tools
        Synthesizer["Synthesizer\n(Quartus Synthesis)"]:::tools
        Fitter["Fitter/Mapper\n(Quartus Fit)"]:::tools
        Assembler["Assembler\n(Quartus ASM)"]:::tools
        Timing["Timing Analysis\n(Quartus TAN)"]:::tools
    end

    %% Outputs & Reports
    subgraph "Generated Outputs & Reports"
        WaveformOutput["Waveform Results\n(.vwf)"]:::outputs
        Netlist["Netlist\n(.vo/.edf)"]:::outputs
        PlacedDesign["Placed & Routed Design"]:::outputs
        Bitstream["Bitstream\n(.pof)"]:::outputs
        SimReports["Simulation Reports\n(DistributeurCafe.sim.rpt, db/DistributeurCafe.sim.*)"]:::outputs
        SynReports["Synthesis Reports\n(db/DistributeurCafe.cmp.*)"]:::outputs
        FitReports["Fitter Reports\n(DistributeurCafe.fit.rpt, db/DistributeurCafe.map.*)"]:::outputs
        AsmReports["Assembler Reports\n(DistributeurCafe.asm.rpt, db/DistributeurCafe.asm.*)"]:::outputs
        TanReports["Timing Reports\n(DistributeurCafe.tan.rpt, db/DistributeurCafe.tan.*)"]:::outputs
        FPGAHardware["FPGA Hardware"]:::outputs
    end

    %% Database Containers
    subgraph "Databases" 
        MasterDB["Master DB\n(db/)"]:::db
        IncDB["Incremental DB\n(incremental_db/compiled_partitions/)"]:::db
    end

    %% Data Flows
    VHDL -->|".vhd"| Simulator
    Constraints -->|".qsf/.pin"| Simulator
    Simulator -->|".vwf"| WaveformOutput
    Simulator -->|".sim data"| SimReports
    Simulator -->|reads/writes| MasterDB

    VHDL -->|".vhd"| Synthesizer
    Constraints -->|".qsf"| Synthesizer
    Synthesizer -->|".vo/.edf"| Netlist
    Synthesizer -->|reports| SynReports
    Synthesizer -->|reads/writes| MasterDB
    Synthesizer -->|inc compile| IncDB

    Netlist -->|".edf"| Fitter
    Fitter -->|"placed design"| PlacedDesign
    Fitter -->|reports| FitReports
    Fitter -->|reads/writes| MasterDB
    Fitter -->|inc compile| IncDB

    PlacedDesign -->|"placed design"| Assembler
    Assembler -->|".pof"| Bitstream
    Assembler -->|reports| AsmReports
    Assembler -->|reads/writes| MasterDB

    PlacedDesign -->|".edf"| Timing
    Timing -->|"timing data"| TanReports
    Timing -->|reads| MasterDB

    Bitstream -->|"load"| FPGAHardware

    %% Click Events
    click VHDL "https://github.com/mrvbeth/-distributeurcafe/blob/main/DistributeurCafe.vhd"
    click Constraints "https://github.com/mrvbeth/-distributeurcafe/blob/main/DistributeurCafe.qsf"
    click Waveform "https://github.com/mrvbeth/-distributeurcafe/blob/main/DistributeurCafe.vwf"
    click SimReports "https://github.com/mrvbeth/-distributeurcafe/blob/main/db/DistributeurCafe.sim.*"
    click SynReports "https://github.com/mrvbeth/-distributeurcafe/blob/main/db/DistributeurCafe.cmp.*"
    click FitReports "https://github.com/mrvbeth/-distributeurcafe/blob/main/DistributeurCafe.fit.rpt"
    click AsmReports "https://github.com/mrvbeth/-distributeurcafe/blob/main/DistributeurCafe.asm.rpt"
    click TanReports "https://github.com/mrvbeth/-distributeurcafe/blob/main/DistributeurCafe.tan.rpt"
    click MasterDB "https://github.com/mrvbeth/-distributeurcafe/tree/main/db/"
    click IncDB "https://github.com/mrvbeth/-distributeurcafe/tree/main/incremental_db/compiled_partitions/"

    %% Styles
    classDef sources fill:#add8e6,stroke:#000,stroke-width:1px;
    classDef tools fill:#90ee90,stroke:#000,stroke-width:1px;
    classDef outputs fill:#ffa500,stroke:#000,stroke-width:1px;
    classDef db fill:#d3d3d3,stroke:#000,stroke-width:1px;
```
