SyoSil ApS UVM Scoreboard
1.0.3.0
|
Queue iterator base class defining the iterator API used for iterating over queues. More...
Public Member Functions | |
virtual cl_syoscb_proxy_item_base | next () |
Iterator API: Moves the iterator one step forward, returning the next item in the queue. More... | |
virtual bit | has_next () |
Iterator API: Checks if there are more items in the queue in the forward direction More... | |
virtual int | next_index () |
Iterator API: Returns the index of the item which would be returned if next() was called More... | |
virtual cl_syoscb_proxy_item_base | previous () |
Iterator API: Moves the iterator one step backward, returning the previous item in the queue. More... | |
virtual bit | has_previous () |
Iterator API: Checks if there are more items in the queue in the backward direction More... | |
virtual int | previous_index () |
Iterator API: Returns the index of the item which would be returned if previous() was called More... | |
virtual bit | first () |
Iterator API: Moves the iterator to the first item in the queue. More... | |
virtual bit | last () |
Iterator API: Moves the iterator to the last item in the queue. More... | |
virtual bit | set_queue (cl_syoscb_queue_base owner) |
Iterator API: Sets the queue over which this iterator is iterating. More... | |
Protected Member Functions | |
virtual cl_syoscb_queue_base | get_queue () |
Iterator API: Internal API: Returns the queue over which this iterator is iterating. More... | |
virtual cl_syoscb_proxy_item_base | get_item_proxy () |
Iterator API: Internal API: Returns a proxy item that can be used to access the element that was just moved past by calling next or previous. More... | |
Protected Attributes | |
cl_syoscb_queue_base | owner |
The owner of this iterator. | |
int unsigned | position = 0 |
Current position in the queue. | |
cl_syoscb_cfg | cfg |
Local handle to the SCB cfg. | |
Queue iterator base class defining the iterator API used for iterating over queues.
The iterator API is modelled after the Java ListIterator interface https://docs.oracle.com/javase/8/docs/api/java/util/ListIterator.html. To iterate over all elements of a queue, use a while loop of the type
void'(iter.first()); while(iter.has_next()) begin cl_syoscb_proxy_item_base pib = iter.next(); //do something end
Internally, the iterator's position is always between elements. Calling next or previous will advance or reverse the iterator, returning the item that was moved past
items: queue[0] queue[1] queue[2] ... queue[n-1] cursor positions: ^ ^ ^ ^ ^ ^
Definition at line 17 of file cl_syoscb_queue_iterator_base.svh.
|
virtual |
Iterator API: Moves the iterator to the first item in the queue.
Calling has_previous at this point will always return 1'b0
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 104 of file cl_syoscb_queue_iterator_base.svh.
Referenced by cl_scb_test_iterator_unit_tests::check_first(), cl_scb_test_iterator_unit_tests::check_flush(), cl_syoscb_compare_base::create_primary_iterator(), cl_syoscb_queue_base::dump_orphans_to_file(), cl_syoscb_queue_base::dump_orphans_to_stdout(), cl_syoscb_compare_ooo::get_count_producer(), cl_syoscb_compare_iop::get_count_producer(), cl_syoscb_compare_ooo::primary_loop_do(), cl_syoscb_compare_io_2hp::primary_loop_do(), cl_syoscb_compare_iop::primary_loop_do(), cl_syoscb_compare_io::secondary_loop_do(), and cl_syoscb_compare_iop::secondary_loop_do().
|
protectedvirtual |
Iterator API: Internal API: Returns a proxy item that can be used to access the element that was just moved past by calling next or previous.
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 143 of file cl_syoscb_queue_iterator_base.svh.
|
protectedvirtual |
Iterator API: Internal API: Returns the queue over which this iterator is iterating.
Definition at line 119 of file cl_syoscb_queue_iterator_base.svh.
References owner.
Referenced by cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::get_item_proxy(), cl_syoscb_queue_iterator_std::has_next(), cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::has_next(), cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::has_previous(), cl_syoscb_queue_iterator_std::next(), cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::next(), cl_syoscb_queue_iterator_std::previous(), and cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::previous().
|
virtual |
Iterator API: Checks if there are more items in the queue in the forward direction
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 69 of file cl_syoscb_queue_iterator_base.svh.
Referenced by cl_scb_test_iterator_unit_tests::check_flush(), cl_scb_test_iterator_unit_tests::check_next(), cl_scb_test_iterator_unit_tests::check_prev(), cl_syoscb_queue_base::dump_orphans_to_file(), cl_syoscb_queue_base::dump_orphans_to_stdout(), cl_syoscb_compare_ooo::primary_loop_do(), cl_syoscb_compare_iop::primary_loop_do(), and cl_syoscb_compare_iop::secondary_loop_do().
|
virtual |
Iterator API: Checks if there are more items in the queue in the backward direction
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 90 of file cl_syoscb_queue_iterator_base.svh.
Referenced by cl_scb_test_iterator_unit_tests::check_flush(), and cl_scb_test_iterator_unit_tests::check_prev().
|
virtual |
Iterator API: Moves the iterator to the last item in the queue.
Calling has_next at this point will always return 1'b0.
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 112 of file cl_syoscb_queue_iterator_base.svh.
Referenced by cl_scb_test_iterator_unit_tests::check_flush(), and cl_scb_test_iterator_unit_tests::check_last().
|
virtual |
Iterator API: Moves the iterator one step forward, returning the next item in the queue.
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 62 of file cl_syoscb_queue_iterator_base.svh.
Referenced by cl_scb_test_iterator_unit_tests::check_first(), cl_scb_test_iterator_unit_tests::check_flush(), cl_scb_test_iterator_unit_tests::check_prev(), cl_syoscb_queue_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::delete_item(), cl_syoscb_queue_base::dump_orphans_to_file(), cl_syoscb_queue_base::dump_orphans_to_stdout(), cl_syoscb_compare_ooo::get_count_producer(), cl_syoscb_compare_iop::get_count_producer(), cl_syoscb_compare_ooo::primary_loop_do(), cl_syoscb_compare_io::primary_loop_do(), cl_syoscb_compare_io_2hp::primary_loop_do(), cl_syoscb_compare_iop::primary_loop_do(), cl_syoscb_compare_io::secondary_loop_do(), and cl_syoscb_compare_iop::secondary_loop_do().
|
virtual |
Iterator API: Returns the index of the item which would be returned if next() was called
Definition at line 76 of file cl_syoscb_queue_iterator_base.svh.
References position.
Referenced by cl_scb_test_iterator_unit_tests::check_flush(), cl_scb_test_iterator_unit_tests::check_last(), cl_scb_test_iterator_unit_tests::check_next(), cl_scb_test_iterator_unit_tests::check_prev(), cl_syoscb_queue_base::dump_orphans_to_file(), cl_syoscb_queue_base::dump_orphans_to_stdout(), cl_syoscb_compare_ooo::primary_loop_do(), cl_syoscb_compare_iop::primary_loop_do(), and cl_syoscb_compare_iop::secondary_loop_do().
|
virtual |
Iterator API: Moves the iterator one step backward, returning the previous item in the queue.
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 82 of file cl_syoscb_queue_iterator_base.svh.
|
virtual |
Iterator API: Returns the index of the item which would be returned if previous() was called
Definition at line 97 of file cl_syoscb_queue_iterator_base.svh.
References position.
Referenced by cl_scb_test_iterator_unit_tests::check_first(), cl_scb_test_iterator_unit_tests::check_flush(), cl_scb_test_iterator_unit_tests::check_next(), cl_scb_test_iterator_unit_tests::check_prev(), cl_syoscb_queue_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >::delete_item(), cl_syoscb_queue_base::dump_orphans_to_file(), cl_syoscb_queue_base::dump_orphans_to_stdout(), and cl_syoscb_compare_iop::secondary_loop_do().
|
virtual |
Iterator API: Sets the queue over which this iterator is iterating.
If a queue has already been associated with this iterator, or the queue type does not match the iterator type, generates a UVM_ERROR message with id ITER_ERROR.
Reimplemented in cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_hash< pk_syoscb::MD5_HASH_DIGEST_WIDTH >, cl_syoscb_queue_iterator_std, and cl_syoscb_queue_iterator_std.
Definition at line 134 of file cl_syoscb_queue_iterator_base.svh.
Referenced by cl_scb_test_iterator_unit_tests::check_set_queue().
![]() |
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 Version: 1.8.14 Generated with IDV SV Filter Version: 2.6.3 Fri Sep 2 2022 14:41:11 |