Passing two different sequence item to scoreboard

Hi,
I want to use single scoreboard for two different sequence item.Through two monitor i am using “item_collected_port.write(trans_collected)” methods. Though there is only one write method in scoreboard i can pass only one sequence item. I have also used parameterized class in scoreboard but when i create its object in build method it gives “assignment operator type check failed " error. I have taken default parameterized data type as “int” and creating object in each environment as its own sequence item like "
scoreboard_c #(transfer_c) scoreboard;”

You will first need to define two unique named ovm_analysis_imp classes. There are few macros which you can used to define these classes. Once you have unique ovm_analysis_imp classes, you will have unique function/task names for TLM API.

module test;

  `include "ovm_macros.svh"
  import ovm_pkg::*;

  `ovm_analysis_imp_decl(_expected)
  `ovm_analysis_imp_decl(_actual)

  class scoreboard extends ovm_scoreboard;
    ovm_analysis_imp_expected #(int, scoreboard) expected;
    ovm_analysis_imp_actual #(int, scoreboard) actual;
    `ovm_component_utils(scoreboard)
    function new (string name, ovm_component parent);
      super.new(name, parent);
      expected = new("expected", this);
      actual = new("actual", this);
    endfunction
    function void write_expected(int i);
      ovm_report_info(get_type_name(), $psprintf("write_expected %0d", i), OVM_LOW);
    endfunction
    function void write_actual(int i);
      ovm_report_info(get_type_name(), $psprintf("write_actual %0d", i), OVM_LOW);
    endfunction
  endclass

  class sb_test extends ovm_test;
    scoreboard sb;
    ovm_analysis_port #(int) expected;
    ovm_analysis_port #(int) actual;
    `ovm_component_utils(sb_test)
    function new (string name, ovm_component parent);
      super.new(name, parent);
      sb  = scoreboard::type_id::create("sb_1", this);
      expected = new("expected", this);
      actual = new("actual", this);
    endfunction
    function void connect();
      this.expected.connect(sb.expected);
      this.actual.connect(sb.actual);
    endfunction
    task run();
      #10;
      expected.write(2);
      #10;
      actual.write(2345);
      #10 global_stop_request();
    endtask
  endclass

  initial begin
    run_test("sb_test");
  end

endmodule

Hi,
Thanks for reply. Still my problem is as it is. As you reply in example the data type is same while u r calling write method by two analysis port instance. I want to pass different data type during calling of write method. As in the example there is two analysis port of “int” data type in “same” module while i am using different data type(Take different seq item class in each module) in different module and wants to use single scoreboard for different modules. Is it possible to use parameterized class? if yes than how?