chip_maker Posted October 4, 2012 Report Share Posted October 4, 2012 In the following code, I cannot hierarchically refer a function in scoreboard from sequence. I have to first get the scoreboard handle and then call function using the handle. The following does not work: uvm_test_top.env.my_env0.my_sb0.disable_scoreboard(0); The following works handle_my_sb0.enable_scoreboard(1); What am I missing something in the first case? Thanks, Kal =========== class my_test2_vseq extends my_base_test_vseq; uvm_component handle_sb; my_scoreboard handle_my_sb0; `uvm_object_utils(my_test2_vseq) `uvm_declare_p_sequencer(my_virtual_sequencer) function new(string name="my_test2_vseq"); super.new(name); handle_sb = uvm_top.find("*my_sb0"); `uvm_info("",$psprintf("handle_sb %s", handle_sb.get_full_name()),UVM_LOW) $cast(handle_my_sb0, handle_sb); `uvm_info("",$psprintf("handle_my_sb0 %s", handle_my_sb0.get_full_name()),UVM_LOW) endfunction : new task body(); #200ns //uvm_test_top.env.my_env0.my_sb0.disable_scoreboard(0); //<- Does not work handle_my_sb0.enable_scoreboard(1); // Works #10000ns ; endtask:body endclass:my_test2_vseq Quote Link to comment Share on other sites More sharing options...
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.