UVM : Compile Error(when Connecting Monitor Port to Scoreboard Port)

Hi Friends,
I have connected monitor port to scoreboard port. After that i am getting compile error.

Error-[ICTTFC] Incompatible complex type usage
…/…/…/…/…/tb/UVM/top/env/env.sv, 133
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 $unit::sv_transaction)’, while
the type of the formal is ‘class uvm_pkg::uvm_port_base#(class
uvm_pkg::uvm_tlm_if_base#(class
sv_package::sv_transaction,class
sv_package::sv_transaction))’. Expression:
this.top_sb.axi_rd_analysis_export
Source info:
this.slv_agnt.slave_monitor_inst.slv_mon_ap.connect(this.top_sb.axi_rd_analysis_export)

I am sharing code below.

env.sv file:
function void connect_phase(uvm_phase phase);
`uvm_info(“connect_phase”, “Entering into env connect phase”, UVM_LOW)
slv_agnt.slave_monitor_inst.slv_mon_ap.connect(top_sb.axi_rd_analysis_export);
endfunction

Monitor file.sv (Port declared):
uvm_analysis_port #(sv_transaction) slv_mon_ap;

scoreboard (Port declared):
uvm_analysis_export #(sv_transaction) axi_rd_analysis_export ;

//Sequence item class
class sv_transaction extends uvm_sequence_item ;

Env file:
/** Construct the top scoreboard */
top_sb = top_scoreboard::type_id::create(“top_sb”, this);

Agent :
class slave_agent extends uvm_agent ;
`uvm_component_utils(slave_agent)

slave_monitor slave_monitor_inst ;

slave_monitor_inst = slave_monitor::type_id::create(“slave_monitor_inst”, this) ;

Can you please anyone help me on this.

Regards,
Raj

In reply to rajanikanthd:

You are compiling sv_transaction multiple times. You should ensure that you use packages and import them where required.

In reply to cgales:

I have included sv_transaction file in packages and in scoreboard also. Because of this it is throwing error.

I have removed from scoreboard now compile is clean.

Thanks for your help……………