Thanks to visit codestin.com
Credit goes to github.com

Skip to content

meds-ee-uet/Configurable-Cache

Repository files navigation

CONFIGURABLE CACHE


Configurable Cache (SystemVerilog Implementation)

Parametric, synthesizable cache design with configurable associativity, block size, and replacement policies for learning and embedded systems.

LICENSE

Last updated: July 22, 2025
© 2025 Maktab-e-Digital Systems Lahore. Licensed under the Apache 2.0 License.


TOP LEVEL DIAGRAM

Directory Structure

cache-project/
│
├── direct-mapped-cache/
│   ├── docs/
│   ├── rtl/
│   ├── testbench/
│   └── modular-integration/
│       ├── rtl/
│       └── testbench/
│
├── 2-way-set-associative-cache/
│   ├── docs/
│   ├── rtl/
│   ├── testbench/
│   └── modular-integration/
│       ├── rtl/
│       └── testbench/
│
├── 4-way-set-associative-cache/
│   ├── rtl/
│   ├── testbench/
│   └── modular-integration/
│       ├── rtl/
│       └── testbench/
│
└── configurable-n-way-set-associative-cache/
    ├── rtl/
    ├── testbench/
    └── modular-integration/
        ├── rtl/
        └── testbench/

🧭 User Guide

The Configurable_N_Way_Set_Associative_Cache directory provides a flexible and parameterized implementation of a cache memory system.
It allows users to easily configure the cache associativity (number of ways), address width, block size, and other key architectural parameters.

a.Directory Overview

Inside the Configurable_N_Way_Set_Associative_Cache/ directory, you’ll find:

  • rtl/ – Contains the main SystemVerilog source files for the configurable cache design.
  • testbench/ – Includes verification modules and simulation files.
  • modular_integration/ – Provides integrated RTL and testbench files for simulation and synthesis.

b.Address Decoder Configuration

In the rtl/ folder, you will find a file named decoders.sv, which contains address decoding logic for multiple cache configurations:

  • 2-way set associative cache
  • 4-way set associative cache
  • 8-way set associative cache
  • 12-way set associative cache

Each decoder is implemented within the same file for convenience.
You can comment out the decoders that you are not using and enable only the one corresponding to your desired associativity.
This approach makes the cache module adaptable while keeping all decoding options in one place.


c.Parameter Configuration

A dedicated header file is included to make the design customizable.
This file defines important parameters that can be modified according to your system’s requirements.

Below is the example of parameters you can edit:

parameter int NUM_WAYS         = 4; // Must be a power of 2 (e.g., 2, 4, 8, 16)

Documentation

Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •