# iic-jku/analog-circuit-design architecture

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

- Interactive diagram: https://gitdiagram.com/iic-jku/analog-circuit-design
- Repository: https://github.com/iic-jku/analog-circuit-design

## Overview

##### Main Components Identification

- Course Documentation & Content:
- This includes the main Quarto files (analog_circuit_design.qmd, index.qmd), and directories like “content” and “figures”.
- It covers the educational materials (theory, application notes, circuit theorems, design guidelines, and recipes).

- Circuit Simulation & Schematic Management:
- The “cace” directory contains simulation scripts, templates, and documentation related to specific circuits (like OTA designs).

- Sizing & Analysis:
- The “sizing” directory includes Jupyter notebooks (*.ipynb), MATLAB files, and reference PDFs that deal with transistor sizing, technology sweeps, and analysis.
- These materials explore how to train students to extract, plot, and analyze circuit parameters.

- Automation / CI/CD:
- GitHub Actions workflows (in “.github/workflows”) and the Quarto publishing config (“_quarto.yml”) indicate an automated publishing process for updating course material.
- Supporting script files (e.g., clean.sh, convertsch2svg.sh) help automate parts of the design-to-publish flow.

- External Tools Integration:
- The README notes integration with external tools such as Xschem for schematic entry, ngspice for simulation, and the IIC-OSIC-TOOLS Docker image that packages the PDK and toolchain.

##### Relationships and Interactions

- The Course Documentation serves as the reference and learning hub, linking directly to example circuits, simulation experiments, and design principles documented in “content” and “figures”.
- The “xschem” directory provides the circuit schematics that are referenced in the documentation and are used in conjunction with ngspice simulations.
- Simulation and sizing notebooks (in “sizing”) interact with the circuit designs and model parameters defined within the schematics.
- The “cace” module ties these materials together with standardized templates and automation scripts that prepare simulation reports and simulation files.
- CI/CD workflows ensure that when content is updated (via GitHub), the complete course material is republished automatically to the project site.

##### Architectural Patterns / Design Principles

- Modular Design: The project is split into self-contained modules – documentation, schematic designs, simulation analysis, and automation pipelines – each with a clear purpose and responsibility.
- Toolchain Integration: The design leverages established open-source tools (Xschem, ngspice, Docker) to maintain a clear separation between educational theory and practical simulation.
- Automated Publishing: The inclusion of GitHub Actions for Quarto publishing shows a pattern of continuous integration for documentation, ensuring the latest materials are always available.

##### Relevant Technologies and Frameworks

- Quarto: For documentation and publishing (files ending with *.qmd).
- GitHub Actions: For CI/CD (in the workflows directory).
- Xschem and ngspice: For circuit schematic entry and simulation.
- Jupyter Notebooks/ Python Scripts: For data analysis and sizing (files in “sizing” and “cace/scripts”).
- Docker (IIC-OSIC-TOOLS): For standardized toolchain integration.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Documentation & Course Content"
        Doc1["analog_circuit_design.qmd"]:::doc
        Doc2["index.qmd"]:::doc
        Doc3["content/"]:::doc
        Doc4["figures/"]:::doc
    end

    subgraph "Circuit Simulation & Schematic Management"
        Sim1["xschem/"]:::sim
        Sim2["cace/"]:::sim
    end

    subgraph "Circuit Sizing & Analysis"
        Siz1["sizing/"]:::siz
    end

    subgraph "Automation / CI/CD"
        Auto1[".github/workflows/quarto-publish.yml"]:::auto
        Auto2["_quarto.yml"]:::auto
        Auto3["clean.sh"]:::auto
        Auto4["convertsch2svg.sh"]:::auto
    end

    subgraph "External Tools Integration"
        Ext1["Xschem"]:::ext
        Ext2["ngspice"]:::ext
        Ext3["IIC-OSIC-TOOLS Docker"]:::ext
    end

    %% High-level interactions
    Doc1 -->|"references"| Sim1
    Sim1 -->|"feeds"| Siz1
    Siz1 -->|"updates"| Doc1
    Auto1 -->|"publishes"| Doc1
    Ext1 -->|"supports"| Sim1
    Ext1 -->|"supports"| Siz1

    %% Click Events
    click Doc1 "https://github.com/iic-jku/analog-circuit-design/blob/main/analog_circuit_design.qmd"
    click Doc2 "https://github.com/iic-jku/analog-circuit-design/blob/main/index.qmd"
    click Doc3 "https://github.com/iic-jku/analog-circuit-design/tree/main/content/"
    click Doc4 "https://github.com/iic-jku/analog-circuit-design/tree/main/figures/"
    click Sim1 "https://github.com/iic-jku/analog-circuit-design/tree/main/xschem/"
    click Sim2 "https://github.com/iic-jku/analog-circuit-design/tree/main/cace/"
    click Siz1 "https://github.com/iic-jku/analog-circuit-design/tree/main/sizing/"
    click Auto1 "https://github.com/iic-jku/analog-circuit-design/blob/main/.github/workflows/quarto-publish.yml"
    click Auto2 "https://github.com/iic-jku/analog-circuit-design/blob/main/_quarto.yml"
    click Auto3 "https://github.com/iic-jku/analog-circuit-design/blob/main/clean.sh"
    click Auto4 "https://github.com/iic-jku/analog-circuit-design/blob/main/convertsch2svg.sh"

    %% Styles
    classDef doc fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef sim fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef siz fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef auto fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef ext fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
```
