UVM-Connect Strange response!

Hello Everyone,

Using uvm-connect to communicate between SystemC and SystemVerilog using generic payload.

UVM-SV agent generates a b_transport call for SC model, SC updates the gp and returning in SV world the contents are printed with correct value proceeding ‘x’ while response empty as “”.

Transaction send by SV world to SC: Sending to SC by SV

UVM_INFO tlm2sv_adapter.svh(171) @ 8565.000000 ns --: uvm_test_top.m_env.m_tlm2sv_adapter [tlm2sv_adapter] T3 Init send to Model


Name Type Size Value

t3_i uvm_tlm_generic_payload - @23529
address integral 64 'h0
command uvm_tlm_command_e 32 UVM_TLM_READ_COMMAND
response_status uvm_tlm_response_status_e 32 UVM_TLM_INCOMPLETE_RESPONSE
streaming_width integral 32 'h0
data darray(byte) 4 -
[0] byte 8 'h00
[1] byte 8 'h01
[2] byte 8 'h02
[3] byte 8 'h03
extensions aa(obj,obj) 0 -

Transaction updated by SC and printed in SC:

			SYSTEMC TLM PRINTER@0.000008565

COMMAND: TLM_READ_COMMAND
ADDRESS: 0x0
LENGTH: 04
STREAMING_WIDTH: 00
RESPONSE: TLM_OK_RESPONSE
DATA[0]: 0x00
DATA[1]: 0x01
DATA[2]: 0x02
DATA[3]: 0x03

Transaction updated by SC and printed in SV: Returned by SC to SV
UVM_INFO tlm2sv_adapter.svh(173) @ 8565.000000 ns --: uvm_test_top.m_env.m_tlm2sv_adapter [tlm2sv_adapter] T3 Init updated by Model


Name Type Size Value

t3_i uvm_tlm_generic_payload - @23529
address integral 64 'h0
command uvm_tlm_command_e 32 UVM_TLM_READ_COMMAND
response_status uvm_tlm_response_status_e 32 “”
streaming_width integral 32 'h0
data darray(byte) 4 -
[0] byte 8 'h00 x
[1] byte 8 'h01 x
[2] byte 8 'h02 x
[3] byte 8 'h03 x
extensions aa(obj,obj) 0 -

UVM_INFO /sv/src/tlm2/uvm_tlm2_generic_payload.svh(499) @ 8565.010000 ns --: reporter@@t3_i [MISCMP] GP miscompare between ‘t3_i’ and ‘analysis_packet_tlm’:
lhs = UVM_TLM_READ_COMMAND [0x0000000000000000] = – – – – (status=UNKNOWN_RESPONSE)
rhs = UVM_TLM_READ_COMMAND [0x0000000000000000] = 00 01 02 03 (status=OK)
UVM_ERROR @ 8565.010000 ns --: uvm_test_top.m_env.m_scoreboard [ t3 TXN Comparator Mismatch] Model UVM_TLM_READ_COMMAND [0x0000000000000000] = – – – – (status=UNKNOWN_RESPONSE) does not match RTL UVM_TLM_READ_COMMAND [0x0000000000000000] = 00 01 02 03 (status=OK)

The scoreboard comparing both complains for mismatch of data and response.

Please help what this issue is all about.

Thanks,
Karandeep

Hi, we can give you some general debug advice on this forum:

So as I understand it the transfer from SV to SC is working correctly with all fields preserved, but the transfer from SC to SV is not. Some fields have a different value.

Here’s what you or I would do to debug further: (1) check the SC object handle. Is it used in the same thread or timestep for any other purpose. Does your SC code nede to make a copy of the object so that it can safely be converted to an SV object by UVM Connect? Is the SC object immediately modified for the ‘next’ or overlapping transaction.

Same on the SV side. The receiving object, is it passed around inside your SV/UVM testbench. Are you printing it out at the right time, in the right place. Again, is the handle being reused, is any code waiting for it and then modifying its contents, before you have a chance to print the value.

These are the normal sorts of race conditions that can affect any object exchange from A to B, including UVM Connect.

Are there any error messages coming from UVM Connect? A runnable testcase is needed to debug further.