At load time in Questasim, I am getting the error “vsim-8754: Actual input arg. of type ‘virtual axi_ifc’ for formal ‘axi’ of ‘new’ is not compatible with the formal’s type ‘virtual axi_ifc #(32, 2, 32)’”. Here is the offending code:
virtual axi_ifc axi;
. . .
begin
axi_target_submonitor #() tgc_mon;
tgc_mon = new(axi, cfg, cfg.this_analog_of(RX_SYS_CTRL), inport, outport); // <--
tgc_mon.body();
end
axi is a virtual interface of type virtual axi_ifc (with default parameters) passed to a class whose declaration is:
class axi_target_submonitor #(uint DATA_W = 32, ID_W = 2, ADDR_W = 32,
type INSEQ=m_seq_item, OUTSEQ=m_seq_item)
extends
axi_common_submonitor #(DATA_W, ID_W, ADDR_W, INSEQ, OUTSEQ);
function new(virtual axi_ifc #(DATA_W, ID_W, ADDR_W) axi = null,
maui_agent_config cfg = null,
xactor_s partner = INV_XACTOR,
uvm_analysis_port #(INSEQ) inport = null,
uvm_analysis_port #(OUTSEQ) outport = null);
this.is_master = 0;
this.axi = axi;
this.cfg = cfg;
this.partner = partner;
this.inport = inport;
this.outport = outport;
endfunction
endclass
My interface declaration is:
interface axi_ifc #(
parameter DATA_W = 32,
parameter ID_W = 2,
parameter ADDR_W = 32
) (
input aclk
);
Questa does not seem to understand that axi_ifc’s default parameters are #(32,2,32). Any easy fix or switch I can use to get around this?