Jump to content

Compilation error regarding illegal class assignment


Recommended Posts

Hey!

I've got a compilation error in QuestaSim bugging me for days now.

That's the error:

Error: (vsim-3978) ../src/reg_sequence.sv(27): Illegal assignment to class type uvm_component [in mtiUvm/uvm_pkg::uvm_component] from class type reg_sequence [in work/top_sv_unit::reg_sequence]

There is a register model which I'm trying to pass to a sequence by using the uvm_config_db. The register model is derived from uvm_reg_block and uses the uvm_object_utils macro.

In my environment I create an instance of the register model and pass the handle to the uvm_config_db.

reg_model rm;
...
// create reg_model
...
uvm_config_db#(reg_model)::set(this, "*.*reg_sequence*", "register_model", rm);

In the sequence I've got a variable of type reg_model and I would like to use the handle from the uvm_config_db for this variable.

reg_model model;
...
uvm_config_db#(reg_model)::get(this, "", "register_model", model);

Can anyone tell me why this is not working and the error occurs?

Thanks in advance!

Regards,

Johannes

Link to comment
Share on other sites

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...