# devariwala2712/nanovate architecture

> Architecture diagram of the GitHub repository devariwala2712/nanovate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/devariwala2712/nanovate
- Repository: https://github.com/devariwala2712/nanovate

## Overview

Nanovate is a synthetic-data prototype for verifying SEM topology defects against CAD, with die-to-die and CNN baselines. The principal workflow calibrates from scribe patches, processes an SEM/CAD patch (alignment, optional stack denoising, SDF energy, then topology classification), and returns a verdict with reasons. The graph also preserves the synthetic testbed, baseline and validation/evaluation branches. Edges are grounded in the README, excerpts, or SOURCE INDEX references; unsampled implementation details are not expanded.

Main entry points: [`src/nanovate/pipeline.py`](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/pipeline.py) (Patch verdict pipeline), [`src/nanovate/testbed/dataset.py`](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/dataset.py) (Sample generation), [`src/nanovate/testbed/scribe.py`](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/scribe.py) (Scribe patches), [`experiments/harness.py`](https://github.com/devariwala2712/nanovate/blob/main/experiments/harness.py) (Evaluation harness)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_testbed["Synthetic Testbed"]
  node_cfg["Run configuration<br/>[config.py]"]
  node_layouts["CAD layouts<br/>[layouts.py]"]
  node_perturb["Wafer perturbations<br/>[perturb.py]"]
  node_sem["SEM rendering<br/>[sem.py]"]
  node_dataset["Sample generation<br/>[dataset.py]"]
  node_scribe["Scribe patches<br/>[scribe.py]"]
end

subgraph group_verifier["Topology Verifier"]
  node_calibration["Ridge calibration<br/>[calibration.py]"]
  node_pipeline["Patch verdict pipeline<br/>[pipeline.py]"]
  node_alignment["Alignment and SDF energy<br/>[align_sdf.py]"]
  node_lowrank["Stack denoising<br/>[lowrank.py]"]
  node_fields["Conductor fields<br/>[fields.py]"]
  node_localpers["Local persistence<br/>[localpers.py]"]
  node_topology["Topology verdict<br/>[topology.py]"]
  node_topoutils["Topology conventions<br/>[topo_utils.py]"]
end

subgraph group_baselines["Comparison Baselines"]
  node_d2d["Die-to-die baseline<br/>[die_to_die.py]"]
  node_cnn["CNN baseline<br/>[cnn.py]"]
end

subgraph group_evaluation["Validation and Evaluation"]
  node_selector["Config selection<br/>[select_config.py]"]
  node_harness["Evaluation harness<br/>[harness.py]"]
  node_expcommon["Experiment metrics<br/>[common.py]"]
end

node_user(("Experiment user"))

node_user -->|"generates samples"| node_dataset
node_cfg -->|"configures"| node_layouts
node_cfg -->|"configures"| node_dataset
node_layouts -->|"supplies CAD"| node_dataset
node_dataset -->|"perturbs CAD"| node_perturb
node_dataset -->|"renders images"| node_sem
node_scribe -->|"builds patches"| node_layouts
node_scribe -->|"applies LER"| node_perturb
node_scribe -->|"renders patches"| node_dataset
node_user -->|"provides calibration input"| node_scribe
node_scribe -->|"fits from patches"| node_calibration
node_user -->|"submits SEM and CAD"| node_pipeline
node_calibration -->|"provides calibration"| node_pipeline
node_pipeline -->|"aligns patch"| node_alignment
node_pipeline -->|"denoises stack"| node_lowrank
node_pipeline -->|"requests verdict"| node_topology
node_pipeline -->|"computes SDF energy"| node_alignment
node_topology -->|"uses field"| node_fields
node_topology -->|"uses persistence"| node_localpers
node_topology -->|"uses conventions"| node_topoutils
node_alignment -->|"estimates shift"| node_calibration
node_alignment -->|"uses window"| node_topoutils
node_harness -->|"evaluates verifier"| node_pipeline
node_harness -->|"evaluates baseline"| node_d2d
node_harness -->|"evaluates baseline"| node_cnn
node_selector -->|"selects settings"| node_pipeline
node_selector -->|"uses validation runs"| node_harness
node_harness -->|"uses metrics"| node_expcommon

click node_cfg "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/config.py"
click node_layouts "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/layouts.py"
click node_perturb "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/perturb.py"
click node_sem "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/sem.py"
click node_dataset "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/dataset.py"
click node_scribe "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/scribe.py"
click node_calibration "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/calibration.py"
click node_pipeline "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/pipeline.py"
click node_alignment "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/align_sdf.py"
click node_lowrank "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/lowrank.py"
click node_fields "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/fields.py"
click node_localpers "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/localpers.py"
click node_topology "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/topology.py"
click node_topoutils "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/topo_utils.py"
click node_d2d "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/baselines/die_to_die.py"
click node_cnn "https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/baselines/cnn.py"
click node_selector "https://github.com/devariwala2712/nanovate/blob/main/experiments/select_config.py"
click node_harness "https://github.com/devariwala2712/nanovate/blob/main/experiments/harness.py"
click node_expcommon "https://github.com/devariwala2712/nanovate/blob/main/experiments/common.py"

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_cfg,node_layouts,node_perturb,node_sem,node_dataset,node_scribe,node_user toneBlue
class node_calibration,node_pipeline,node_alignment,node_lowrank,node_fields,node_localpers,node_topology,node_topoutils toneAmber
class node_d2d,node_cnn toneMint
class node_selector,node_harness,node_expcommon toneRose
```

## Components

### Synthetic Testbed

- [Run configuration](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/config.py): `src/nanovate/config.py`
- [CAD layouts](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/layouts.py): `src/nanovate/testbed/layouts.py`
- [Wafer perturbations](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/perturb.py): `src/nanovate/testbed/perturb.py`
- [SEM rendering](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/sem.py): `src/nanovate/testbed/sem.py`
- [Sample generation](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/dataset.py): `src/nanovate/testbed/dataset.py`
- [Scribe patches](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/testbed/scribe.py): `src/nanovate/testbed/scribe.py`

### Topology Verifier

- [Ridge calibration](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/calibration.py): `src/nanovate/modules/calibration.py`
- [Patch verdict pipeline](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/pipeline.py): `src/nanovate/pipeline.py`
- [Alignment and SDF energy](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/align_sdf.py): `src/nanovate/modules/align_sdf.py`
- [Stack denoising](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/lowrank.py): `src/nanovate/modules/lowrank.py`
- [Conductor fields](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/fields.py): `src/nanovate/modules/fields.py`
- [Local persistence](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/localpers.py): `src/nanovate/modules/localpers.py`
- [Topology verdict](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/modules/topology.py): `src/nanovate/modules/topology.py`
- [Topology conventions](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/topo_utils.py): `src/nanovate/topo_utils.py`

### Comparison Baselines

- [Die-to-die baseline](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/baselines/die_to_die.py): `src/nanovate/baselines/die_to_die.py`
- [CNN baseline](https://github.com/devariwala2712/nanovate/blob/main/src/nanovate/baselines/cnn.py): `src/nanovate/baselines/cnn.py`

### Validation and Evaluation

- [Config selection](https://github.com/devariwala2712/nanovate/blob/main/experiments/select_config.py): `experiments/select_config.py`
- [Evaluation harness](https://github.com/devariwala2712/nanovate/blob/main/experiments/harness.py): `experiments/harness.py`
- [Experiment metrics](https://github.com/devariwala2712/nanovate/blob/main/experiments/common.py): `experiments/common.py`

### Other components

- **Experiment user**

## Connections

- Experiment user → Sample generation: generates samples
- Run configuration → CAD layouts: configures (evidence: `src/nanovate/testbed/layouts.py`)
- Run configuration → Sample generation: configures (evidence: `src/nanovate/testbed/dataset.py`)
- CAD layouts → Sample generation: supplies CAD (evidence: `src/nanovate/testbed/dataset.py`)
- Sample generation → Wafer perturbations: perturbs CAD (evidence: `src/nanovate/testbed/dataset.py`)
- Sample generation → SEM rendering: renders images (evidence: `src/nanovate/testbed/dataset.py`)
- Scribe patches → CAD layouts: builds patches (evidence: `src/nanovate/testbed/scribe.py`)
- Scribe patches → Wafer perturbations: applies LER (evidence: `src/nanovate/testbed/scribe.py`)
- Scribe patches → Sample generation: renders patches (evidence: `src/nanovate/testbed/scribe.py`)
- Experiment user → Scribe patches: provides calibration input
- Scribe patches → Ridge calibration: fits from patches
- Experiment user → Patch verdict pipeline: submits SEM and CAD
- Ridge calibration → Patch verdict pipeline: provides calibration (evidence: `src/nanovate/pipeline.py`)
- Patch verdict pipeline → Alignment and SDF energy: aligns patch (evidence: `src/nanovate/pipeline.py`)
- Patch verdict pipeline → Stack denoising: denoises stack (evidence: `src/nanovate/pipeline.py`)
- Patch verdict pipeline → Topology verdict: requests verdict (evidence: `src/nanovate/pipeline.py`)
- Patch verdict pipeline → Alignment and SDF energy: computes SDF energy (evidence: `src/nanovate/pipeline.py`)
- Topology verdict → Conductor fields: uses field (evidence: `src/nanovate/modules/topology.py`)
- Topology verdict → Local persistence: uses persistence (evidence: `src/nanovate/modules/topology.py`)
- Topology verdict → Topology conventions: uses conventions (evidence: `src/nanovate/modules/topology.py`)
- Alignment and SDF energy → Ridge calibration: estimates shift (evidence: `src/nanovate/modules/align_sdf.py`)
- Alignment and SDF energy → Topology conventions: uses window (evidence: `src/nanovate/modules/align_sdf.py`)
- Evaluation harness → Patch verdict pipeline: evaluates verifier (evidence: `experiments/harness.py`)
- Evaluation harness → Die-to-die baseline: evaluates baseline (evidence: `experiments/harness.py`)
- Evaluation harness → CNN baseline: evaluates baseline (evidence: `experiments/harness.py`)
- Config selection → Patch verdict pipeline: selects settings (evidence: `experiments/select_config.py`)
- Config selection → Evaluation harness: uses validation runs (evidence: `experiments/select_config.py`)
- Evaluation harness → Experiment metrics: uses metrics (evidence: `experiments/harness.py`)
