scnix1 Posted June 13, 2011 Report Share Posted June 13, 2011 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 Quote Link to comment Share on other sites More sharing options...
jadec Posted June 14, 2011 Report Share Posted June 14, 2011 Normally you'd call class::type_id::create(...) not create_object. Quote Link to comment Share on other sites More sharing options...
richedelman Posted June 14, 2011 Report Share Posted June 14, 2011 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 Quote Link to comment Share on other sites More sharing options...
scnix1 Posted June 14, 2011 Author Report Share Posted June 14, 2011 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.