This repository contains a SystemVerilog implementation of an APB-compliant RAM along with a complete UVM-based verification environment.
The project demonstrates both RTL design and protocol-level verification for the AMBA APB bus.
It is intended as a learning and reference project for VLSI students and engineers practicing bus protocols, constrained-random verification, and UVM architecture.
- Protocol: AMBA APB
- Memory: 32 locations × 32-bit wide
- Address Range: 0–31 (out-of-range accesses generate slave error)
- Reset: Active-low (
presetn) - Clock:
pclk
- Supports read and write transactions
- Implements APB protocol phases:
- IDLE
- SETUP
- ACCESS
- TRANSFER
- Generates
PSLVERRfor invalid addresses - Uses
PREADYfor transaction completion - Synchronous design with clean state transitions
-
apb_ram- Finite State Machine (FSM) controlling APB phases
- Internal memory array (
mem[32]) - Address checking and error handling
-
apb_if- APB interface abstraction for UVM connectivity
The verification environment is fully UVM-compliant and includes:
- Transaction: APB transaction with constrained fields
- Sequences:
- Write transactions
- Read transactions
- Write followed by read
- Bulk write and bulk read
- Error injection (invalid address access)
- Reset testing
- Driver: Drives APB protocol signals
- Monitor: Observes bus activity
- Scoreboard: Verifies read/write correctness
- Agent: Active APB agent
- Environment: Connects agent and scoreboard
- Test: Controls sequence execution
- Valid write and read operations
- Read-after-write data integrity checks
- Bulk memory access
- Invalid address access (slave error detection)
- Reset behavior validation
- Protocol-compliant handshaking
- Open EDA Playground
- Select SystemVerilog + UVM
- Paste the RTL and UVM code
- Run the simulation
- Observe UVM logs and waveform (
dump.vcd)
Compatible with:
- Questa / ModelSim
- VCS
- Xcelium
vsim -c tb -do "run -all"