How pranjal9005/2-way-set-associative-cache works
This repository implements a read-only, 2-way set-associative cache in Verilog. A request enters the top-level cache; address decoding, tag comparison, hit/miss and way selection, and LRU state support the controller’s lookup and refill behavior. On a miss, the controller uses the behavioral backing memory’s ready handshake before responding. The README documents the module roles and top-level connections, but no RTL excerpts were available, so connections below are limited to those documented there.
Main entry points: cache_2way.v Cache top level · cache_controller.v Cache controller · main_memory.v Backing memory · address_decoder.v Address decoder
Components 9
Cache integration
- Cache top level
rtl/cache_2way.v - Cache controller
rtl/cache_controller.v
Lookup and selection
- Address decoder
rtl/address_decoder.v - Tag comparator
rtl/tag_comparator.v - Hit/miss selector
rtl/hit_miss_unit.v - LRU replacement
rtl/lru_unit.v
Cache and memory state
- Cache array
rtl/cache_array.v - Backing memory
rtl/main_memory.v
Other components
- Requesting client
Connections 9
- Requesting client → Cache top level: sends request
README.md - Cache top level → Cache controller: connects
README.md - Cache top level → Address decoder: connects
README.md - Cache top level → Tag comparator: connects
README.md - Cache top level → Hit/miss selector: connects
README.md - Cache top level → LRU replacement: connects
README.md - Cache top level → Cache array: connects
README.md - Cache top level → Backing memory: connects
README.md - Cache controller → Backing memory: requests refill
README.md