Uvm_analysis_imp and uvm_analysis_export

Dear Sir/Madam,

Can you please provide me the difference between uvm_analysis_imp and uvm_analysis_export in analysis component?
In what way we need to decide to use either of them?

Thanks in Advance,
Sudheer

Hi Sudheer,

uvm_analysis_imp is used in components like scoreboard to implement write function.where as uvm_analysis_export is used for hierarchical connections as follows

If you have a uvm_subscriber which is implementing write function which is inside a uvm_scoreboard then here uvm_scoreboard has uvm_analysis_export where as uvm_subscriber has uvm_analysis_imp , then you have to hierarchical connect export to imp i.e uvm_sb.analysis_export.connect(uvm_sub.analysis_imp)

Thanks,
Vikas Billa

In reply to vikasbilla:

Hello Vikas,

Can you please provide some example code.

Thanks

In reply to haykp:

Hello,

uvm_analysis_export - an input. Just a connection between the “port” and the “imp” parts.
Should connect to a component with uvm_analysis_imp or another export.
uvm_analysis_imp - an input port of TLM (write can be implemented in this component)
uvm_analysis_port - an output of TLM.

Numerous examples can be found here:
https://s3.amazonaws.com/cookbook.verification.academy/pdfs/uvm-cookbook-complete-verification-academy.pdf?AWSAccessKeyId=AKIAIEMNC32PGID7APKA&Expires=1456856476&Signature=5MR0UVFgxHHiykzeCZGKV8QPhHI%3D

Alex

In reply to Alex K.:

In reply to haykp:
Hello,
uvm_analysis_export - an input. Just a connection between the “port” and the “imp” parts.
Should connect to a component with uvm_analysis_imp or another export.
uvm_analysis_imp - an input port of TLM (write can be implemented in this component)
uvm_analysis_port - an output of TLM.
Numerous examples can be found here:
https://s3.amazonaws.com/cookbook.verification.academy/pdfs/uvm-cookbook-complete-verification-academy.pdf?AWSAccessKeyId=AKIAIEMNC32PGID7APKA&Expires=1456856476&Signature=5MR0UVFgxHHiykzeCZGKV8QPhHI%3D
Alex

I would highly recommend reading this section:
https://verificationacademy.com/cookbook/analysis

Alex

In reply to haykp:

Hi,

Generally uvm_analysis_port calls a function. uvm_analysis_imp implements that function. Whereas the uvm_analysis_export carries the function call to next components and it is between the port and implementation ports. For a function call made through uvm_analysis_port, the call is transferred through uvm_analysis_export and it ends with the implementation of it through uvm_analysis_imp. uvm_analysis_imp terminates the function call made by port by implementing the function call.

In reply to Anudeep J:

Hi! Could I ask for example how should _imp implement function called by _port… I am kinda fighting it right now :/

In reply to arakan94:

Look here please:
https://verificationacademy.com/cookbook/analysisconnections