How do i use array of uvm_analysis_imp in scoreboard like
-uvm_analysis_imp_in #( A, pB) in[0:NUM];
Pls provide some example also, how the write functions will behave here.
How do i use array of uvm_analysis_imp in scoreboard like
-uvm_analysis_imp_in #( A, pB) in[0:NUM];
Pls provide some example also, how the write functions will behave here.
I think you might not want to use an array. Since, each analysis implementation requires a write method. Also, you have to use `uvm_analysis_imp_decl macro for each of the distinct implementation port.
I know i cant do this using _imp.
How can I do this , making array of analysis ports/exports
In reply to ashish_banga:
You can define any data type including class-based types as arrays. The data for the scorboard should be provided by a monitor. You have to implement in the monitor an analysis port. This has to be connected to an analysis_export in the scoreboard. If you are using for the scoreboard an uvm_subscriber, it has a built-in analysis export.
What I do not understand is why you need an array of analysis exports. The task of the scoreboard is to compare 2 values. There might be additional information like content of certain registers required. But comparing any number of values against each other does not make any sense.
Maybe I do not understand your problem. Perhaps you can explain some more details.
In reply to chr_sue:
I require array of analysis exports for N(parameter) no. of ports. I want to compare all the data in one scoreboard.
I have done this using combination of uvm_analysis_export and uvm_tlm_analysis_fifo, not using _imp
In reply to ashish_banga:
Then you have the solution.
I want to make one remark. Performing all comparess in 1 scoreboard is a solution. But this might not be the best solution. You should think about it.
I actually had a similar desire of making arrays of analysis imps to support N interfaces. I finally didn’t go that route, but I was considering the following solution:
Wrap the analysis imp in a class (eg use or derive from a uvm_subscriber) and instantiate an array of those. You can declare an array of analysis exports and connect them in a loop to the N wrapper classes.
In reply to NiLu:
How can you have N number of write methods? For each analysis_imp, you require a distinct write method. Lets say, N is a parameter or a macro. Still you need N-number of writes for that.
In reply to sharvil111:
In my suggestion each wrapper class has just a single write, but you instantiate N of these classes. This is very similar to the topic starters solution of using N analysis fifos. But the wrapper class you can put in what you want, not just a fifo.
In reply to NiLu:
The analysis port/export appraoch represents a publisher/subscriber mechanism. Any number of subscribers can subscribe to the publisher. When the write command of the publisher (monitor) is called all write commands of the publishers will be executed. Each write command of the subscribers may have different functionality as requested.