This repository features the RTL mapping and memory interface logic of a 2-way set-associative cache controller, engineered to perform high-speed access resolution against a dual-bank SRAM topology.
graph LR
CPU((CPU Memory Trace)) --> A[Cache Controller Interface]
A -->|Tag/Index| B{Set Checker}
B -->|Hit| C[SRAM Way 0]
B -->|Hit| D[SRAM Way 1]
C --> E[Data Output Mux]
D --> E
B -->|Miss| F[Eviction Logic]
- Way-Selection Logic: Valid bits integration within raw payload wrappers natively enforces write-enable flags against arbitrary index vectors to reduce combinatorial path delays.
- Static SRAM Instantiation: To maintain deterministic cycle behavior over dynamic memory generation, identical
single_port_sramprimitives are instantiated rigidly to serve independent logical mapped 'ways'.
Run the functional testbench leveraging standard Verilog discrete clock manipulations:
iverilog -o cache_sim rtl/cache_controller.v tb/cache_controller_tb.v
vvp cache_sim- Hardware level associative memory resolving mappings.
- Data path propagation delay analysis for combinatorial read-assert blocks.
- Synchronous Multi-memory instantiations mimicking SoC behavior models.