RTL Design · Hard · SystemVerilog

Direct-Mapped Cache Controller

Integrate address decode, hit detection and miss handling into a compact direct-mapped cache controller.

Task

Accept a request, return data immediately on hits, mark writes dirty, and raise miss_start on misses. Hold busy while a miss transaction is outstanding.

Examples

Constraints

What this problem is testing

A strong answer translates the requirement into synthesizable state and combinational logic, states reset and update semantics precisely, and handles boundary conditions rather than only the nominal case.

Interview habit: before coding, state reset behavior, the state that must be stored, and the conditions that update each output.

Verification plan

Edge cases worth testing

Common mistakes

Interview follow-up questions

Concepts to review

cache, integration, memory controller

Open Direct-Mapped Cache Controller in the HDLForge interactive editor.

Related problems

Explore the RTL Design Practice & Interview Preparation hub.

Continue practising