Jump to content

Automatic task/function item 'create_object' cannot be accessed by hierarchical....


Recommended Posts

Trying to use the UVM register package with Questa 10.0a_1 and get the following error:

# ** Error: (vsim-3667) Reg2PacketAdapter.sv(13): Automatic task/function item 'create_object' cannot be accessed by hierarchical reference.

# Region: /packet_agent_pkg

I can get past it by changing the "...type_id::create_object.." call by a simple new()

Unable to find anything on this error on the Mentor site expect for a different issue that recommended using -novopt. Tried it both ways, made no difference.

My code is pretty much straight out of Mentor's "UVM Methodology Cookbook".

Anyone else seen this?

Thanks,

Scott Nixon

Link to comment
Share on other sites

Hi Scott,

I can re-create your error message by using create_object() instead of create().

31: R = reg_RO::type_id::create_object("R");

# ** Error: (vsim-3667) t.sv(31): Automatic task/function item 'create_object' cannot be accessed by hierarchical reference.

Changing to

31: R = reg_RO::type_id::create("R");

eliminates the error message.

I can't find the usage of 'type_id::create_object()' in the UVM Methodolgy Cookbook.

Please point me to the page you were looking at, and I'll make sure it gets fixed.

Thanks.

rich

Link to comment
Share on other sites

That did indeed fix it.

Flipping through the Cookbook I can not find a direct reference to it, my guess is it was an inadvertent auto-complete via Certe that gave me the code.

That's what I get for indiscriminately banging on the tab key.

Thanks!

Scott Nixon

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