Jump to content

Recommended Posts

Posted

I am trying to build a dummmy uvm verification environment. The sequencer and driver work correctly but as soon as I add a monitor in the agent, I get the error - "Illegal assignment to class type monitor_base from class type sequencer_base". This error is produced at "mon = monitor_base::type_id::create("monitor",this);" in the build_phase function of the agent. This is a strange error as sequencer has nothing to assign to monitor. The code is given below for further reference. I am using Questa Sim 10.0d.

class agent_base extends uvm_agent;

`uvm_component_utils(agent_base)

// Component Members

sequencer_base seq;

driver_base driver;

monitor_base mon;

function new(string name = "agent_base", uvm_component parent = null);

super.new(name,parent);

endfunction

function void build_phase(uvm_phase phase);

seq = sequencer_base::type_id::create("sequencer",this);

driver = driver_base::type_id::create("driver",this);

mon = monitor_base::type_id::create("monitor",this); // ERROR !

endfunction

function void connect_phase(uvm_phase phase);

driver.seq_item_port.connect(seq.seq_item_export);

endfunction : connect_phase

endclass: agent_base

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...