Skip to content

RohithVeer/APB-MEMORY-UVM-VERIFICATION

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

APB Memory using UVM

1. Objective

The objective of this verification effort is to validate the functional correctness and protocol compliance of an APB-based memory design. The verification is performed using a UVM-based testbench acting as an APB master, ensuring adherence to the AMBA APB specification.


2. Scope of Verification

The following aspects are covered:

  • APB protocol timing and handshaking
  • Correct execution of write transactions
  • Correct execution of read transactions
  • Address decoding and data storage
  • Ready response behavior (PREADY)
  • Reset behavior
  • Identification of protocol and design issues

Out-of-scope:

  • APB error response (PSLVERR)
  • Power-aware or low-power verification
  • Performance benchmarking

3. Design Under Test (DUT)

The DUT is a parameterized APB memory module with the following interface signals: APB_DUT_Signals

Signal Direction Description
PCLK Input APB clock
PRESETn Input Active-low reset
PSEL Input Peripheral select
PENABLE Input Transfer enable
PWRITE Input Write control
PADDR Input Address bus
PWDATA Input Write data
PRDATA Output Read data
PREADY Output Ready signal

4. Verification Architecture

The verification environment is built using UVM and consists of:

  • APB Interface
    • Defines APB signals and clocking blocks
  • APB Agent
    • Driver: Drives APB read/write transactions
    • Sequencer: Generates transaction-level stimulus
    • Monitor: Observes and samples APB bus activity
  • Scoreboard
    • Stores written data
    • Collects read data for comparison and analysis
  • Environment
    • Integrates agent and scoreboard using configuration objects

5. Transaction Modeling

A transaction (apb_xtn) includes:

  • Address
  • Transaction type (READ / WRITE)
  • Write data
  • Read data

Transactions are generated using constrained-random and directed sequences.


6. Test Scenarios

The following test scenarios are implemented:

Test ID Scenario Description
TC_01 Single APB write transaction
TC_02 Single APB read transaction
TC_03 Write followed by read (same address)
TC_04 Multiple address write transactions
TC_05 Multiple address read transactions
TC_06 Back-to-back APB transfers
TC_07 Reset assertion and recovery

7. Functional Coverage Plan

Functional coverage is collected to measure verification completeness.

Coverage Points

  • Address coverage
  • Transaction type coverage (READ / WRITE)
  • Write data value ranges
  • Read data value ranges

Coverage is sampled in the APB monitor after successful transfers.


8. Protocol Assertions

Simple assertions are implemented to ensure APB protocol compliance:

  • PENABLE is asserted only after PSEL
  • PREADY is asserted only during valid APB transfers
  • Address and data stability during active transfer
  • PWRITE remains stable during a transfer

9. Error and Bug Detection

The verification process focuses on identifying:

  • APB protocol violations
  • Incorrect ready response behavior
  • Invalid read data behavior
  • Reset-related issues
  • Driver scheduling and return-to-idle issues

All observed issues are documented and analyzed using waveform inspection.


10. Bug Summary (Observed During Verification)

The following issues were identified during verification:

  • PRDATA tri-stated during non-read cycles (APB violation)
  • PREADY not gated with PSEL
  • Incorrect reset sensitivity list in DUT
  • Minor APB driver return-to-idle handling issues

These issues were documented and corrected or highlighted as part of the verification process.


11. Simulation and Tools

  • Simulator: Aldec Riviera-PRO 2023.04
  • Platform: EDA Playground
  • Language: SystemVerilog
  • Methodology: UVM 1.2

12. Completion Criteria

Verification is considered complete when:

  • All planned test scenarios are executed
  • APB protocol timing is verified via waveforms
  • Functional coverage goals are met
  • Identified bugs are documented
  • No unexpected simulation errors are observed

13. Results

Screenshot 2026-01-20 132813

14. References

About

APB Memory Verification using UVM with protocol checks and waveform analysis

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors