# darshan-sai-m/async-freequency-divider architecture

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

- Interactive diagram: https://gitdiagram.com/darshan-sai-m/async-freequency-divider
- Repository: https://github.com/darshan-sai-m/async-freequency-divider

## Overview

This small Verilog RTL design divides an input clock by 16 using four toggle-mode JK flip-flop stages. The documented workflow is input clock/reset into the top-level divider, then a ripple chain of four flip-flops, producing the divided-clock output. The README documents these relationships; no source excerpts were provided. The testbench is excluded as simulation infrastructure.

Main entry points: [`Freequency_divider.v`](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/Freequency_divider.v) (fd divider), [`J-K_Flip-Flop.v`](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v) (JK stage 2)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_clock_source(("Clock and reset"))
node_divider["fd divider"]
node_stage1["JK stage 1<br/>[J-K_Flip-Flop.v]"]
node_stage2["JK stage 2<br/>[J-K_Flip-Flop.v]"]
node_stage3["JK stage 3<br/>[J-K_Flip-Flop.v]"]
node_stage4["JK stage 4<br/>[J-K_Flip-Flop.v]"]
node_output_consumer(("Output consumer"))

node_clock_source -->|"supplies clock/reset"| node_divider
node_divider -->|"instantiates"| node_stage1
node_divider -->|"instantiates"| node_stage2
node_divider -->|"instantiates"| node_stage3
node_divider -->|"instantiates"| node_stage4
node_stage1 -->|"clocks"| node_stage2
node_stage2 -->|"clocks"| node_stage3
node_stage3 -->|"clocks"| node_stage4
node_divider -->|"outputs divide-by-16"| node_output_consumer

click node_divider "https://github.com/darshan-sai-m/async-freequency-divider/blob/master/Freequency_divider.v"
click node_stage1 "https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v"
click node_stage2 "https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v"
click node_stage3 "https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v"
click node_stage4 "https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.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_clock_source,node_output_consumer toneIndigo
class node_divider,node_stage1,node_stage2,node_stage3,node_stage4 toneTeal
```

## Components

### Other components

- **Clock and reset**
- [fd divider](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/Freequency_divider.v): `Freequency_divider.v`
- [JK stage 1](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v): `J-K_Flip-Flop.v`
- [JK stage 2](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v): `J-K_Flip-Flop.v`
- [JK stage 3](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v): `J-K_Flip-Flop.v`
- [JK stage 4](https://github.com/darshan-sai-m/async-freequency-divider/blob/master/J-K_Flip-Flop.v): `J-K_Flip-Flop.v`
- **Output consumer**

## Connections

- Clock and reset → fd divider: supplies clock/reset (evidence: `README.md`)
- fd divider → JK stage 1: instantiates (evidence: `README.md`)
- fd divider → JK stage 2: instantiates (evidence: `README.md`)
- fd divider → JK stage 3: instantiates (evidence: `README.md`)
- fd divider → JK stage 4: instantiates (evidence: `README.md`)
- JK stage 1 → JK stage 2: clocks (evidence: `README.md`)
- JK stage 2 → JK stage 3: clocks (evidence: `README.md`)
- JK stage 3 → JK stage 4: clocks (evidence: `README.md`)
- fd divider → Output consumer: outputs divide-by-16 (evidence: `README.md`)
