Jump to content
Sign in to follow this  
scnix1

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×