01
IFU/WBU ready deadlock
Fetch and writeback stalled because their ready signals depended on each other. Reworking the handshake logic around local buffered state and downstream acceptance removed the ready-signal loop.
Digital IC · RTL · SoC
I independently designed and implemented an RV32E processor with a five-stage pipeline and 2-bit branch prediction. The project also covers verification, SoC integration, instruction caching, synthesis and static timing analysis.
I implemented the NEMU instruction-set simulator as a differential-testing reference, then built the RV32E core in RTL. NEMU provides register and memory state for checking RTL execution. The core covers fetch, decode, execute, load/store and writeback.
The core evolved from a multi-cycle design through a two-stage pipeline experiment. After integration with ysyxSoC, differential testing and Verilator waveforms helped debug boot code, memory accesses, peripherals and control flow.

The current core implements five pipeline stages—fetch, decode, execute, memory access and writeback—with 2-bit branch prediction.
Earlier control-path debugging focused on stalls, redirects and variable-latency memory accesses. Fetch-request PCs and instruction-buffer PCs were stored separately, with explicit request and response tracking to keep instructions paired with the correct addresses.
RV32E integer arithmetic, logical, shift, branch, and jump instructions are decoded into control signals and executed in EXU. LSU turns load/store operations into bus transactions, while WBU selects arithmetic, load, or PC-related results.
CSR access, ECALL, MRET, and exception handling share redirect and state-control paths. FENCE.I synchronizes instruction fetches with earlier code writes; this implementation invalidates the instruction cache to fetch the updated code.
NEMU is the differential-testing reference for instruction-by-instruction comparisons of registers and execution state. ISA tests, riscv-tests and custom programs cover arithmetic, control flow, memory access and exceptions. When a mismatch appears, I inspect Verilator FST traces in GTKWave to locate handshake, bus-response or register-update issues.
RT-Thread also runs on the RTL CPU. This extends validation beyond isolated instructions to startup, interrupt, UART, memory mapping, and peripheral integration.

The CPU connects to SRAM, CLINT, UART, and peripherals through an AXI4-Lite interconnect. IFU and LSU traffic requires arbitration, address decoding, response routing, and a consistent memory map shared by boot software and hardware.
The instruction side uses a direct-mapped ICache with tag/index/offset addressing and a refill FSM. FENCE.I invalidates cache state to prevent stale instruction execution.
The RTL is taken through Yosys synthesis, iSTA static timing analysis, and Innovus exploration. Area reports guide structural inspection, while timing reports identify critical paths. ICache tag-comparator organization was specifically examined because it affects the fetch critical path.
Established a functional loop through multi-cycle control, differential testing, and waveform debug.
Integrated AXI4-Lite, peripherals, and ICache while resolving bus and control-flow issues.
Moved through synthesis, STA, and Innovus exploration to inspect area and critical paths.
01
Fetch and writeback stalled because their ready signals depended on each other. Reworking the handshake logic around local buffered state and downstream acceptance removed the ready-signal loop.
02
The current PC can change before an instruction request completes. The request PC is saved when issued and written into the instruction buffer with the returned instruction, keeping each instruction paired with its address.
03
Branches, jumps and exceptions can occur while instruction requests are still pending. Request-state and response-ownership tracking allow the core to discard instructions outside the current execution path.
04
Instruction-cache refills and load/store requests share an AXI channel. The arbiter records each request's source and routes returned data to the corresponding module, preserving response ownership under variable latency.
The table records cycles, retired instructions and IPC from an RT-Thread run on the earlier multi-cycle core.
Earlier multi-cycle version · RT-Thread run
| Cycles | 29,825,900 |
|---|---|
| Instructions retired | 590,845 |
| Instructions per cycle (IPC) | 0.0198 |
Further exploration includes a data cache (DCache), a network-on-chip (NoC) and multicore extensions, using the existing SoC and differential-testing environment.