# aadarsh2812/parameterized-cache-memory-subsystem architecture

> Architecture diagram of the GitHub repository aadarsh2812/parameterized-cache-memory-subsystem, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aadarsh2812/parameterized-cache-memory-subsystem
- Repository: https://github.com/aadarsh2812/parameterized-cache-memory-subsystem

## Overview

This repository is a parameterized Verilog cache subsystem. The likely user workflow is a requester presenting cache operations to the RTL, which coordinates address/control decisions and cache data and metadata storage. The tree identifies the top-level, controller, datapath, arrays, and supporting modules, while the README describes configurable architecture and memory-array support. No RTL excerpts were available, so the internal connections below are dashed and unverified; the graph does not assert specific calls or signal routing.

Main entry points: [`rtl/cache_datapath.v`](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_datapath.v) (Datapath), [`rtl/cache_top.v`](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_top.v) (Cache Top), [`rtl/cache_controller.v`](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_controller.v) (Controller), [`rtl/cache_config.vh`](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_config.vh) (Cache Configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Cache Interface"]
  node_cache_top["Cache Top<br/>[cache_top.v]"]
  node_io_wrapper["I/O Wrapper"]
end

subgraph group_control["Control and Datapath"]
  node_controller["Controller<br/>[cache_controller.v]"]
  node_datapath["Datapath<br/>[cache_datapath.v]"]
  node_decoder["Address Decoder<br/>[address_decoder.v]"]
  node_comparator["Comparator<br/>[comparator.v]"]
  node_request_register["Request Register<br/>[request_register.v]"]
  node_mux["Mux<br/>[mux.v]"]
  node_cache_config["Cache Configuration<br/>[cache_config.vh]"]
end

subgraph group_storage["Cache Storage"]
  node_data_array[("Data Array<br/>[data_array.v]")]
  node_tag_array[("Tag Array<br/>[tag_array.v]")]
  node_valid_array[("Valid Array<br/>[valid_array.v]")]
  node_dirty_array[("Dirty Array<br/>[dirty_array.v]")]
end

node_requester(("Requester"))

node_requester -.->|"requests cache access"| node_cache_top
node_cache_top -.->|"interfaces through"| node_io_wrapper
node_cache_top -.->|"coordinates control"| node_controller
node_cache_top -.->|"uses datapath"| node_datapath
node_controller -.->|"decodes addresses"| node_decoder
node_controller -.->|"uses request state"| node_request_register
node_controller -.->|"checks tags"| node_comparator
node_datapath -.->|"selects data"| node_mux
node_datapath -.->|"accesses data"| node_data_array
node_datapath -.->|"accesses tags"| node_tag_array
node_datapath -.->|"uses valid bits"| node_valid_array
node_datapath -.->|"uses dirty bits"| node_dirty_array
node_cache_config -.->|"configures cache"| node_cache_top

click node_cache_top "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_top.v"
click node_io_wrapper "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_io_wrapper_sky130.v"
click node_controller "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_controller.v"
click node_datapath "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_datapath.v"
click node_decoder "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/address_decoder.v"
click node_comparator "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/comparator.v"
click node_request_register "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/request_register.v"
click node_mux "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/mux.v"
click node_cache_config "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_config.vh"
click node_data_array "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/data_array.v"
click node_tag_array "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/tag_array.v"
click node_valid_array "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/valid_array.v"
click node_dirty_array "https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/dirty_array.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_cache_top,node_io_wrapper toneBlue
class node_controller,node_datapath,node_decoder,node_comparator,node_request_register,node_mux,node_cache_config toneAmber
class node_data_array,node_tag_array,node_valid_array,node_dirty_array,node_requester toneMint
```

## Components

### Cache Interface

- [Cache Top](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_top.v): `rtl/cache_top.v`
- [I/O Wrapper](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_io_wrapper_sky130.v): `rtl/cache_io_wrapper_sky130.v`

### Control and Datapath

- [Controller](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_controller.v): `rtl/cache_controller.v`
- [Datapath](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_datapath.v): `rtl/cache_datapath.v`
- [Address Decoder](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/address_decoder.v): `rtl/address_decoder.v`
- [Comparator](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/comparator.v): `rtl/comparator.v`
- [Request Register](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/request_register.v): `rtl/request_register.v`
- [Mux](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/mux.v): `rtl/mux.v`
- [Cache Configuration](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/cache_config.vh): `rtl/cache_config.vh`

### Cache Storage

- [Data Array](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/data_array.v): `rtl/data_array.v`
- [Tag Array](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/tag_array.v): `rtl/tag_array.v`
- [Valid Array](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/valid_array.v): `rtl/valid_array.v`
- [Dirty Array](https://github.com/aadarsh2812/parameterized-cache-memory-subsystem/blob/main/rtl/dirty_array.v): `rtl/dirty_array.v`

### Other components

- **Requester**

## Connections

- Requester → Cache Top: requests cache access
- Cache Top → I/O Wrapper: interfaces through
- Cache Top → Controller: coordinates control
- Cache Top → Datapath: uses datapath
- Controller → Address Decoder: decodes addresses
- Controller → Request Register: uses request state
- Controller → Comparator: checks tags
- Datapath → Mux: selects data
- Datapath → Data Array: accesses data
- Datapath → Tag Array: accesses tags
- Datapath → Valid Array: uses valid bits
- Datapath → Dirty Array: uses dirty bits
- Cache Configuration → Cache Top: configures cache
