How suresh-kumar-21/parameterized-cache-memory-subsystem works
This repository implements a parameterized Verilog cache subsystem with direct-mapped and 2-way set-associative designs. The principal workflow is a memory request entering a cache, being decoded and checked for a hit or miss, then being served from cached data or handled through refill and, when needed, dirty-line write-back. The 2-way design adds LRU victim selection. The README documents these capabilities and benchmark comparisons, but no RTL excerpts were provided, so internal call and data-transfer edges are marked unverified rather than inferred as confirmed wiring.
Main entry points: cache_datapath.v Cache Datapath · cache_datapath_2way.v 2-Way Datapath · cache_top_2way.v 2-Way Cache · cache_top.v Direct-Mapped Cache
Components 16
Cache Architectures
- Direct-Mapped Cache
rtl/cache_top.v - 2-Way Cache
rtl/cache_top_2way.v
Request Control
- Cache Controller
rtl/cache_controller.v - Request Register
rtl/request_register.v - Address Decoder
rtl/address_decoder.v - 2-Way Decoder
rtl/address_decoder_2way.v - Tag Comparators
rtl/comparator.v
Cache State
- Cache Datapath
rtl/cache_datapath.v - 2-Way Datapath
rtl/cache_datapath_2way.v - Tag Arrays
rtl/tag_array.v - Valid Arrays
rtl/valid_array.v - Dirty Arrays
rtl/dirty_array.v - Data Arrays
rtl/data_array.v
Replacement Policy
- LRU State
rtl/lru_array.v
Other components
- Requesting System
- Backing Memory
Connections 24
- Requesting System → Direct-Mapped Cache: issues request
- Requesting System → 2-Way Cache: issues request
- Direct-Mapped Cache → Requesting System: returns result
- 2-Way Cache → Requesting System: returns result
- Direct-Mapped Cache → Backing Memory: refills / writes back
- 2-Way Cache → Backing Memory: refills / writes back
- Direct-Mapped Cache → Cache Controller: controls requests
- 2-Way Cache → Cache Controller: controls requests
- Direct-Mapped Cache → Cache Datapath: uses datapath
- 2-Way Cache → 2-Way Datapath: uses datapath
- Cache Controller → Request Register: captures request
- Cache Datapath → Address Decoder: decodes address
- 2-Way Datapath → 2-Way Decoder: decodes address
- Cache Datapath → Tag Arrays: checks tags
- 2-Way Datapath → Tag Arrays: checks tags
- Cache Datapath → Valid Arrays: checks validity
- 2-Way Datapath → Valid Arrays: checks validity
- Cache Datapath → Dirty Arrays: tracks dirty lines
- 2-Way Datapath → Dirty Arrays: tracks dirty lines
- Cache Datapath → Data Arrays: reads / writes data
- 2-Way Datapath → Data Arrays: reads / writes data
- Cache Datapath → Tag Comparators: detects hit
- 2-Way Datapath → Tag Comparators: detects hit
- 2-Way Cache → LRU State: selects victim