SyoSil ApS UVM Scoreboard  1.0.3.0
Public Types | Public Member Functions | Public Attributes | List of all members
cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH > Class Template Reference

A wrapper around an associative array, used for storing hash queues. More...

Inherits uvm_object, and uvm_object.

+ Collaboration diagram for cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >:

Public Types

typedef cl_syoscb_hash_base< HASH_DIGEST_WIDTH >::tp_hash_digest tp_digest
 Typedef for hash algorithm digests.
 
typedef cl_syoscb_hash_base< HASH_DIGEST_WIDTH >::tp_hash_digest tp_digest
 Typedef for hash algorithm digests.
 

Public Member Functions

int size ()
 Returns the size (number of entries) in the wrapped assoc array. More...
 
int get_size (tp_digest digest)
 Return the size of a hash item in the wrapped assoc array. More...
 
void insert (tp_digest digest, cl_syoscb_item item)
 Inserts an item into the wrapped assoc array. More...
 
cl_syoscb_item get_item (tp_digest digest, int unsigned idx=0)
 Gets the scoreboard item at an index with a given hash value. More...
 
cl_syoscb_hash_item get_hash_item (tp_digest digest)
 Gets a hash item in the wrapped assoc array. More...
 
void delete (tp_digest digest, int unsigned idx=0)
 Deletes a sequence item with a given hash value. More...
 
void delete_all ()
 Deletes all items in the assoc array.
 
bit exists (tp_digest digest)
 Checks if an entry exists with the given hash value. More...
 
bit first (ref tp_digest digest)
 Retrieves the hash of the first item in the wrapped AA The first item is not necessarily the item first inserted, but the item that comes first "alphabetically". More...
 
bit last (ref tp_digest digest)
 Retrieves the hash of the last item in the wrapped AA The last item is not necessarily the item last inserted, but the item that comes last "alphabetically". More...
 
bit next (ref tp_digest digest)
 Retrieves the hash of the next item in the wrapped AA The first item is not necessarily the next item in insertion order, but the item that comes next "alphabetically". More...
 
bit prev (ref tp_digest digest)
 Retrieves the hash of the previous item in the wrapped AA The previous item is not necessarily the previous item in insertion order, but the prevoius item "alphabetically". More...
 

Public Attributes

cl_syoscb_hash_item hash [tp_digest]
 Queue implemented as assoc array.
 

Detailed Description

template<int unsigned HASH_DIGEST_WIDTH = 1>
class cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >

A wrapper around an associative array, used for storing hash queues.

Supports all of the same functions that an ordinary AA supports

Definition at line 3 of file cl_syoscb_hash_aa_wrapper.svh.

Member Function Documentation

◆ delete()

template<int unsigned HASH_DIGEST_WIDTH = 1>
void cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::delete ( tp_digest  digest,
int unsigned  idx = 0 
)

Deletes a sequence item with a given hash value.

Parameters
digestThe hash digest of the item to delete
idxThe index in the hash item of the sequence item to delete. Defaults to 0.

Must remove to avoid iterating over empty hash items

Definition at line 103 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_item::delete_item(), cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::get_size(), and cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

◆ exists()

template<int unsigned HASH_DIGEST_WIDTH = 1>
bit cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::exists ( tp_digest  digest)

Checks if an entry exists with the given hash value.

Parameters
digestThe hash value to check for
Returns
1 if an item with that hash exists, 0 otherwise

Definition at line 119 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

Referenced by cl_syoscb_queue_locator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::search().

◆ first()

template<int unsigned HASH_DIGEST_WIDTH = 1>
bit cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::first ( ref tp_digest  digest)

Retrieves the hash of the first item in the wrapped AA The first item is not necessarily the item first inserted, but the item that comes first "alphabetically".

Parameters
digestA reference to a digest, where the digest of the first entry is returned
Returns
1 if the digest is valid, 0 otherwise

Definition at line 128 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

Referenced by cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::first(), cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::get_item_proxy(), and cl_syoscb_queue_locator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::validate_no_match().

◆ get_hash_item()

template<int unsigned HASH_DIGEST_WIDTH = 1>
cl_syoscb_hash_item cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::get_hash_item ( tp_digest  digest)

Gets a hash item in the wrapped assoc array.

Parameters
digestThe hash digest of the item to get
Returns
The hash item at that digest, or null if none exists

Definition at line 82 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

◆ get_item()

template<int unsigned HASH_DIGEST_WIDTH = 1>
cl_syoscb_item cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::get_item ( tp_digest  digest,
int unsigned  idx = 0 
)

Gets the scoreboard item at an index with a given hash value.

Parameters
digestThe hash value of the item to get
idxThe index in the hash item. Defaults to 0.
Returns
That item, or null if no item with that hash exists or idx was too large

Definition at line 93 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_item::get_item(), and cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

Referenced by cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::next(), cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::previous(), cl_syoscb_queue_locator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::search(), and cl_syoscb_queue_locator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::validate_no_match().

◆ get_size()

template<int unsigned HASH_DIGEST_WIDTH = 1>
int cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::get_size ( tp_digest  digest)

◆ insert()

template<int unsigned HASH_DIGEST_WIDTH = 1>
void cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::insert ( tp_digest  digest,
cl_syoscb_item  item 
)

Inserts an item into the wrapped assoc array.

Parameters
digestThe hash digest of the item to insert
itemThe item to insert

Definition at line 70 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_item::add_item(), and cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

◆ last()

template<int unsigned HASH_DIGEST_WIDTH = 1>
bit cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::last ( ref tp_digest  digest)

Retrieves the hash of the last item in the wrapped AA The last item is not necessarily the item last inserted, but the item that comes last "alphabetically".

Parameters
digestA reference to a digest, where the digest of the last entry is returned
Returns
1 if the digest is valid, 0 otherwise

Definition at line 137 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

Referenced by cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::last().

◆ next()

template<int unsigned HASH_DIGEST_WIDTH = 1>
bit cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::next ( ref tp_digest  digest)

Retrieves the hash of the next item in the wrapped AA The first item is not necessarily the next item in insertion order, but the item that comes next "alphabetically".

Parameters
digestA reference to the digest of the current value. The digest of the next entry is returned here
Returns
1 if the digest is valid, 0 otherwise

Definition at line 146 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

Referenced by cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::next(), and cl_syoscb_queue_locator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::validate_no_match().

◆ prev()

template<int unsigned HASH_DIGEST_WIDTH = 1>
bit cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::prev ( ref tp_digest  digest)

Retrieves the hash of the previous item in the wrapped AA The previous item is not necessarily the previous item in insertion order, but the prevoius item "alphabetically".

Parameters
digestA reference to the digest of the current value. The digest of the previous entry is returned here
Returns
1 if the digest is valid, 0 otherwise

Definition at line 155 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.

Referenced by cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::previous().

◆ size()

template<int unsigned HASH_DIGEST_WIDTH = 1>
int cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::size ( )

Returns the size (number of entries) in the wrapped assoc array.

Note
This does not necessarily match the size of the contained queue, as a hash item may have multiple entries

Definition at line 53 of file cl_syoscb_hash_aa_wrapper.svh.

References cl_syoscb_hash_aa_wrapper< HASH_DIGEST_WIDTH >::hash.


The documentation for this class was generated from the following files:

Project: SyoSil ApS UVM Scoreboard, Revision: 1.0.3.0

Copyright 2014-2022 SyoSil ApS
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.
doxygen
Doxygen Version: 1.8.14
Generated with IDV SV Filter Version: 2.6.3
Fri Sep 2 2022 14:41:05
Find a documentation bug? Report bugs to: scoreboard@syosil.com