# uvm_coreservice_t

The singleton instance of uvm_coreservice_t provides a common point for all central uvm services such as uvm_factory, uvm_report_server, ... The service class provides a static ::get which returns an instance adhering to uvm_coreservice_t the rest of the set_<facility> get_<facility> pairs provide access to the internal uvm services

Custom implementations of uvm_coreservice_t can be included in uvm_pkg::* and can selected via the define UVM_CORESERVICE_TYPE. They cannot reside in another package.

Contents

uvm_coreservice_t | The singleton instance of uvm_coreservice_t provides a common point for all central uvm services such as uvm_factory, uvm_report_server, ...
uvm_default_coreservice_t | uvm_default_coreservice_t provides a default implementation of the uvm_coreservice_t API.

### Methods

### get_factory

> pure virtual function uvm_factory get_factory()

intended to return the currently enabled uvm factory,

### set_factory

> pure virtual function void set_factory(
> | uvm_factory | f
> )

intended to set the current uvm factory

### get_report_server

> pure virtual function uvm_report_server get_report_server()

intended to return the current global report_server

### set_report_server

> pure virtual function void set_report_server(
> | uvm_report_server | server
> )

intended to set the central report server to server

### get_default_tr_database

> pure virtual function uvm_tr_database get_default_tr_database()

intended to return the current default record database

### set_default_tr_database

> pure virtual function void set_default_tr_database(
> | uvm_tr_database | db
> )

intended to set the current default record database to db

### set_component_visitor

> pure virtual function void set_component_visitor(
> | uvm_visitor#(uvm_component) | v
> )

intended to set the component visitor to v (this visitor is being used for the traversal at end_of_elaboration_phase for instance for name checking)

### get_component_visitor

> pure virtual function uvm_visitor#(
> | uvm_component
> ) get_component_visitor()

intended to retrieve the current component visitor see set_component_visitor

### get_root

> pure virtual function uvm_root get_root()

returns the uvm_root instance

### get

> static function uvm_coreservice_t get()

Returns an instance providing the uvm_coreservice_t interface. The actual type of the instance is determined by the define `UVM_CORESERVICE_TYPE.

>     `define UVM_CORESERVICE_TYPE uvm_blocking_coreservice
>     class uvm_blocking_coreservice extends uvm_default_coreservice_t;
>        virtual function void set_factory(uvm_factory f);
>           `uvm_error("FACTORY","you are not allowed to override the factory")
>        endfunction
>     endclass

## uvm_default_coreservice_t

uvm_default_coreservice_t provides a default implementation of the uvm_coreservice_t API. It instantiates uvm_default_factory, uvm_default_report_server, uvm_root.

Summary

uvm_default_coreservice_t
uvm_default_coreservice_t provides a default implementation of the uvm_coreservice_t API.
Class Hierarchy
uvm_coreservice_t
uvm_default_coreservice_t
Class Declaration
> class uvm_default_coreservice_t extends uvm_coreservice_t
Methods |
get_factory | Returns the currently enabled uvm factory.
set_factory | Sets the current uvm factory.
get_default_tr_database | returns the current default record database
set_default_tr_database | Sets the current default record database to db
get_report_server | returns the current global report_server if no report server has been set before, returns an instance of uvm_default_report_server
set_report_server | sets the central report server to server
set_component_visitor | sets the component visitor to v (this visitor is being used for the traversal at end_of_elaboration_phase for instance for name checking)
get_component_visitor | retrieves the current component visitor if unset(or null) returns a uvm_component_name_check_visitor instance

### Methods

### get_factory

> virtual function uvm_factory get_factory()

Returns the currently enabled uvm factory. When no factory has been set before, instantiates a uvm_default_factory

### set_factory

> virtual function void set_factory(
> | uvm_factory | f
> )

Sets the current uvm factory. Please note: it is up to the user to preserve the contents of the original factory or delegate calls to the original factory

### get_default_tr_database

> virtual function uvm_tr_database get_default_tr_database()

returns the current default record database

If no default record database has been set before this method is called, returns an instance of uvm_text_tr_database

### set_default_tr_database

> virtual function void set_default_tr_database(
> | uvm_tr_database | db
> )

Sets the current default record database to db

### get_report_server

> virtual function uvm_report_server get_report_server()

returns the current global report_server if no report server has been set before, returns an instance of uvm_default_report_server

### set_report_server

> virtual function void set_report_server(
> | uvm_report_server | server
> )

sets the central report server to server

### set_component_visitor

> virtual function void set_component_visitor(
> | uvm_visitor#(uvm_component) | v
> )

sets the component visitor to v (this visitor is being used for the traversal at end_of_elaboration_phase for instance for name checking)

### get_component_visitor

> virtual function uvm_visitor#(
> | uvm_component
> ) get_component_visitor()

retrieves the current component visitor if unset(or null) returns a uvm_component_name_check_visitor instance

> virtual class uvm_coreservice_t

The singleton instance of uvm_coreservice_t provides a common point for all central uvm services such as uvm_factory, uvm_report_server, ...

> class uvm_default_coreservice_t extends uvm_coreservice_t

uvm_default_coreservice_t provides a default implementation of the uvm_coreservice_t API.

> static function uvm_coreservice_t get()

Returns an instance providing the uvm_coreservice_t interface.

> pure virtual function void set_component_visitor(
> | uvm_visitor#(uvm_component) | v
> )

intended to set the component visitor to v (this visitor is being used for the traversal at end_of_elaboration_phase for instance for name checking)

> virtual function uvm_factory get_factory()

Returns the currently enabled uvm factory.

> virtual function void set_factory(
> | uvm_factory | f
> )

Sets the current uvm factory.

> virtual function uvm_tr_database get_default_tr_database()

returns the current default record database

> virtual function void set_default_tr_database(
> | uvm_tr_database | db
> )

Sets the current default record database to db

> virtual function uvm_report_server get_report_server()

returns the current global report_server if no report server has been set before, returns an instance of uvm_default_report_server

> virtual function void set_report_server(
> | uvm_report_server | server
> )

sets the central report server to server

> virtual function void set_component_visitor(
> | uvm_visitor#(uvm_component) | v
> )

sets the component visitor to v (this visitor is being used for the traversal at end_of_elaboration_phase for instance for name checking)

> virtual function uvm_visitor#(
> | uvm_component
> ) get_component_visitor()

retrieves the current component visitor if unset(or null) returns a uvm_component_name_check_visitor instance

> class uvm_component_name_check_visitor extends uvm_visitor#(
> | uvm_component
> )

This specialized visitor analyze the naming of the current component.

> class uvm_text_tr_database extends uvm_tr_database

The uvm_text_tr_database is the default implementation for the uvm_tr_database.