AMBA APB verification

I am an m.tech student doing verification of AMBA APB with memory controller as slave .I have made memory controller with APB protocol as DUT and built a plain SV testbench environment with driver acting as master .While doing multiple write and read(writing different data at same address and reading latest data) ,multiple write is happening correctly ,but read data remains at x(don’t care).how could I debug this ?

Here are some things that you can try :

The first thing to check is if you are getting data from DUT prdata net. If that’s a no, then dig deeper and check if it’s flopped before sending out the value. Maybe the clock is different or wrong. Then check if the addressing scheme is right for your design. Maybe you are reading from a different address value. Or the read value was never assigned and hence turns up as X in simulation.

Some other stuff that you can try are:

  1. Turn on multi-dimensional array dump feature so that you can view such arrays. Helps debug faster.
  2. Load the waveform, pull the signals out and verify that the writes did happen. If you are programming the memory controller by writing values to its registers, you might want to check the signal values in the waveform.
  3. Check if you are following the APB read protocol.

Found some of this info from here