UVM RAL LIBRARY BUG OR

Hey guys!

I’m faced with problem in UVM RAL working with “byte enable interface”.

Prelude.

So let’s assume that we have 32bit AHB bus and we want to execute halfword read access to slave with addr encoding 0-.

So then our read data will be returned at [15:0] lane slice, high data [31:16] in this case not specified so it may contain garbage.

Problem.

File uvm_reg_predictor.svh

In analysis port we get our transfer and start bus2reg function where we did some encoding and return item with valid addr, data and byte_en;
Then when we use get_check_on_read() we did that staff:


              if (reg_item.kind == UVM_READ &&
                  local_map.get_check_on_read() &&
                  reg_item.status != UVM_NOT_OK) begin
                 void'(rg.do_check(ir.get_mirrored_value(), reg_item.value[0], local_map));
              end

Where reg_item.value[0] it’s full 32bit data from lane.

do_check(): check all fields from register.

But we have byte_en 'b0011 and we can have garbage in [31:16] bits. Why we check all fields there?

Any guess?

In reply to maxiale:

It is not easy to give you an answer, because most of the informations are missing, i.e. your testbench architecture with respect to the register model, the prediction mode etc.
But you are intructing your predictor to use the full item (reg_item.value[0]). This is what will be done.

In reply to chr_sue:

Explicit prediction ofc, because I’m write about predictor file.

It’s 32bit registers with 16bit fields. Byte enable support turned on.

If u can see uvm_reg_predictor.svh

reg_item.value[0] always will be used as full(observed) item in do_check function regardless byte_en.

In reply to maxiale:

I think byte strobe is only used for APB/AHB write transaction. APB/AHB read transaction will perform full 32 bits. That’s why we have the codes that you show in uvm_reg_predictor.

In reply to cuonghl:

But it’s not specified in AMBA. Slave can insert garbage in not used data fields. And as I think UVM implements not for AMBA only :)