Jump to content

Connection checking for uvm_analysis_imp

Recommended Posts

Is min_size or max_size ever checked after elaboration to check port/imp connections? I grepped through the 1.1d code and didn't see anything. The min_size and max_size are both set to 1 for an analysis_imp, however if you don't connect an analysis_port to an imp or if you connect more than 1 then there are no errors. This seems like a pretty critical oversight since it will allow imps to be unconnected regardless of the setting of min_size and max_size. Since this is a pretty easy error to make then it makes debug unnecessarily difficult.


I did confirm that the uvm_analysis_imp::get_provided_to works as expected. I would expect this number to be checked after all connections are complete and compared to min_size and max_size and error to be reported if out not the correct value.


Rlated to this, why are the constructors for the imp classes not overridden so as to allow different values for min_size and max_size. Right now they are hardcoded to 1 with now way to change them. I can conceive of cases where you might allow multiple analysis ports to write to an imp.


Link to comment
Share on other sites

I htink that the problem is in:



  function int size ();
    return m_imp_list.num();


For an imp with multiple ports connected to it this returns 1. However get_provided_to returns a list to the ports that are bound to it with the correct size. I believe that for an imp size should return m_provided_to.size().

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.

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...