mrforever Posted April 1, 2013 Report Share Posted April 1, 2013 Hi, experts, I met such a problem. Here are the codes and the vcs reports: -------codes-------- class my_env extends uvm_env; my_sub_env subenv; ... // build phase function void build_phase(uvm_phase phase); ... subenv=new; for (int i =0; i <10; i++) begin subenv = my_sub_env::type_id::create(sformatf("subenv%0d", i), this); end ... endfunction: build_phase // connect phase function void connect_phase(uvm_phase phase); ... foreach(subenv) begin reg_R.a_map.set_sequencer(subenv.v_sqr.cfg_sqr, reg2apb); end ... endfunction: connect_phase endclass: my_env class my_sub_env extends uvm_env; vsequencer v_sqr; ... function void build_phase(uvm_phase phase); ... v_sqr = vsequencer::type_id::create("v_sqr", this); ... endfunction: build_phase ... endclass: my_sub_env -------reports-------- The vcs reports such an error: UVM_FATAL /EDA_Tools/synopsys/vcs1209/etc/uvm-1.1/uvm-1.1c/src/base/uvm_component.svh(1744) @ 0: v_sqr [CLDEXT] Name 'v_sqr' is not unique to other top-level instances. If parent is a module, build a unique name by combining the the module name and component name: $sformatf("%m.%s","v_sqr"). How can I build a unique name when the parent isn't a module. I mean I cann't build a unique name because there is only one v_sqr in class my_sub_env. I have built a unique name for each subenv, that is sformatf("subenv%0d", i). Does the reports mean that each object should have a unique name when there are multiple subenvs? Could anybody help me to solve this problem? Thanks in advance. 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.