Jump to content

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...