Design and simulation of a configurable Cache Memory system implementing multiple mapping techniques using Verilog HDL and Xilinx ISE.
Bangalore Institute of Technology | Mini Project 2024-25
Domain: Digital Design & Memory Architecture
Tools: Verilog HDL, Xilinx ISE
This project implements a Cache Memory System in Verilog HDL that supports multiple mapping techniques. The design bridges the performance gap between the CPU and main memory by implementing efficient cache architecture with configurable mapping modes controlled by a Way Controller Unit.
| Memory | Size |
|---|---|
| Main Memory | 512 MB |
| Cache Memory | 512 KB |
| Block Size | 64 Bytes |
| CPU Address Width | 29 bits |
CPU Address [28:0]
│
▼
┌───────────────────┐
│ Way Controller │ ← way_control[1:0]
│ Unit │
└─────────┬─────────┘
│
┌─────┴──────┐
│ Mapping │
│ Selection │
└─────┬──────┘
│
┌───────┼───────────┐
│ │ │
Direct 2-Way 4-Way 8-Way
Mapping Mapping Mapping Mapping
512KB 2×256KB 4×128KB 8×64KB
| Way Control Bits | Cache Mode | Cache Size per Set |
|---|---|---|
00 |
Direct Mapping | 512 KB (single bank) |
01 |
2-Way Set Associative | 256 KB × 2 sets |
10 |
4-Way Set Associative | 128 KB × 4 sets |
11 |
8-Way Set Associative | 64 KB × 8 sets |
| Bits | Field | Description |
|---|---|---|
| [28:19] | Tag bits | Identifies main memory block |
| [18:6] | Cache Index | Selects cache line |
| [5:0] | Offset | Byte within cache block |
- ✅ Configurable mapping via Way Controller Unit
- ✅ Direct Mapping — fast, simple, single comparison
- ✅ 2-Way Set Associative — reduced conflict misses
- ✅ 4-Way Set Associative — balanced performance
- ✅ 8-Way Set Associative — highest hit rate
- ✅ Hit/Miss detection logic
- ✅ Read/Write enable control
- ✅ Reset functionality
- ✅ Simulated and verified with Xilinx ISE waveforms
All four mapping configurations were successfully simulated and verified:
| Mapping | RTL Verified | Waveform Verified |
|---|---|---|
| Direct Mapping | ✅ | ✅ |
| 2-Way Mapping | ✅ | ✅ |
| 4-Way Mapping | ✅ | ✅ |
| 8-Way Mapping | ✅ | ✅ |
Simulation results demonstrated reduced memory access latency and optimized hit rates across all mapping configurations.
- Language: Verilog HDL
- Tool: Xilinx ISE Design Suite
- Simulation: Xilinx ISim
- University: Bangalore Institute of Technology (VTU)
| File | Description |
|---|---|
Mini_project_report.pdf |
Complete project report |
- Extend to multi-level cache (L1, L2, L3)
- Implement advanced replacement policies (LFU, ML-based)
- Add ECC (Error Correcting Code) for data integrity
- Energy-efficient implementation using gated clocking
- Parameterized Verilog for dynamic cache configuration
Smriti Subramaniam (1BI22VL047)
Thanishqka P (1BI22VL051)
- 🎓 B.E. Electronics Engineering (VLSI Design & Technology)
- 🏫 Bangalore Institute of Technology, Bangalore
- 📧 theppss3006@gmail.com
- 🔗 GitHub
Guide: Mrs. Lavanya Y S, Asst. Professor, Dept. of EE(VDT), BIT
This project was developed for academic purposes at Bangalore Institute of Technology under Visvesvaraya Technological University (VTU), 2024-25.