makers78 Posted May 8, 2012 Report Share Posted May 8, 2012 I have been working with SV UVM for about 6 months now, over that time I've learned a combination of 1.0 and 1.1 so things are getting a bit confused. I am building a new scoreboard component working with new interface UVCs I created. I have a DUT with multiple identical interfaces which I want to feed into my scoreboard. I am trying to figure out how these uvm_analysis_imp classes are built and what I can access, in particular how I can access the index of a given handle. My thought is something like this: class packet_scoreboard #(parameter NUM_IF=2) extends uvm_scoreboard; `uvm_analysis_imp_decl(_pkt_in) uvm_analysis_imp_pkt_in #( packet_in, packet_scoreboard ) pkt_in[NUM_IF-1:0]; ... function new ( string name = "packet_scoreboard" ); super.new(name); for ( int i = 0; i < NUM_IF; i++ ) pkt_in = new( $sformatf("pkt_in[%0d]", i), this); endfunction virtual function void write_pkt_in( packet_in pkt ); ... uvm_report_info( get_type_name(), $sformatf("Received packet on interface %0d", ???), UVM_DEBUG ); ... endfunction endclass Thanks, Matt Quote Link to comment Share on other sites More sharing options...
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.