johannes.walter Posted July 18, 2011 Report Share Posted July 18, 2011 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 Quote Link to comment Share on other sites More sharing options...
dave_59 Posted July 20, 2011 Report Share Posted July 20, 2011 You cannot use this as a context inside a sequence; you must rely on the full sequence name. uvm_config_db#(reg_model)::get(null, get_full_name(), "register_model", model); Quote Link to comment Share on other sites More sharing options...
johannes.walter Posted July 21, 2011 Author Report Share Posted July 21, 2011 Okay. I didn't know that. Thanks a lot! Regards, Johannes Quote Link to comment Share on other sites More sharing options...
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.