Class uvm_pkg::uvm_tr_stream
Inheritance Diagram of uvm_tr_stream
Constructors
- new(string name = "unnamed-uvm_tr_stream")
Function
new
Constructor
Parameters
-
name
-
Stream instance name
- Parameters:
name (string)
-
Functions
- get_db()
Function
get_db
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.
- Return type:
- get_scope()
Function
get_scope
Returns the scope supplied when opening this stream.
A warning will be asserted if get_scope is called prior to the stream being initialized via do_open.
- get_stream_type_name()
Function
get_stream_type_name
Returns a reference to the database which contains this stream.
A warning will be asserted if get_stream_type_name is called prior to the stream being initialized via do_open.
- close()
Function
close
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.
- free()
Function
free
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.
- is_open()
Function
is_open
Returns true if this uvm_tr_stream was opened on the database, but has not yet been closed.
- is_closed()
Function
is_closed
Returns true if this uvm_tr_stream was closed on the database, but has not yet been freed.
- open_recorder(string name, time open_time = 0, string type_name = "")
Function
open_recorder
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
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.
- Parameters:
name (string)
open_time (time)
type_name (string)
- Return type:
-
- get_recorders(uvm_recorder q)
Function
get_recorders
Provides a queue of all transactions within the stream.
Parameters
-
q
-
A reference to the queue of uvm_recorders
uvm_recorder tr_q[$]; if (my_stream.get_recorders(tr_q)) begin // Process the queue... end
- Parameters:
q (uvm_recorder)
-
- get_handle()
Function
get_handle
Returns a unique ID for this stream.
A value of 0 indicates that the recorder has been freed , and no longer has a valid ID.
- get_stream_from_handle(integer id)
Function
get_stream_from_handle
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.
- Parameters:
id (integer)
- Return type:
CLASS
uvm_tr_stream
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.