Jump to content

problem about multiple sequencers which have the same name


Recommended Posts

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[10];

      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.

Link to comment
Share on other sites

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

 

Have solved this problem.

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