Jump to content

shreya

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by shreya

  1. Hi, In my current environment I have monitors class and parametrized scoreboard class. I am sending monitor transaction into scoreboard through the tlm analysis port. Below is snippet of code. class pkt_monitor extends uvm_monitor uvm_analysis_port #(pkt_item) pkt_collected_port; function new(uvm_component parent = null) pkt_collected_port = new("pkt_collected_port", this); .... .... endclass class pkt_sbd #(type T = uvm_transaction) extends uvm_component; uvm_analysis_export #(T) sb_check_port; // typedef pkt_sbd #(T) this_type; function new(uvm_component parent = null) sb_check_port = new("sb_check_port", this); ..... ..... endclass class top_env extends uvm_env; pkt_sbd #(pkt_item) pkt_sbd_inst; pkt_monitor pkt_monitor_inst; build_phase() pkt_monitor_inst = pkt_monitor::type_id::create("pkt_monitor_inst",this); pkt_sbd_inst = pkt_sbd #(pkt_item) :: type_id::create("pkt_sbd_inst",this) connect_phase() pkt_monitor_inst.pkt_collected_port.connect(pkt_sbd_inst.sb_check_port) endclass While compiling above code there is a type incompatability issue observed Error-[iCTTFC] Incompatible complex type usage Incompatible complex type usage in task or function call. The following expression is incompatible with the formal parameter of the function. The type of the actual is 'class uvm_pkg::uvm_analysis_export#(class pkt_pkg::pkt_item)', while the type of the formal is 'class uvm_pkg::uvm_port_base#(class uvm_pkg::uvm_tlm_if_base#(class pkt_pkg::pkt_item,class pkt_pkg::pkt_item))'. Expression: this.pkt_sbd_inst.sb_check_port Source info: pkt_monitor_inst.pkt_collected_port.connect(pkt_sbd_inst.sb_check_port) Any help is appreciated.
  2. I am using uvm_pw_scoreboard package available on accelera Contributions.I have following queries about it . 1. Why does this package uses uvm_analysis_export and analysis_fifo implementation instead of uvm_analysis_imp in pw_checker_predictor as well as pw_scoreboard. 2. I want to pass unique id to each transaction, to do this i have implemented as below: my_local_predictor.sv file(not extended from pw_checker_predictor) uvm_analysis_port #(item) predict_port; predict_port = new ("predict_port",this); item.set_transaction_item(unique_id); $display("Predictor unique_id =%d",unique_id); predict_port.write(item) In extended pw_scoreboard function int get_stream_id(uvm_transaction t ) $display("Scoreboard unique_id =%d",t.get_transaction()); get_stream_id = t.get_transaction_id(); endfunction Output: Predictor unique_id = 2; Scoreboard unique_id= -1; Any help is appreciated.
×
×
  • Create New...