Class uvm_tr_database
Constructors
Functions
- function bit open_db ( ) [source]
Open the backend connection to the database.
If the database is already open, then this method will return 1.
Otherwise, the method will call do_open_db, and return the result.
- function bit close_db ( ) [source]
Closes the backend connection to the database.
Closing a database implicitly closes and frees all uvm_tr_streams within the database.
If the database is already closed, then this method will return 1.
Otherwise, this method will trigger a do_close_db call, and return the result.
- function uvm_tr_stream open_stream ( string name, string scope, string type_name ) [source]
Provides a reference to a stream within the database.
Parameters
name
A string name for the stream. This is the name associated with the stream in the database.
scope
An optional scope for the stream.
type_name
An optional name describing the type of records which will be created in this stream.
The method returns a reference to a uvm_tr_stream object if successful, null otherwise.
This method will trigger a do_open_stream call, and if a non null stream is returned, then uvm_tr_stream::do_open will be called.
Streams can only be opened if the database is open (per is_open). Otherwise the request will be ignored, and null will be returned.
- function logic unsigned get_streams ( uvm_tr_stream q ) [source]
Provides a queue of all streams within the database.
Parameters
q
A reference to a queue of uvm_tr_streams
The get_streams method returns the size of the queue, such that the user can conditionally process the elements.
uvm_tr_stream stream_q[$]; if (my_db.get_streams(stream_q)) begin // Process the queue... end
- function void establish_link ( uvm_link_base link ) [source]
Establishes a link between two elements in the database
Links are only supported between streams and records within a single database.
This method will trigger a do_establish_link call.
The uvm_tr_database class is intended to hide the underlying database implementation from the end user, as these details are often vendor or tool-specific.
The uvm_tr_database class is pure virtual, and must be extended with an implementation. A default text-based implementation is provided via the uvm_text_tr_database class.