How to get verbosity level?

Hi all,

I am setting the verbosity level from the testcase.

Now suppose if I want to know the verbosity level in any inner module say generator, How can i get the verbosity level ?

Thanks,
Trpp

Hi Trpp,

I’ve attached an example.

The +OVM_VERBOSITY I believe sets the default reporter level (_global_reporter) so you can use the get_report_verbosity_level function.

Just remember, if you are displaying this message, make sure the message level is 0 to allow it to be displayed no matter what you set the verbosity too.

Cheers

The verbosity is a value stored in the report handler. Each object derived from ovm_report_object has its own report handler. Ovm_component is one such object. You can retrieve the verbosity by calling get_report_verbosity_level().

When you supply a verbosity level using +OVM_VERBOSITY on the command line, OVM sets all components to this value intially. You can later change verbosity on a component-by-component basis (or on an ovm_object basis).

– Mark

The +OVM_VERBOSITY I believe sets the default reporter level (_global_reporter) so you can use the get_report_verbosity_level function.

The verbosity is a value stored in the report handler. Each object derived from ovm_report_object has its own report handler. Ovm_component is one such object. You can retrieve the verbosity by calling get_report_verbosity_level().

There is no function like get_report_verbosity_level in ovm 2.0.
There is function called get_verbosity_level but it is not in _global_reporter.

AndrewBond,
In ovm2.0.1 there is function get_report_verbosity_level. I have tried with it but it always returns OVM_NONE.

mglasser,
I don’t see any handler name in ovm_component. then how to call function get_report_verbosity_level. I have tried without using handle but it returns OVM_NONE only.

And Please give me the solution in ovm2.0, as I have whole environment in ovm2.0

Thanks,
trpp

The example I originally attacjed worked ok on OVM 2.0.1. I just tested it again.
If you can attach your example I can give it a go.

This function didn’t exist on 2.0 but I’m attaching one that does, although I can’t see the function documented anywhere.

Cheers

Alternately, there is a get_verbosity_level() method in ovm_report_handler objects. All classes derived from ovm_component (which is almost everything but ovm_transactions, sequence items and sequences), has a m_rh member variable which is an ovm_report object. Therefore, you can call this from any component:

m_rh.get_verbosity_level()

If I had any say as to what goes into OVM, there would be a get_verbosity_level() method in ovm_component that would turn around and call m_rh.get_verbosity_level(). That would make this much easier to find and would make my get_verbosity_level() calls less dependant on the underlying implementation of the OVM classes.

Hope that’s what you’re looking for.