[source]

Class uvm_pkg::uvm_pool

uvm_pkg::uvm_pool <KEY, T> + type_name : string + add(): void + create(): uvm_object + delete(): void + do_copy(): void + do_print(): void + exists(): int + first(): int + get(): T + get_global(): T + get_global_pool(): this_type + get_type_name(): string + last(): int + next(): int + num(): int + prev(): int uvm_pkg::uvm_object_string_pool <T> <KEY : string, T : T>

Inheritance Diagram of uvm_pool

CLASS

uvm_pool #(KEY,T)

Implements a class-based dynamic associative array. Allows sparse arrays to be allocated on demand, and passed and stored by reference.

Parameters

Name

Default value

Description

KEY

int

T

uvm_void

Variables

Name

Type

Description

type_name

string

Typedefs

Name

Actual Type

Description

this_type

uvm_pool#(KEY, T)

Constructors

new(string name = "")

Function

new

Creates a new pool with the given name .

Parameters:

name (string)

Functions

get_global_pool()

Function

get_global_pool

Returns the singleton global pool for the item type, T.

This allows items to be shared amongst components throughout the verification environment.

Return type:

this_type

get_global(int key)

Function

get_global

Returns the specified item instance from the global item pool.

Parameters:

key (int)

Return type:

T

get(int key)

Function

get

Returns the item with the given key .

If no item exists by that key, a new item is created with that key and returned.

Parameters:

key (int)

Return type:

T

add(int key, uvm_void item)

Function

add

Adds the given ( key , item ) pair to the pool. If an item already exists at the given key it is overwritten with the new item .

Parameters:
num()

Function

num

Returns the number of uniquely keyed items stored in the pool.

delete(int key)

Function

delete

Removes the item with the given key from the pool.

Parameters:

key (int)

exists(int key)

Function

exists

Returns 1 if an item with the given key exists in the pool, 0 otherwise.

Parameters:

key (int)

first(int key)

Function

first

Returns the key of the first item stored in the pool.

If the pool is empty, then key is unchanged and 0 is returned.

If the pool is not empty, then key is key of the first item and 1 is returned.

Parameters:

key (int)

last(int key)

Function

last

Returns the key of the last item stored in the pool.

If the pool is empty, then 0 is returned and key is unchanged.

If the pool is not empty, then key is set to the last key in the pool and 1 is returned.

Parameters:

key (int)

next(int key)

Function

next

Returns the key of the next item in the pool.

If the input key is the last key in the pool, then key is left unchanged and 0 is returned.

If a next key is found, then key is updated with that key and 1 is returned.

Parameters:

key (int)

prev(int key)

Function

prev

Returns the key of the previous item in the pool.

If the input key is the first key in the pool, then key is left unchanged and 0 is returned.

If a previous key is found, then key is updated with that key and 1 is returned.

Parameters:

key (int)

create(string name = "")
Parameters:

name (string)

Return type:

uvm_object

get_type_name()
do_copy(uvm_object rhs)
Parameters:

rhs (uvm_object)

do_print(uvm_printer printer)
Parameters:

printer (uvm_printer)