Jump to content

factory->print() sometimes does not print instance override


Recommended Posts

When I play around with the factory/basic example from uvm-systemc-1.0-beta1, 

In the original example code, it prints the instance override information as below:

UVM_INFO @ 0 s: reporter [RNTST] Running test ...
UVM_INFO ../../../../src/uvmsc/factory/uvm_default_factory.cpp(1185) @ 0 s: reporter [UVM/FACTORY/PRINT] 
#### Print Factory Configuration (*)

Instance Overrides:

Requested Type  Override Path  Override Type
  --------------  -------------  -------------
  gen             top.e.gen1     mygen
Type Overrides:

  Requested Type  Override Type
  --------------  -------------
  packet          mypacket

All types registered with the factory: 22 total
  Type Name
  ---------
  env
  gen
  mygen
  mypacket
  packet
  reg_rw
  top
(*) Types with no associated type name will be printed as <unknown>

But when I try to comments out the line in factory/basic/top.h (top::build_phase) as below:

        set_inst_override("e.gen1", "gen", "mygen");
        // set_type_override("packet","mypacket");

I expect print factory configuration should still print the instance override but not the type override. But it doesn't print any override.

UVM_INFO @ 0 s: reporter [RNTST] Running test ...
UVM_INFO ../../../../src/uvmsc/factory/uvm_default_factory.cpp(1185) @ 0 s: reporter [UVM/FACTORY/PRINT] 
#### Print Factory Configuration (*)

No instance or type overrides are registered with this factory

All types registered with the factory: 22 total
  Type Name
  ---------
  env
  gen
  mygen
  mypacket
  packet
  reg_rw
  top
(*) Types with no associated type name will be printed as <unknown>

 

Link to comment
Share on other sites

  • 2 weeks later...

It seems that a forgotten comment in file src/uvmsc/factory/uvm_default_factory.cpp line 1044 seems to be the culprit. Only printing should be affected. However, we will check within the workgroup if other effects are to be expected. For now, changing

if( !m_type_overrides.size() ) //&& !sorted_override_queues.size() )

to

if( !m_type_overrides.size() && !sorted_override_queues.size() )

should solve your issue.

Link to comment
Share on other sites

  • 1 month later...

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