APB READ_TRANSFER

In reply to PJ:

In reply to PJ:
Hi,
In waveform transfers of apb protocol working fine,but there is a mistake in scoreboard expected and actual values.
apb_with_sb - EDA Playground
thanks,
pj

why is scoreboard giving error ,i m not getting the solution ,can anyone pls help

In reply to vlsique:

You should publish the EDAplayground page …

In reply to chr_sue:

Hi,

sorry for delay.

you can proceed now.

Thanks,
pj

In reply to PJ:
Your environment looks a little bit like quick & dirty. There are a few weaknesses:

(1) the ADDR_WIDTH is not consistent (8/32 bit)
(2) you are dealing in some components with the clocking block in others not
(3) if you want to compare x-values (undefined) you have to use the case equality (===). Changing this generates only passes.

I did not investigate where the x-values are coming from and if they are correct.

In reply to chr_sue:
Hi,

am getting zero when fifo rd operation,

Thanks,

In reply to PJ:

I had a closer look to your code. You are still doing strange things:
(1) in the driver you have on the left-hand side in the run_task the transaction object.
(2) in the monitor you are assigning the re in the same clock as the value from the vif.d_out to your transaction.

I do not know your protocol, but I believe there is more than 1 clock cycle in between. The d_out in the wave forms is always ‘x’.

In reply to PJ:

I was now looking in more detail.
You are reading from your uninitialized memory. This is really not useful, because it returns only x on your interface.
And I modified your monitor to:

task run_phase(uvm_phase phase);
    sequence_item transaction;
    transaction = sequence_item::type_id::create("transaction");
forever begin
  @ (posedge vif.clk);
  transaction.data_in = vif.din;
  transaction.wr_en = vif.wr_en;
  transaction.rd_en  = vif.rd_en;
  //transaction.data_ram = vif.mem;
  @ (posedge vif.clk);
  transaction.data_out = vif.dout;
  
  //$display("ram=%h",vif.mem);
  item_collected_port.write(transaction);
 `uvm_info("FIFO_MONITOR", $psprintf("Wrote transaction %s",transaction.convert2string()), UVM_LOW);
  end
   
  endtask:run_phase

See the additional clockedge befor vif.dout will be stored.

In reply to chr_sue:

Hi,

This is one tb block APB with FIFO,so now am working on it, FIFO working fine but apb get issue with read transfer it showing a zero value in scoreboard

Thanks,

In reply to PJ:

You see in the waveforms a ‘x’ and this is the indication something goes wrong with your design.
The mem is not initialized and then you are trying to read from this mem. First you should do some wr before reading.

In reply to chr_sue:

yah, i did it.in waveform prdata ok,but in scoreboard prdata not comming.

In reply to PJ:

You are extracting the rd-data at a wrong time. You have to adopt the run_phase to the right behavior.
BTW $Strobe does not exist but $strobe.

In reply to chr_sue:

okay if suppose ‘rdata’ wrong in time , it not coming into scoreboard,
it is showing zero in design also ,

In reply to PJ:

In the wave prdata is not always 0. During penable = 1, it contains the right data. Correct your monitor behavior, looking at the right time to the signal prdata.

In reply to chr_sue:

Hi,

i did the maximum changes in my monitor, but still getting one error ,when read at first time

Thanks,

In reply to PJ:

It works fine for me. Could you please your edaplayground.

In reply to chr_sue:

In reply to PJ:

Now you have 1 clock cycle too m uch in your monitor. Look to line 244 and comment out this clock delay like this

  //     @ (this.vif.monitor_cb);
      if(tr.apb_cmd == 0)begin
         tr.data = this.vif.monitor_cb.pwdata;
       end
        else 
         tr.data = this.vif.monitor_cb.prdata;

Then you’ll see the perfect run.

In reply to chr_sue:

Thank you,
but we are getting data zero for that right.

simulation output:-

      ACTUAL=addr=45779231 **data=0** apb_cmd=1 EXPECTED=addr=45779231  **data=0** apb_cmd=1

In reply to PJ:

The question is not that the data is 0, because you do not exclude the generation of data = 0. What counts is the expected value is equal to the actual. And this happens.

In reply to PJ:

Hi,
It showing “You do not have permisison to view this page”
on opening edalink
Can u make it public to view other