Class uvm_tr_stream
Constructors
Functions
- function uvm_tr_database get_db ( ) [source]
Returns a reference to the database which contains this stream.
A warning will be asserted if get_db is called prior to the stream being initialized via do_open.
- function void close ( ) [source]
Closes this stream.
Closing a stream closes all open recorders in the stream.
This method will trigger a do_close call, followed by uvm_recorder::close on all open recorders within the stream.
- function void free ( ) [source]
Frees this stream.
Freeing a stream indicates that the database can free any references to the stream (including references to records within the stream).
This method will trigger a do_free call, followed by uvm_recorder::free on all recorders within the stream.
- function uvm_recorder open_recorder ( string name, time open_time, string type_name ) [source]
Marks the opening of a new transaction recorder on the stream.
Parameters
name
A name for the new transaction
open_time
Optional time to record as the opening of this transaction
type_name
Optional type name for the transaction
If open_time is omitted (or set to 0), then the stream will use the current time.
This method will trigger a do_open_recorder call. If do_open_recorder returns a non- null value, then the uvm_recorder::do_open method will be called in the recorder.
Transaction recorders can only be opened if the stream is open on the database (per is_open). Otherwise the request will be ignored, and null will be returned.
- function logic unsigned get_recorders ( uvm_recorder q ) [source]
Provides a queue of all transactions within the stream.
Parameters
q
A reference to the queue of uvm_recorders
The get_recorders method returns the size of the queue, such that the user can conditionally process the elements.
uvm_recorder tr_q[$]; if (my_stream.get_recorders(tr_q)) begin // Process the queue... end
- static function uvm_tr_stream get_stream_from_handle ( integer id ) [source]
Static accessor, returns a stream reference for a given unique id.
If no stream exists with the given id , or if the stream with that id has been freed, then null is returned.
The uvm_tr_stream base class is a representation of a stream of records within a uvm_tr_database.
The record stream is intended to hide the underlying database implementation from the end user, as these details are often vendor or tool-specific.
The uvm_tr_stream class is pure virtual, and must be extended with an implementation. A default text-based implementation is provided via the uvm_text_tr_stream class.