我正在尝试实现双向tlm端口。我使用了非阻塞tlm传输。但是我的nb_transport函数没有返回任何内容而是返回值为null。下面是示例实现
**inside: scoreboard**
uvm_nonblocking_transport_port #(memsys_cache_line,memsys_cache_line_array) m_cache_read_port;
if ( m_cache_read_port.nb_transport(line,line_array) ) begin
foreach ( line_array.cache_line_array[j] ) begin
// do the data check
end
end
**inside env I am adding import.**
`uvm_nonblocking_transport_imp_decl(_cache_line_array)
class blabla extends uvm_env;
all uvm_util macros etc etc
// reads cache line from all the caches in each of the cluster
uvm_nonblocking_transport_imp_cache_line_array #(memsys_cache_line,memsys_cache_line_array,blabla) m_cache_line_array_imp;
function bit nb_transport_cache_line_array(memsys_cache_line line,memsys_cache_line_array line_array);
bit rtn = 0;
if ( line == null ) begin
`uvm_fatal("NULLPTR","line recieved is null")
end
line_array = new;
line_array.paddress = line.paddress;
foreach (m_cluster_env[i] ) begin
rtn |= m_cluster_env[i].try_get_cache_line_array(line_array);
end
return rtn;
endfunction
endclass
当nb_transport_cache_line_array完成时,我看到line_array有有效数据,但内部记分板line_array返回为null。
任何人都可以告诉我这里我做错了什么?