# analogdevicesinc/hdl architecture

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

- Interactive diagram: https://gitdiagram.com/analogdevicesinc/hdl
- Repository: https://github.com/analogdevicesinc/hdl

## Overview

This repository is a very large, multi‐component FPGA HDL reference design library, containing both IP core libraries and many example projects (“reference designs”) for different boards and FPGA toolchains (Xilinx and Intel). The HDL code is organized into many directories (for example, “library” for HDL modules and “projects” for board–specific implementations, plus “docs” and “scripts” for documentation and build automation). The README shows that the purpose is to support development of FPGA systems by providing ready-to‐use HDL modules (in Verilog or VHDL), along with the Tcl scripts and Makefiles to integrate these modules with the supported vendor tool-chains (Vivado, Quartus) and generate bitstreams. There is also integration for continuous integration builds and documentation using Sphinx.

##### Major Components
- HDL Libraries: Represent “library” and “common” directories – these hold the reusable IP cores (e.g., ADC interfacing cores, JESD204 IPs, clock generators, and DMA interfaces) and test benches.
- Project/Reference Designs: Represent the “projects” directory that contains individual board designs, which in turn are segregated by board family (e.g., fmcomms2, ad35xxr_evb, etc.) and by toolchain (Xilinx “zed”, Intel “de10nano”, etc.). They also contain board-specific constraints (constr files and tcl scripts).
- Build/Automation Infrastructure: The repository extensively uses GNU Make, Tcl scripts, and CI workflows (under “.github/workflows” and “scripts”). This should be shown as a component that “orchestrates” the build, synthesis and simulation flows.
- Documentation: The “docs” directory (with Sphinx-based documentation) and the published GitHub Pages site.

##### Relationships and Interactions
- That the Makefiles and Tcl scripts in each project, along with the centralized build scripts (in “scripts” and CI workflows), mediate between the source HDL code and the FPGA synthesis/implementation flow.
- That the documentation system pulls information and examples (from “docs” and README) to form user guides.
- Bi-directional flow between design source (in library and projects) and external build tools (Vivado/Quartus) where constraints are fed in and bitstream outputs are produced.

##### Architectural Patterns / Design Principles
- Modular design – many independent IP cores are provided which are intended to be reused across multiple projects.
- Separation of concerns – library for hardware IP, projects for board integration, scripts for automation, and docs for guidelines.
- Cross-toolchain support – splitting designs into Xilinx-specific projects (often found under “zed”, “xc7”, “zc706”, etc.) and Intel-specific projects (like “de10nano”, “a10soc”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    HL["HDL IP Libraries"]:::hdl
    PR["Board-Specific Projects"]:::proj
    DOC["Documentation System"]:::doc
    FT["FPGA Toolchain (Vivado/Quartus)"]:::tool
    BSOUT["Hardware Bitstream"]:::result

    subgraph "Build & Automation Infrastructure"
        BS["Automation Scripts"]:::build
        CI["Makefile"]:::build
        CIW["CI Workflows"]:::build
    end

    HL -->|"provides_IP"| PR
    HL -->|"buildInput"| BS
    PR -->|"buildInput"| CI
    BS -->|"triggers"| FT
    CI -->|"triggers"| FT
    CIW -->|"triggers"| FT
    FT -->|"generates"| BSOUT

    HL -->|"docSource"| DOC
    PR -->|"docSource"| DOC

    click HL "https://github.com/analogdevicesinc/hdl/tree/main/library"
    click PR "https://github.com/analogdevicesinc/hdl/tree/main/projects"
    click BS "https://github.com/analogdevicesinc/hdl/tree/main/scripts"
    click CI "https://github.com/analogdevicesinc/hdl/tree/main/Makefile"
    click CIW "https://github.com/analogdevicesinc/hdl/tree/main/.github/workflows"
    click DOC "https://github.com/analogdevicesinc/hdl/tree/main/docs"

    classDef hdl fill:#ADD8E6,stroke:#000,color:#000;
    classDef proj fill:#90EE90,stroke:#000,color:#000;
    classDef build fill:#FFA500,stroke:#000,color:#000;
    classDef doc fill:#DA70D6,stroke:#000,color:#000;
    classDef tool fill:#FF6347,stroke:#000,color:#000;
    classDef result fill:#F4A460,stroke:#000,color:#000;
```
