Reputation: 445
We usually need analysis_export
for making data transfer from analysis_port
to analysis_imp
. They serve as a data transfer objects from ports to implementations, as we cannot connect analysis_imp
to another analysis_imp
.
However the analysis_port
-s can be connected to other analysis_port
-s.
So my questions is, why we need analysis_export
, when instead of analysis_export
we can just use analysis_port
?
Upvotes: 0
Views: 391
Reputation: 792
Looks like the intention might have been the export interfaces are to be used for connections purpose only and the port interfaces are to be used to send the data -- port.write(data); [an export need not implement the write function ]
BUT the analysis_export and analysis_port seem to have very similar in implementation. it also look like that can be also interchanged. The only difference it is the MASK/ type bit which say which type of interface it is - export / port . Other that this the interface implementation appears to be same.
The main difference is when the interfaces are being connected (connect function ) a check is implemented to the way connection can be made. port-to-port , port-to-export , port-to-imp , export-to-export , export-to-imp . These might be used to ensure that we use export to propagate interfaces and finally connect them to some implementation. But from the current implementation it looks like both the port and export have write functions which can be called and they can be used interchangeably even for connections.
The only catch is once a port is connected to an export , it can only connect to other exports and has to terminate at a implementation. [ for some reason only a port-port connections does not generate any run time ]
Also is it possible at some time in the past they may might had different implementations [ just speculating , someone who has followed the history of UVM could answer that. ]
Upvotes: 1