Class uvm_pkg::uvm_tr_database
Inheritance Diagram of uvm_tr_database
Constructors
- new(string name = "unnamed-uvm_tr_database")
Function
new
Constructor
Parameters
-
name
-
Instance name
- Parameters:
name (string)
-
Functions
- open_db()
Function
open_db
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.
- close_db()
Function
close_db
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.
- is_open()
Function
is_open
Returns the open/closed status of the database.
This method returns 1 if the database has been successfully opened, but not yet closed.
- open_stream(string name, string scope = "", string type_name = "")
Function
open_stream
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.
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.
- Parameters:
name (string)
scope (string)
type_name (string)
- Return type:
-
- m_free_stream(uvm_tr_stream stream)
Function- m_free_stream Removes stream from the internal array
- Parameters:
stream (uvm_tr_stream)
- get_streams(uvm_tr_stream q)
Function
get_streams
Provides a queue of all streams within the database.
Parameters
-
q
-
A reference to a queue of uvm_tr_streams
uvm_tr_stream stream_q[$]; if (my_db.get_streams(stream_q)) begin // Process the queue... end
- Parameters:
q (uvm_tr_stream)
-
- establish_link(uvm_link_base link)
Function
establish_link
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.
- Parameters:
link (uvm_link_base)
Copyright 2007-2011 Mentor Graphics Corporation Copyright 2007-2011 Cadence Design Systems, Inc. Copyright 2010 Synopsys, Inc. Copyright 2013 NVIDIA Corporation All Rights Reserved Worldwide
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
CLASS
uvm_tr_database
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.