ssingh Posted October 8, 2012 Report Posted October 8, 2012 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 Quote
whiteriver Posted October 8, 2012 Report Posted October 8, 2012 are you sure that your monitor extends uvm_monitor? And that it has the correct class name in `uvm_component_utils? Quote
ssingh Posted October 8, 2012 Author Report Posted October 8, 2012 The name in 'uvm_component_utils in monitor_base was incorrect. Thanks. Quote
Recommended Posts
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.