Jump to content
Sign in to follow this  
tjwang0709

Question about connecting two uvm_tlm_nb_passthrough_initiator_socket

Recommended Posts

Dear all,

Maybe this question has been asked before. If so, I am sorry to ask it again, and please let me know the post.

This is a question about UVM-1.2 in SystemVerilog. I am studying the UVM source code provided by VCS.

In uvm-1.2/src/tlm2/uvm_tlm2_sockets.svh, class uvm_tlm_nb_passthrough_initiator_socket#(T,P) has

  function void connect(this_type provider);

    uvm_tlm_nb_passthrough_initiator_socket_base #(T,P) initiator_pt_socket;
    ... ...
    if($cast(initiator_pt_socket, provider)) begin
      bw_export.connect(initiator_pt_socket.bw_export);
      return;
    end

A  question about this function is: Should the line

bw_export.connect(initiator_pt_socket.bw_export);

be

initiator_pt_socket.bw_export.connect(bw_export);

instead ? 

That is, could anyone help to explain why the direction of the above connection is opposite to the direction of the other two connections ( shown below ) in the same function ?

    if($cast(target_pt_socket, provider)) begin
      target_pt_socket.bw_port.connect(bw_export);
      return;
    end

    if($cast(target_socket, provider)) begin
      target_socket.bw_port.connect(bw_export);
      return;
    end

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×