Jump to content

Recommended Posts

Posted

I'd like to access defined uvm_reg_block in virtual sequence rather than uvm_reg_sequence.

So I added the constructor of virtual sequence below:

$cast(regmodel,uvm_reg_block::find_block("regmodel"));

Of course, regmodel is uvm_reg_block declared in virtual sequence and the string "regmodel" indicates the name of uvm_reg_block instantiated in uvm_env (which is locked).

But, the find_block method doesn't work at all.

In it the uvm_resource_pool.lookup_regex returns null.

I instantiated uvm_reg_block just as in the user guide with create function.

But it seems that the create function doesn't register the uvm_reg_block in uvm_resource_pool.

Is any action needed for the use of uvm_reg_block::find_block?

And, is there any other solution for me to access uvm_reg_block in virtual sequence?

Posted

I found a bug in the uvm_resource.svh file.

In the lookup_regex function, there is a statement:

if(!uvm_re_match(re,name)) continue;

But this should be like below:

if(uvm_re_match(re,name)) continue;

because the return value of uvm_re_match is err flag.

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